1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-11-01 20:14:15 +00:00
webvirtcloud/dev/scss/bootstrap/mixins/_caret.scss

65 lines
1.4 KiB
SCSS
Raw Normal View History

// 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;
}
@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;
}
@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;
}
@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();
} @else if $direction == end {
@include caret-end();
2020-05-19 16:53:54 +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: "";
@include caret-start();
2020-05-19 16:53:54 +00:00
}
}
&:empty::after {
margin-left: 0;
}
}
}
// scss-docs-end caret-mixins