2021-02-11 04:29:59 +01:00
|
|
|
// scss-docs-start caret-mixins
|
2017-06-28 21:34:07 +02: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 16:06:20 +02:00
|
|
|
@mixin caret-end {
|
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;
|
|
|
|
}
|
|
|
|
|
2020-06-26 16:06:20 +02:00
|
|
|
@mixin caret-start {
|
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();
|
2020-06-26 16:06:20 +02:00
|
|
|
} @else if $direction == end {
|
|
|
|
@include caret-end();
|
2017-10-29 23:29:13 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-26 16:06:20 +02:00
|
|
|
@if $direction == start {
|
2017-10-29 23:29:13 +01:00
|
|
|
&::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: "";
|
2020-06-26 16:06:20 +02:00
|
|
|
@include caret-start();
|
2017-06-28 21:34:07 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&:empty::after {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-02-11 04:29:59 +01:00
|
|
|
// scss-docs-end caret-mixins
|