Mixins

triangle

Draws a triangle from the current element.

Arguments

NameTypeDefaultDescription
$inline-size *numberTriangle inline size.
$block-size *numberTriangle block size.
$direction *stringThe keyword describing the triangle direction.
$colorcolorcurrentColorTriangle color.
List of direction keywords:
KeywordFigure
top
bottom
left
right
bottom-left
bottom-right
top-left
top-right

Example

@use 'more-sass' as more;

.element-one {
  @include more.triangle(10px, 8px, 'top');
}

.element-two {
  @include more.triangle(14px, 18px, 'bottom-left', #148cd7);
}
Copyright © 2026