diff options
Diffstat (limited to 'alphabetlearning/static/bootstrap/scss/helpers')
7 files changed, 101 insertions, 0 deletions
diff --git a/alphabetlearning/static/bootstrap/scss/helpers/_clearfix.scss b/alphabetlearning/static/bootstrap/scss/helpers/_clearfix.scss new file mode 100644 index 0000000..e92522a --- /dev/null +++ b/alphabetlearning/static/bootstrap/scss/helpers/_clearfix.scss @@ -0,0 +1,3 @@ +.clearfix { + @include clearfix(); +} diff --git a/alphabetlearning/static/bootstrap/scss/helpers/_colored-links.scss b/alphabetlearning/static/bootstrap/scss/helpers/_colored-links.scss new file mode 100644 index 0000000..8c167de --- /dev/null +++ b/alphabetlearning/static/bootstrap/scss/helpers/_colored-links.scss @@ -0,0 +1,12 @@ +@each $color, $value in $theme-colors { + .link-#{$color} { + color: $value; + + @if $link-shade-percentage != 0 { + &:hover, + &:focus { + color: if(color-contrast($value) == $color-contrast-light, shade-color($value, $link-shade-percentage), tint-color($value, $link-shade-percentage)); + } + } + } +} diff --git a/alphabetlearning/static/bootstrap/scss/helpers/_position.scss b/alphabetlearning/static/bootstrap/scss/helpers/_position.scss new file mode 100644 index 0000000..31851eb --- /dev/null +++ b/alphabetlearning/static/bootstrap/scss/helpers/_position.scss @@ -0,0 +1,30 @@ +// Shorthand + +.fixed-top { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: $zindex-fixed; +} + +.fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: $zindex-fixed; +} + +// Responsive sticky top +@each $breakpoint in map-keys($grid-breakpoints) { + @include media-breakpoint-up($breakpoint) { + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + + .sticky#{$infix}-top { + position: sticky; + top: 0; + z-index: $zindex-sticky; + } + } +} diff --git a/alphabetlearning/static/bootstrap/scss/helpers/_ratio.scss b/alphabetlearning/static/bootstrap/scss/helpers/_ratio.scss new file mode 100644 index 0000000..2390ee3 --- /dev/null +++ b/alphabetlearning/static/bootstrap/scss/helpers/_ratio.scss @@ -0,0 +1,26 @@ +// Credit: Nicolas Gallagher and SUIT CSS. + +.ratio { + position: relative; + width: 100%; + + &::before { + display: block; + padding-top: var(--#{$variable-prefix}aspect-ratio); + content: ""; + } + + > * { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } +} + +@each $key, $ratio in $aspect-ratios { + .ratio-#{$key} { + --#{$variable-prefix}aspect-ratio: #{$ratio}; + } +} diff --git a/alphabetlearning/static/bootstrap/scss/helpers/_stretched-link.scss b/alphabetlearning/static/bootstrap/scss/helpers/_stretched-link.scss new file mode 100644 index 0000000..71a1c75 --- /dev/null +++ b/alphabetlearning/static/bootstrap/scss/helpers/_stretched-link.scss @@ -0,0 +1,15 @@ +// +// Stretched link +// + +.stretched-link { + &::#{$stretched-link-pseudo-element} { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: $stretched-link-z-index; + content: ""; + } +} diff --git a/alphabetlearning/static/bootstrap/scss/helpers/_text-truncation.scss b/alphabetlearning/static/bootstrap/scss/helpers/_text-truncation.scss new file mode 100644 index 0000000..6421dac --- /dev/null +++ b/alphabetlearning/static/bootstrap/scss/helpers/_text-truncation.scss @@ -0,0 +1,7 @@ +// +// Text truncation +// + +.text-truncate { + @include text-truncate(); +} diff --git a/alphabetlearning/static/bootstrap/scss/helpers/_visually-hidden.scss b/alphabetlearning/static/bootstrap/scss/helpers/_visually-hidden.scss new file mode 100644 index 0000000..4760ff0 --- /dev/null +++ b/alphabetlearning/static/bootstrap/scss/helpers/_visually-hidden.scss @@ -0,0 +1,8 @@ +// +// Visually hidden +// + +.visually-hidden, +.visually-hidden-focusable:not(:focus):not(:focus-within) { + @include visually-hidden(); +} |