2021-07-07 11:12:38 +00:00
|
|
|
// scss-docs-start caret-mixins
|
|
|
|
@mixin caret-down {
|
2020-05-19 16:53:54 +00:00
|
|
|
border-top: $caret-width solid;
|
|
|
|
border-right: $caret-width solid transparent;
|
|
|
|
border-bottom: 0;
|
|
|
|
border-left: $caret-width solid transparent;
|
|
|
|
}
|
|
|
|
|
2021-07-07 11:12:38 +00:00
|
|
|
@mixin caret-up {
|
2020-05-19 16:53:54 +00:00
|
|
|
border-top: 0;
|
|
|
|
border-right: $caret-width solid transparent;
|
|
|
|
border-bottom: $caret-width solid;
|
|
|
|
border-left: $caret-width solid transparent;
|
|
|
|
}
|
|
|
|
|
2021-07-07 11:12:38 +00:00
|
|
|
@mixin caret-end {
|
2020-05-19 16:53:54 +00:00
|
|
|
border-top: $caret-width solid transparent;
|
|
|
|
border-right: 0;
|
|
|
|
border-bottom: $caret-width solid transparent;
|
|
|
|
border-left: $caret-width solid;
|
|
|
|
}
|
|
|
|
|
2021-07-07 11:12:38 +00:00
|
|
|
@mixin caret-start {
|
2020-05-19 16:53:54 +00:00
|
|
|
border-top: $caret-width solid transparent;
|
|
|
|
border-right: $caret-width solid;
|
|
|
|
border-bottom: $caret-width solid transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin caret($direction: down) {
|
|
|
|
@if $enable-caret {
|
|
|
|
&::after {
|
|
|
|
display: inline-block;
|
|
|
|
margin-left: $caret-spacing;
|
|
|
|
vertical-align: $caret-vertical-align;
|
|
|
|
content: "";
|
|
|
|
@if $direction == down {
|
|
|
|
@include caret-down();
|
|
|
|
} @else if $direction == up {
|
|
|
|
@include caret-up();
|
2021-07-07 11:12:38 +00:00
|
|
|
} @else if $direction == end {
|
|
|
|
@include caret-end();
|
2020-05-19 16:53:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-07 11:12:38 +00:00
|
|
|
@if $direction == start {
|
2020-05-19 16:53:54 +00:00
|
|
|
&::after {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: $caret-spacing;
|
|
|
|
vertical-align: $caret-vertical-align;
|
|
|
|
content: "";
|
2021-07-07 11:12:38 +00:00
|
|
|
@include caret-start();
|
2020-05-19 16:53:54 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:empty::after {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-07-07 11:12:38 +00:00
|
|
|
// scss-docs-end caret-mixins
|