aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/scss/mixins
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-06-13 10:00:50 +0000
committerMario <mario@mariovavti.com>2020-06-13 10:00:50 +0000
commitdc3b09c8f38872ef8b792a4b551671a6105754cc (patch)
tree554f130cc2d5a00088cad6c9a75ae0a8f2d558f8 /vendor/twbs/bootstrap/scss/mixins
parentc8c4513af98a9dd2a6d9331ba4b3ab3af0e95a5f (diff)
downloadvolse-hubzilla-dc3b09c8f38872ef8b792a4b551671a6105754cc.tar.gz
volse-hubzilla-dc3b09c8f38872ef8b792a4b551671a6105754cc.tar.bz2
volse-hubzilla-dc3b09c8f38872ef8b792a4b551671a6105754cc.zip
composer update bootstrap
Diffstat (limited to 'vendor/twbs/bootstrap/scss/mixins')
-rw-r--r--vendor/twbs/bootstrap/scss/mixins/_background-variant.scss3
-rw-r--r--vendor/twbs/bootstrap/scss/mixins/_border-radius.scss39
-rw-r--r--vendor/twbs/bootstrap/scss/mixins/_buttons.scss12
-rw-r--r--vendor/twbs/bootstrap/scss/mixins/_forms.scss4
-rw-r--r--vendor/twbs/bootstrap/scss/mixins/_grid-framework.scss40
-rw-r--r--vendor/twbs/bootstrap/scss/mixins/_transition.scss24
6 files changed, 78 insertions, 44 deletions
diff --git a/vendor/twbs/bootstrap/scss/mixins/_background-variant.scss b/vendor/twbs/bootstrap/scss/mixins/_background-variant.scss
index 3ceb5c563..80580189a 100644
--- a/vendor/twbs/bootstrap/scss/mixins/_background-variant.scss
+++ b/vendor/twbs/bootstrap/scss/mixins/_background-variant.scss
@@ -15,8 +15,9 @@
@include deprecate("The `bg-variant` mixin", "v4.4.0", "v5", $ignore-warning);
}
-@mixin bg-gradient-variant($parent, $color) {
+@mixin bg-gradient-variant($parent, $color, $ignore-warning: false) {
#{$parent} {
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
}
+ @include deprecate("The `bg-gradient-variant` mixin", "v4.5.0", "v5", $ignore-warning);
}
diff --git a/vendor/twbs/bootstrap/scss/mixins/_border-radius.scss b/vendor/twbs/bootstrap/scss/mixins/_border-radius.scss
index 88aeb37d8..aee9bf3d3 100644
--- a/vendor/twbs/bootstrap/scss/mixins/_border-radius.scss
+++ b/vendor/twbs/bootstrap/scss/mixins/_border-radius.scss
@@ -1,9 +1,22 @@
// stylelint-disable property-blacklist
// Single side border-radius
+// Helper function to replace negative values with 0
+@function valid-radius($radius) {
+ $return: ();
+ @each $value in $radius {
+ @if type-of($value) == number {
+ $return: append($return, max($value, 0));
+ } @else {
+ $return: append($return, $value);
+ }
+ }
+ @return $return;
+}
+
@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
@if $enable-rounded {
- border-radius: $radius;
+ border-radius: valid-radius($radius);
}
@else if $fallback-border-radius != false {
border-radius: $fallback-border-radius;
@@ -12,52 +25,52 @@
@mixin border-top-radius($radius) {
@if $enable-rounded {
- border-top-left-radius: $radius;
- border-top-right-radius: $radius;
+ border-top-left-radius: valid-radius($radius);
+ border-top-right-radius: valid-radius($radius);
}
}
@mixin border-right-radius($radius) {
@if $enable-rounded {
- border-top-right-radius: $radius;
- border-bottom-right-radius: $radius;
+ border-top-right-radius: valid-radius($radius);
+ border-bottom-right-radius: valid-radius($radius);
}
}
@mixin border-bottom-radius($radius) {
@if $enable-rounded {
- border-bottom-right-radius: $radius;
- border-bottom-left-radius: $radius;
+ border-bottom-right-radius: valid-radius($radius);
+ border-bottom-left-radius: valid-radius($radius);
}
}
@mixin border-left-radius($radius) {
@if $enable-rounded {
- border-top-left-radius: $radius;
- border-bottom-left-radius: $radius;
+ border-top-left-radius: valid-radius($radius);
+ border-bottom-left-radius: valid-radius($radius);
}
}
@mixin border-top-left-radius($radius) {
@if $enable-rounded {
- border-top-left-radius: $radius;
+ border-top-left-radius: valid-radius($radius);
}
}
@mixin border-top-right-radius($radius) {
@if $enable-rounded {
- border-top-right-radius: $radius;
+ border-top-right-radius: valid-radius($radius);
}
}
@mixin border-bottom-right-radius($radius) {
@if $enable-rounded {
- border-bottom-right-radius: $radius;
+ border-bottom-right-radius: valid-radius($radius);
}
}
@mixin border-bottom-left-radius($radius) {
@if $enable-rounded {
- border-bottom-left-radius: $radius;
+ border-bottom-left-radius: valid-radius($radius);
}
}
diff --git a/vendor/twbs/bootstrap/scss/mixins/_buttons.scss b/vendor/twbs/bootstrap/scss/mixins/_buttons.scss
index c82c4d6d0..d6235aa27 100644
--- a/vendor/twbs/bootstrap/scss/mixins/_buttons.scss
+++ b/vendor/twbs/bootstrap/scss/mixins/_buttons.scss
@@ -20,10 +20,10 @@
color: color-yiq($hover-background);
@include gradient-bg($hover-background);
border-color: $hover-border;
- // Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
- box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
+ @include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
} @else {
+ // Avoid using mixin so we can pass custom focus shadow properly
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
}
}
@@ -51,10 +51,10 @@
border-color: $active-border;
&:focus {
- // Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows and $btn-active-box-shadow != none {
- box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
+ @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5));
} @else {
+ // Avoid using mixin so we can pass custom focus shadow properly
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
}
}
@@ -90,10 +90,10 @@
border-color: $active-border;
&:focus {
- // Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows and $btn-active-box-shadow != none {
- box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5);
+ @include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
} @else {
+ // Avoid using mixin so we can pass custom focus shadow properly
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
}
}
diff --git a/vendor/twbs/bootstrap/scss/mixins/_forms.scss b/vendor/twbs/bootstrap/scss/mixins/_forms.scss
index 418470d0b..57c2d79f2 100644
--- a/vendor/twbs/bootstrap/scss/mixins/_forms.scss
+++ b/vendor/twbs/bootstrap/scss/mixins/_forms.scss
@@ -16,10 +16,10 @@
background-color: $input-focus-bg;
border-color: $input-focus-border-color;
outline: 0;
- // Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
- box-shadow: $input-box-shadow, $input-focus-box-shadow;
+ @include box-shadow($input-box-shadow, $input-focus-box-shadow);
} @else {
+ // Avoid using mixin so we can pass custom focus shadow properly
box-shadow: $input-focus-box-shadow;
}
}
diff --git a/vendor/twbs/bootstrap/scss/mixins/_grid-framework.scss b/vendor/twbs/bootstrap/scss/mixins/_grid-framework.scss
index 8e291f7ae..191fb5650 100644
--- a/vendor/twbs/bootstrap/scss/mixins/_grid-framework.scss
+++ b/vendor/twbs/bootstrap/scss/mixins/_grid-framework.scss
@@ -15,12 +15,15 @@
@each $breakpoint in map-keys($breakpoints) {
$infix: breakpoint-infix($breakpoint, $breakpoints);
- // Allow columns to stretch full width below their breakpoints
- @for $i from 1 through $columns {
- .col#{$infix}-#{$i} {
- @extend %grid-column;
+ @if $columns > 0 {
+ // Allow columns to stretch full width below their breakpoints
+ @for $i from 1 through $columns {
+ .col#{$infix}-#{$i} {
+ @extend %grid-column;
+ }
}
}
+
.col#{$infix},
.col#{$infix}-auto {
@extend %grid-column;
@@ -31,12 +34,15 @@
.col#{$infix} {
flex-basis: 0;
flex-grow: 1;
+ min-width: 0; // See https://github.com/twbs/bootstrap/issues/25410
max-width: 100%;
}
- @for $i from 1 through $grid-row-columns {
- .row-cols#{$infix}-#{$i} {
- @include row-cols($i);
+ @if $grid-row-columns > 0 {
+ @for $i from 1 through $grid-row-columns {
+ .row-cols#{$infix}-#{$i} {
+ @include row-cols($i);
+ }
}
}
@@ -44,9 +50,11 @@
@include make-col-auto();
}
- @for $i from 1 through $columns {
- .col#{$infix}-#{$i} {
- @include make-col($i, $columns);
+ @if $columns > 0 {
+ @for $i from 1 through $columns {
+ .col#{$infix}-#{$i} {
+ @include make-col($i, $columns);
+ }
}
}
@@ -58,11 +66,13 @@
.order#{$infix}-#{$i} { order: $i; }
}
- // `$columns - 1` because offsetting by the width of an entire row isn't possible
- @for $i from 0 through ($columns - 1) {
- @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
- .offset#{$infix}-#{$i} {
- @include make-col-offset($i, $columns);
+ @if $columns > 0 {
+ // `$columns - 1` because offsetting by the width of an entire row isn't possible
+ @for $i from 0 through ($columns - 1) {
+ @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
+ .offset#{$infix}-#{$i} {
+ @include make-col-offset($i, $columns);
+ }
}
}
}
diff --git a/vendor/twbs/bootstrap/scss/mixins/_transition.scss b/vendor/twbs/bootstrap/scss/mixins/_transition.scss
index 8ce35a6b8..54553deb9 100644
--- a/vendor/twbs/bootstrap/scss/mixins/_transition.scss
+++ b/vendor/twbs/bootstrap/scss/mixins/_transition.scss
@@ -1,16 +1,26 @@
// stylelint-disable property-blacklist
@mixin transition($transition...) {
+ @if length($transition) == 0 {
+ $transition: $transition-base;
+ }
+
+ @if length($transition) > 1 {
+ @each $value in $transition {
+ @if $value == null or $value == none {
+ @warn "The keyword 'none' or 'null' must be used as a single argument.";
+ }
+ }
+ }
+
@if $enable-transitions {
- @if length($transition) == 0 {
- transition: $transition-base;
- } @else {
+ @if nth($transition, 1) != null {
transition: $transition;
}
- }
- @if $enable-prefers-reduced-motion-media-query {
- @media (prefers-reduced-motion: reduce) {
- transition: none;
+ @if $enable-prefers-reduced-motion-media-query and nth($transition, 1) != null and nth($transition, 1) != none {
+ @media (prefers-reduced-motion: reduce) {
+ transition: none;
+ }
}
}
}