aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/static/scss/mixins/_caret.scss
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-09-16 17:12:15 +0100
committerMatthew Lemon <y@yulqen.org>2024-09-16 17:12:15 +0100
commit86bb29b4d378314bd906248e08198c1952d2f0a4 (patch)
tree005bb24dfa6a0e5d911d6cfdda9d469828a387a1 /pyblackbird_cc/static/scss/mixins/_caret.scss
parent0d3ae1492e1a88db69437cd277b7cf11c4e6274a (diff)
Upgrade to bootstrap 5.3
Diffstat (limited to 'pyblackbird_cc/static/scss/mixins/_caret.scss')
-rw-r--r--pyblackbird_cc/static/scss/mixins/_caret.scss69
1 files changed, 69 insertions, 0 deletions
diff --git a/pyblackbird_cc/static/scss/mixins/_caret.scss b/pyblackbird_cc/static/scss/mixins/_caret.scss
new file mode 100644
index 0000000..be73116
--- /dev/null
+++ b/pyblackbird_cc/static/scss/mixins/_caret.scss
@@ -0,0 +1,69 @@
+// scss-docs-start caret-mixins
+@mixin caret-down($width: $caret-width) {
+ border-top: $width solid;
+ border-right: $width solid transparent;
+ border-bottom: 0;
+ border-left: $width solid transparent;
+}
+
+@mixin caret-up($width: $caret-width) {
+ border-top: 0;
+ border-right: $width solid transparent;
+ border-bottom: $width solid;
+ border-left: $width solid transparent;
+}
+
+@mixin caret-end($width: $caret-width) {
+ border-top: $width solid transparent;
+ border-right: 0;
+ border-bottom: $width solid transparent;
+ border-left: $width solid;
+}
+
+@mixin caret-start($width: $caret-width) {
+ border-top: $width solid transparent;
+ border-right: $width solid;
+ border-bottom: $width solid transparent;
+}
+
+@mixin caret(
+ $direction: down,
+ $width: $caret-width,
+ $spacing: $caret-spacing,
+ $vertical-align: $caret-vertical-align
+) {
+ @if $enable-caret {
+ &::after {
+ display: inline-block;
+ margin-left: $spacing;
+ vertical-align: $vertical-align;
+ content: "";
+ @if $direction == down {
+ @include caret-down($width);
+ } @else if $direction == up {
+ @include caret-up($width);
+ } @else if $direction == end {
+ @include caret-end($width);
+ }
+ }
+
+ @if $direction == start {
+ &::after {
+ display: none;
+ }
+
+ &::before {
+ display: inline-block;
+ margin-right: $spacing;
+ vertical-align: $vertical-align;
+ content: "";
+ @include caret-start($width);
+ }
+ }
+
+ &:empty::after {
+ margin-left: 0;
+ }
+ }
+}
+// scss-docs-end caret-mixins