2017-06-28 19:34:07 +00:00
|
|
|
@mixin caret-down {
|
|
|
|
border-top: $caret-width solid;
|
|
|
|
border-right: $caret-width solid transparent;
|
|
|
|
border-bottom: 0;
|
|
|
|
border-left: $caret-width solid transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin caret-up {
|
|
|
|
border-top: 0;
|
|
|
|
border-right: $caret-width solid transparent;
|
|
|
|
border-bottom: $caret-width solid;
|
|
|
|
border-left: $caret-width solid transparent;
|
|
|
|
}
|
|
|
|
|
2020-06-26 14:06:20 +00:00
|
|
|
@mixin caret-end {
|
2017-10-29 22:29:13 +00:00
|
|
|
border-top: $caret-width solid transparent;
|
2018-03-12 16:51:00 +00:00
|
|
|
border-right: 0;
|
2017-10-29 22:29:13 +00:00
|
|
|
border-bottom: $caret-width solid transparent;
|
|
|
|
border-left: $caret-width solid;
|
|
|
|
}
|
|
|
|
|
2020-06-26 14:06:20 +00:00
|
|
|
@mixin caret-start {
|
2017-10-29 22:29:13 +00:00
|
|
|
border-top: $caret-width solid transparent;
|
|
|
|
border-right: $caret-width solid;
|
|
|
|
border-bottom: $caret-width solid transparent;
|
|
|
|
}
|
|
|
|
|
2017-06-28 19:34:07 +00:00
|
|
|
@mixin caret($direction: down) {
|
|
|
|
@if $enable-caret {
|
|
|
|
&::after {
|
|
|
|
display: inline-block;
|
2019-01-07 16:28:21 +00:00
|
|
|
margin-left: $caret-spacing;
|
|
|
|
vertical-align: $caret-vertical-align;
|
2017-06-28 19:34:07 +00:00
|
|
|
content: "";
|
|
|
|
@if $direction == down {
|
2019-07-24 06:41:18 +00:00
|
|
|
@include caret-down();
|
2017-06-28 19:34:07 +00:00
|
|
|
} @else if $direction == up {
|
2019-07-24 06:41:18 +00:00
|
|
|
@include caret-up();
|
2020-06-26 14:06:20 +00:00
|
|
|
} @else if $direction == end {
|
|
|
|
@include caret-end();
|
2017-10-29 22:29:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-26 14:06:20 +00:00
|
|
|
@if $direction == start {
|
2017-10-29 22:29:13 +00:00
|
|
|
&::after {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
display: inline-block;
|
2019-01-07 16:28:21 +00:00
|
|
|
margin-right: $caret-spacing;
|
|
|
|
vertical-align: $caret-vertical-align;
|
2017-10-29 22:29:13 +00:00
|
|
|
content: "";
|
2020-06-26 14:06:20 +00:00
|
|
|
@include caret-start();
|
2017-06-28 19:34:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:empty::after {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|