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