aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/twbs/bootstrap/scss/_custom-forms.scss
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2019-05-10 14:21:36 +0200
committerMario Vavti <mario@mariovavti.com>2019-05-10 14:21:36 +0200
commit9866053f0ce44721c11990c9f9407e7428757c99 (patch)
tree6e414efa36c3bda00205918cecb9122f951427e3 /vendor/twbs/bootstrap/scss/_custom-forms.scss
parent89a2c1a09c896ac3a23df26a1783f5c682188a56 (diff)
downloadvolse-hubzilla-9866053f0ce44721c11990c9f9407e7428757c99.tar.gz
volse-hubzilla-9866053f0ce44721c11990c9f9407e7428757c99.tar.bz2
volse-hubzilla-9866053f0ce44721c11990c9f9407e7428757c99.zip
update bootstrap to version 4.3.1
Diffstat (limited to 'vendor/twbs/bootstrap/scss/_custom-forms.scss')
-rw-r--r--vendor/twbs/bootstrap/scss/_custom-forms.scss154
1 files changed, 114 insertions, 40 deletions
diff --git a/vendor/twbs/bootstrap/scss/_custom-forms.scss b/vendor/twbs/bootstrap/scss/_custom-forms.scss
index 8348e261c..03f3fc5be 100644
--- a/vendor/twbs/bootstrap/scss/_custom-forms.scss
+++ b/vendor/twbs/bootstrap/scss/_custom-forms.scss
@@ -10,8 +10,8 @@
.custom-control {
position: relative;
display: block;
- min-height: ($font-size-base * $line-height-base);
- padding-left: $custom-control-gutter;
+ min-height: $font-size-base * $line-height-base;
+ padding-left: $custom-control-gutter + $custom-control-indicator-size;
}
.custom-control-inline {
@@ -26,18 +26,28 @@
&:checked ~ .custom-control-label::before {
color: $custom-control-indicator-checked-color;
+ border-color: $custom-control-indicator-checked-border-color;
@include gradient-bg($custom-control-indicator-checked-bg);
@include box-shadow($custom-control-indicator-checked-box-shadow);
}
&:focus ~ .custom-control-label::before {
// the mixin is not used here to make sure there is feedback
- box-shadow: $custom-control-indicator-focus-box-shadow;
+ @if $enable-shadows {
+ box-shadow: $input-box-shadow, $input-focus-box-shadow;
+ } @else {
+ box-shadow: $custom-control-indicator-focus-box-shadow;
+ }
}
- &:active ~ .custom-control-label::before {
+ &:focus:not(:checked) ~ .custom-control-label::before {
+ border-color: $custom-control-indicator-focus-border-color;
+ }
+
+ &:not(:disabled):active ~ .custom-control-label::before {
color: $custom-control-indicator-active-color;
background-color: $custom-control-indicator-active-bg;
+ border-color: $custom-control-indicator-active-border-color;
@include box-shadow($custom-control-indicator-active-box-shadow);
}
@@ -59,34 +69,33 @@
.custom-control-label {
position: relative;
margin-bottom: 0;
+ vertical-align: top;
// Background-color and (when enabled) gradient
&::before {
position: absolute;
- top: (($font-size-base * $line-height-base - $custom-control-indicator-size) / 2);
- left: -$custom-control-gutter;
+ top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
+ left: -($custom-control-gutter + $custom-control-indicator-size);
display: block;
width: $custom-control-indicator-size;
height: $custom-control-indicator-size;
pointer-events: none;
content: "";
- user-select: none;
background-color: $custom-control-indicator-bg;
+ border: $custom-control-indicator-border-color solid $custom-control-indicator-border-width;
@include box-shadow($custom-control-indicator-box-shadow);
}
// Foreground (icon)
&::after {
position: absolute;
- top: (($font-size-base * $line-height-base - $custom-control-indicator-size) / 2);
- left: -$custom-control-gutter;
+ top: ($font-size-base * $line-height-base - $custom-control-indicator-size) / 2;
+ left: -($custom-control-gutter + $custom-control-indicator-size);
display: block;
width: $custom-control-indicator-size;
height: $custom-control-indicator-size;
content: "";
- background-repeat: no-repeat;
- background-position: center center;
- background-size: $custom-control-indicator-bg-size;
+ background: no-repeat 50% / #{$custom-control-indicator-bg-size};
}
}
@@ -101,9 +110,6 @@
}
.custom-control-input:checked ~ .custom-control-label {
- &::before {
- @include gradient-bg($custom-control-indicator-checked-bg);
- }
&::after {
background-image: $custom-checkbox-indicator-icon-checked;
}
@@ -111,6 +117,7 @@
.custom-control-input:indeterminate ~ .custom-control-label {
&::before {
+ border-color: $custom-checkbox-indicator-indeterminate-border-color;
@include gradient-bg($custom-checkbox-indicator-indeterminate-bg);
@include box-shadow($custom-checkbox-indicator-indeterminate-box-shadow);
}
@@ -135,15 +142,56 @@
.custom-radio {
.custom-control-label::before {
+ // stylelint-disable-next-line property-blacklist
border-radius: $custom-radio-indicator-border-radius;
}
.custom-control-input:checked ~ .custom-control-label {
+ &::after {
+ background-image: $custom-radio-indicator-icon-checked;
+ }
+ }
+
+ .custom-control-input:disabled {
+ &:checked ~ .custom-control-label::before {
+ background-color: $custom-control-indicator-checked-disabled-bg;
+ }
+ }
+}
+
+
+// switches
+//
+// Tweak a few things for switches
+
+.custom-switch {
+ padding-left: $custom-switch-width + $custom-control-gutter;
+
+ .custom-control-label {
&::before {
- @include gradient-bg($custom-control-indicator-checked-bg);
+ left: -($custom-switch-width + $custom-control-gutter);
+ width: $custom-switch-width;
+ pointer-events: all;
+ // stylelint-disable-next-line property-blacklist
+ border-radius: $custom-switch-indicator-border-radius;
+ }
+
+ &::after {
+ top: calc(#{(($font-size-base * $line-height-base - $custom-control-indicator-size) / 2)} + #{$custom-control-indicator-border-width * 2});
+ left: calc(#{-($custom-switch-width + $custom-control-gutter)} + #{$custom-control-indicator-border-width * 2});
+ width: $custom-switch-indicator-size;
+ height: $custom-switch-indicator-size;
+ background-color: $custom-control-indicator-border-color;
+ // stylelint-disable-next-line property-blacklist
+ border-radius: $custom-switch-indicator-border-radius;
+ @include transition(transform .15s ease-in-out, $custom-forms-transition);
}
+ }
+
+ .custom-control-input:checked ~ .custom-control-label {
&::after {
- background-image: $custom-radio-indicator-icon-checked;
+ background-color: $custom-control-indicator-bg;
+ transform: translateX($custom-switch-width - $custom-control-indicator-size);
}
}
@@ -166,17 +214,16 @@
width: 100%;
height: $custom-select-height;
padding: $custom-select-padding-y ($custom-select-padding-x + $custom-select-indicator-padding) $custom-select-padding-y $custom-select-padding-x;
+ font-family: $custom-select-font-family;
+ @include font-size($custom-select-font-size);
+ font-weight: $custom-select-font-weight;
line-height: $custom-select-line-height;
color: $custom-select-color;
vertical-align: middle;
- background: $custom-select-bg $custom-select-indicator no-repeat right $custom-select-padding-x center;
- background-size: $custom-select-bg-size;
+ background: $custom-select-background;
+ background-color: $custom-select-bg;
border: $custom-select-border-width solid $custom-select-border-color;
- @if $enable-rounded {
- border-radius: $custom-select-border-radius;
- } @else {
- border-radius: 0;
- }
+ @include border-radius($custom-select-border-radius, 0);
@include box-shadow($custom-select-box-shadow);
appearance: none;
@@ -214,22 +261,24 @@
// Hides the default caret in IE11
&::-ms-expand {
- opacity: 0;
+ display: none;
}
}
.custom-select-sm {
height: $custom-select-height-sm;
- padding-top: $custom-select-padding-y;
- padding-bottom: $custom-select-padding-y;
- font-size: $custom-select-font-size-sm;
+ padding-top: $custom-select-padding-y-sm;
+ padding-bottom: $custom-select-padding-y-sm;
+ padding-left: $custom-select-padding-x-sm;
+ @include font-size($custom-select-font-size-sm);
}
.custom-select-lg {
height: $custom-select-height-lg;
- padding-top: $custom-select-padding-y;
- padding-bottom: $custom-select-padding-y;
- font-size: $custom-select-font-size-lg;
+ padding-top: $custom-select-padding-y-lg;
+ padding-bottom: $custom-select-padding-y-lg;
+ padding-left: $custom-select-padding-x-lg;
+ @include font-size($custom-select-font-size-lg);
}
@@ -256,10 +305,6 @@
&:focus ~ .custom-file-label {
border-color: $custom-file-focus-border-color;
box-shadow: $custom-file-focus-box-shadow;
-
- &::after {
- border-color: $custom-file-focus-border-color;
- }
}
&:disabled ~ .custom-file-label {
@@ -271,6 +316,10 @@
content: $value;
}
}
+
+ ~ .custom-file-label[data-browse]::after {
+ content: attr(data-browse);
+ }
}
.custom-file-label {
@@ -281,6 +330,8 @@
z-index: 1;
height: $custom-file-height;
padding: $custom-file-padding-y $custom-file-padding-x;
+ font-family: $custom-file-font-family;
+ font-weight: $custom-file-font-weight;
line-height: $custom-file-line-height;
color: $custom-file-color;
background-color: $custom-file-bg;
@@ -301,7 +352,7 @@
color: $custom-file-button-color;
content: "Browse";
@include gradient-bg($custom-file-button-bg);
- border-left: $custom-file-border-width solid $custom-file-border-color;
+ border-left: inherit;
@include border-radius(0 $custom-file-border-radius $custom-file-border-radius 0);
}
}
@@ -314,14 +365,15 @@
.custom-range {
width: 100%;
- padding-left: 0; // Firefox specific
+ height: calc(#{$custom-range-thumb-height} + #{$custom-range-thumb-focus-box-shadow-width * 2});
+ padding: 0; // Need to reset padding
background-color: transparent;
appearance: none;
&:focus {
outline: none;
- // Pseudo-elements must be split across multiple rulesets to have an affect.
+ // Pseudo-elements must be split across multiple rulesets to have an effect.
// No box-shadow() mixin for focus accessibility.
&::-webkit-slider-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
&::-moz-range-thumb { box-shadow: $custom-range-thumb-focus-box-shadow; }
@@ -335,7 +387,7 @@
&::-webkit-slider-thumb {
width: $custom-range-thumb-width;
height: $custom-range-thumb-height;
- margin-top: (($custom-range-track-height - $custom-range-thumb-height) / 2); // Webkit specific
+ margin-top: ($custom-range-track-height - $custom-range-thumb-height) / 2; // Webkit specific
@include gradient-bg($custom-range-thumb-bg);
border: $custom-range-thumb-border;
@include border-radius($custom-range-thumb-border-radius);
@@ -410,7 +462,7 @@
cursor: $custom-range-track-cursor;
background-color: transparent;
border-color: transparent;
- border-width: ($custom-range-thumb-height * .5);
+ border-width: $custom-range-thumb-height / 2;
@include box-shadow($custom-range-track-box-shadow);
}
@@ -424,6 +476,28 @@
background-color: $custom-range-track-bg;
@include border-radius($custom-range-track-border-radius);
}
+
+ &:disabled {
+ &::-webkit-slider-thumb {
+ background-color: $custom-range-thumb-disabled-bg;
+ }
+
+ &::-webkit-slider-runnable-track {
+ cursor: default;
+ }
+
+ &::-moz-range-thumb {
+ background-color: $custom-range-thumb-disabled-bg;
+ }
+
+ &::-moz-range-track {
+ cursor: default;
+ }
+
+ &::-ms-thumb {
+ background-color: $custom-range-thumb-disabled-bg;
+ }
+ }
}
.custom-control-label::before,