bootstrap 4.3.0 → 5.0.0.alpha1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +15 -1
- data/CHANGELOG.md +2 -14
- data/README.md +1 -1
- data/assets/javascripts/bootstrap-sprockets.js +5 -1
- data/assets/javascripts/bootstrap.js +2292 -1514
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/javascripts/bootstrap/alert.js +148 -85
- data/assets/javascripts/bootstrap/button.js +69 -110
- data/assets/javascripts/bootstrap/carousel.js +320 -239
- data/assets/javascripts/bootstrap/collapse.js +300 -177
- data/assets/javascripts/bootstrap/dom/data.js +81 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +311 -0
- data/assets/javascripts/bootstrap/dom/manipulator.js +100 -0
- data/assets/javascripts/bootstrap/dom/polyfill.js +110 -0
- data/assets/javascripts/bootstrap/dom/selector-engine.js +98 -0
- data/assets/javascripts/bootstrap/dropdown.js +282 -265
- data/assets/javascripts/bootstrap/modal.js +348 -231
- data/assets/javascripts/bootstrap/popover.js +80 -105
- data/assets/javascripts/bootstrap/scrollspy.js +173 -138
- data/assets/javascripts/bootstrap/tab.js +180 -115
- data/assets/javascripts/bootstrap/toast.js +188 -132
- data/assets/javascripts/bootstrap/tooltip.js +508 -230
- data/assets/stylesheets/_bootstrap-grid.scss +54 -18
- data/assets/stylesheets/_bootstrap-reboot.scss +7 -4
- data/assets/stylesheets/_bootstrap.scss +17 -11
- data/assets/stylesheets/bootstrap/_alert.scss +3 -3
- data/assets/stylesheets/bootstrap/_badge.scss +2 -27
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +7 -18
- data/assets/stylesheets/bootstrap/_button-group.scss +16 -38
- data/assets/stylesheets/bootstrap/_buttons.scss +26 -39
- data/assets/stylesheets/bootstrap/_card.scss +48 -97
- data/assets/stylesheets/bootstrap/_carousel.scss +16 -18
- data/assets/stylesheets/bootstrap/_close.scss +9 -14
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +13 -9
- data/assets/stylesheets/bootstrap/_forms.scss +9 -330
- data/assets/stylesheets/bootstrap/_functions.scss +141 -24
- data/assets/stylesheets/bootstrap/_grid.scss +4 -34
- data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
- data/assets/stylesheets/bootstrap/_images.scss +2 -2
- data/assets/stylesheets/bootstrap/_list-group.scss +41 -33
- data/assets/stylesheets/bootstrap/_mixins.scss +9 -15
- data/assets/stylesheets/bootstrap/_modal.scss +54 -48
- data/assets/stylesheets/bootstrap/_nav.scss +12 -9
- data/assets/stylesheets/bootstrap/_navbar.scss +54 -56
- data/assets/stylesheets/bootstrap/_pagination.scss +10 -22
- data/assets/stylesheets/bootstrap/_popover.scss +13 -14
- data/assets/stylesheets/bootstrap/_progress.scss +6 -4
- data/assets/stylesheets/bootstrap/_reboot.scss +318 -185
- data/assets/stylesheets/bootstrap/_root.scss +5 -8
- data/assets/stylesheets/bootstrap/_spinners.scss +3 -2
- data/assets/stylesheets/bootstrap/_tables.scss +80 -114
- data/assets/stylesheets/bootstrap/_tooltip.scss +5 -5
- data/assets/stylesheets/bootstrap/_transitions.scss +0 -1
- data/assets/stylesheets/bootstrap/_type.scss +40 -61
- data/assets/stylesheets/bootstrap/_utilities.scss +503 -17
- data/assets/stylesheets/bootstrap/_variables.scss +567 -430
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +142 -0
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +116 -0
- data/assets/stylesheets/bootstrap/forms/_form-file.scss +91 -0
- data/assets/stylesheets/bootstrap/forms/_form-range.scss +136 -0
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +82 -0
- data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +140 -0
- data/assets/stylesheets/bootstrap/forms/_labels.scss +36 -0
- data/assets/stylesheets/bootstrap/forms/_validation.scss +12 -0
- data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +12 -0
- data/assets/stylesheets/bootstrap/helpers/_embed.scss +31 -0
- data/assets/stylesheets/bootstrap/helpers/_position.scss +30 -0
- data/assets/stylesheets/bootstrap/helpers/_screenreaders.scss +8 -0
- data/assets/stylesheets/bootstrap/helpers/_stretched-link.scss +15 -0
- data/assets/stylesheets/bootstrap/helpers/_text-truncation.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +0 -4
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +26 -13
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +11 -8
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +68 -50
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +4 -4
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
- data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +47 -106
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +9 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +99 -29
- data/assets/stylesheets/bootstrap/mixins/_image.scss +0 -20
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +14 -19
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +17 -7
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +49 -0
- data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +230 -130
- data/bootstrap.gemspec +1 -1
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +3 -3
- data/tasks/updater/network.rb +2 -2
- data/test/dummy_rails/app/assets/config/manifest.js +3 -0
- data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
- data/test/gemfiles/rails_6_0.gemfile +7 -0
- data/test/support/dummy_rails_integration.rb +3 -1
- data/test/test_helper.rb +18 -13
- metadata +40 -42
- data/assets/javascripts/bootstrap/util.js +0 -171
- data/assets/stylesheets/bootstrap/_code.scss +0 -48
- data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -507
- data/assets/stylesheets/bootstrap/_input-group.scss +0 -193
- data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
- data/assets/stylesheets/bootstrap/_media.scss +0 -8
- data/assets/stylesheets/bootstrap/_print.scss +0 -141
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -21
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -17
- data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -14
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -66
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
- data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -7
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -39
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -16
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -8
- data/assets/stylesheets/bootstrap/utilities/_align.scss +0 -8
- data/assets/stylesheets/bootstrap/utilities/_background.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_borders.scss +0 -75
- data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -26
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -39
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
- data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_overflow.scss +0 -5
- data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -32
- data/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +0 -11
- data/assets/stylesheets/bootstrap/utilities/_shadows.scss +0 -6
- data/assets/stylesheets/bootstrap/utilities/_sizing.scss +0 -20
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -73
- data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +0 -19
- data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -72
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -13
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
// md
|
|
17
17
|
@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
|
|
18
18
|
$n: index($breakpoint-names, $name);
|
|
19
|
-
@
|
|
19
|
+
@if not $n {
|
|
20
|
+
@error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
|
|
21
|
+
}
|
|
22
|
+
@return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
|
|
@@ -28,18 +31,18 @@
|
|
|
28
31
|
@return if($min != 0, $min, null);
|
|
29
32
|
}
|
|
30
33
|
|
|
31
|
-
// Maximum breakpoint width.
|
|
32
|
-
// The maximum value is
|
|
33
|
-
//
|
|
34
|
+
// Maximum breakpoint width.
|
|
35
|
+
// The maximum value is reduced by 0.02px to work around the limitations of
|
|
36
|
+
// `min-` and `max-` prefixes and viewports with fractional widths.
|
|
34
37
|
// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max
|
|
35
38
|
// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
|
|
36
39
|
// See https://bugs.webkit.org/show_bug.cgi?id=178261
|
|
37
40
|
//
|
|
38
|
-
// >> breakpoint-max(
|
|
41
|
+
// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
|
39
42
|
// 767.98px
|
|
40
43
|
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
|
|
41
|
-
$
|
|
42
|
-
@return if($
|
|
44
|
+
$max: map-get($breakpoints, $name);
|
|
45
|
+
@return if($max and $max > 0, $max - .02, null);
|
|
43
46
|
}
|
|
44
47
|
|
|
45
48
|
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
|
|
@@ -105,7 +108,7 @@
|
|
|
105
108
|
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
|
|
106
109
|
@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {
|
|
107
110
|
$min: breakpoint-min($name, $breakpoints);
|
|
108
|
-
$max: breakpoint-max($name, $breakpoints);
|
|
111
|
+
$max: breakpoint-max(breakpoint-next($name, $breakpoints));
|
|
109
112
|
|
|
110
113
|
@if $min != null and $max != null {
|
|
111
114
|
@media (min-width: $min) and (max-width: $max) {
|
|
@@ -3,105 +3,123 @@
|
|
|
3
3
|
// Easily pump out default styles, as well as :hover, :focus, :active,
|
|
4
4
|
// and disabled options for all buttons
|
|
5
5
|
|
|
6
|
-
@mixin button-variant(
|
|
7
|
-
|
|
6
|
+
@mixin button-variant(
|
|
7
|
+
$background,
|
|
8
|
+
$border,
|
|
9
|
+
$color: color-contrast($background),
|
|
10
|
+
$hover-background: darken($background, 7.5%),
|
|
11
|
+
$hover-border: darken($border, 10%),
|
|
12
|
+
$hover-color: color-contrast($hover-background),
|
|
13
|
+
$active-background: darken($background, 10%),
|
|
14
|
+
$active-border: darken($border, 12.5%),
|
|
15
|
+
$active-color: color-contrast($active-background)
|
|
16
|
+
) {
|
|
17
|
+
color: $color;
|
|
8
18
|
@include gradient-bg($background);
|
|
9
19
|
border-color: $border;
|
|
10
20
|
@include box-shadow($btn-box-shadow);
|
|
11
21
|
|
|
12
|
-
|
|
13
|
-
color:
|
|
22
|
+
&:hover {
|
|
23
|
+
color: $hover-color;
|
|
14
24
|
@include gradient-bg($hover-background);
|
|
15
25
|
border-color: $hover-border;
|
|
16
26
|
}
|
|
17
27
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
28
|
+
.btn-check:focus + &,
|
|
29
|
+
&:focus {
|
|
30
|
+
color: $hover-color;
|
|
31
|
+
@include gradient-bg($hover-background);
|
|
32
|
+
border-color: $hover-border;
|
|
21
33
|
@if $enable-shadows {
|
|
22
|
-
box-shadow
|
|
34
|
+
@include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
|
|
23
35
|
} @else {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Disabled comes first so active can properly restyle
|
|
29
|
-
&.disabled,
|
|
30
|
-
&:disabled {
|
|
31
|
-
color: color-yiq($background);
|
|
32
|
-
background-color: $background;
|
|
33
|
-
border-color: $border;
|
|
34
|
-
// Remove CSS gradients if they're enabled
|
|
35
|
-
@if $enable-gradients {
|
|
36
|
-
background-image: none;
|
|
36
|
+
// Avoid using mixin so we can pass custom focus shadow properly
|
|
37
|
+
box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
.btn-check:checked + &,
|
|
42
|
+
.btn-check:active + &,
|
|
43
|
+
&:active,
|
|
44
|
+
&.active,
|
|
42
45
|
.show > &.dropdown-toggle {
|
|
43
|
-
color:
|
|
46
|
+
color: $active-color;
|
|
44
47
|
background-color: $active-background;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
+
// Remove CSS gradients if they're enabled
|
|
49
|
+
background-image: if($enable-gradients, none, null);
|
|
48
50
|
border-color: $active-border;
|
|
49
51
|
|
|
50
52
|
&:focus {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
|
53
|
+
@if $enable-shadows {
|
|
54
|
+
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
|
|
54
55
|
} @else {
|
|
55
|
-
|
|
56
|
+
// Avoid using mixin so we can pass custom focus shadow properly
|
|
57
|
+
box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
}
|
|
61
|
+
|
|
62
|
+
&:disabled,
|
|
63
|
+
&.disabled {
|
|
64
|
+
color: $color;
|
|
65
|
+
background-color: $background;
|
|
66
|
+
// Remove CSS gradients if they're enabled
|
|
67
|
+
background-image: if($enable-gradients, none, null);
|
|
68
|
+
border-color: $border;
|
|
69
|
+
}
|
|
59
70
|
}
|
|
60
71
|
|
|
61
|
-
@mixin button-outline-variant(
|
|
72
|
+
@mixin button-outline-variant(
|
|
73
|
+
$color,
|
|
74
|
+
$color-hover: color-contrast($color),
|
|
75
|
+
$active-background: $color,
|
|
76
|
+
$active-border: $color,
|
|
77
|
+
$active-color: color-contrast($active-background)
|
|
78
|
+
) {
|
|
62
79
|
color: $color;
|
|
63
80
|
border-color: $color;
|
|
64
81
|
|
|
65
|
-
|
|
82
|
+
&:hover {
|
|
66
83
|
color: $color-hover;
|
|
67
84
|
background-color: $active-background;
|
|
68
85
|
border-color: $active-border;
|
|
69
86
|
}
|
|
70
87
|
|
|
71
|
-
|
|
72
|
-
|
|
88
|
+
.btn-check:focus + &,
|
|
89
|
+
&:focus {
|
|
73
90
|
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
|
|
74
91
|
}
|
|
75
92
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
&:not(:disabled):not(.disabled):active,
|
|
83
|
-
&:not(:disabled):not(.disabled).active,
|
|
84
|
-
.show > &.dropdown-toggle {
|
|
85
|
-
color: color-yiq($active-background);
|
|
93
|
+
.btn-check:checked + &,
|
|
94
|
+
.btn-check:active + &,
|
|
95
|
+
&:active,
|
|
96
|
+
&.active,
|
|
97
|
+
&.dropdown-toggle.show {
|
|
98
|
+
color: $active-color;
|
|
86
99
|
background-color: $active-background;
|
|
87
100
|
border-color: $active-border;
|
|
88
101
|
|
|
89
102
|
&:focus {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5);
|
|
103
|
+
@if $enable-shadows {
|
|
104
|
+
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
|
|
93
105
|
} @else {
|
|
106
|
+
// Avoid using mixin so we can pass custom focus shadow properly
|
|
94
107
|
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
|
|
95
108
|
}
|
|
96
109
|
}
|
|
97
110
|
}
|
|
111
|
+
|
|
112
|
+
&:disabled,
|
|
113
|
+
&.disabled {
|
|
114
|
+
color: $color;
|
|
115
|
+
background-color: transparent;
|
|
116
|
+
}
|
|
98
117
|
}
|
|
99
118
|
|
|
100
119
|
// Button sizes
|
|
101
|
-
@mixin button-size($padding-y, $padding-x, $font-size, $
|
|
120
|
+
@mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
|
|
102
121
|
padding: $padding-y $padding-x;
|
|
103
122
|
@include font-size($font-size);
|
|
104
|
-
line-height: $line-height;
|
|
105
123
|
// Manually declare to provide an override to the browser default
|
|
106
124
|
@include border-radius($border-radius, 0);
|
|
107
125
|
}
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
vertical-align: $caret-vertical-align;
|
|
34
34
|
content: "";
|
|
35
35
|
@if $direction == down {
|
|
36
|
-
@include caret-down;
|
|
36
|
+
@include caret-down();
|
|
37
37
|
} @else if $direction == up {
|
|
38
|
-
@include caret-up;
|
|
38
|
+
@include caret-up();
|
|
39
39
|
} @else if $direction == right {
|
|
40
|
-
@include caret-right;
|
|
40
|
+
@include caret-right();
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
margin-right: $caret-spacing;
|
|
52
52
|
vertical-align: $caret-vertical-align;
|
|
53
53
|
content: "";
|
|
54
|
-
@include caret-left;
|
|
54
|
+
@include caret-left();
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -1,37 +1,25 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// contrast against a dark gray background.
|
|
13
|
-
@mixin form-control-focus() {
|
|
14
|
-
&:focus {
|
|
15
|
-
color: $input-focus-color;
|
|
16
|
-
background-color: $input-focus-bg;
|
|
17
|
-
border-color: $input-focus-border-color;
|
|
18
|
-
outline: 0;
|
|
19
|
-
// Avoid using mixin so we can pass custom focus shadow properly
|
|
20
|
-
@if $enable-shadows {
|
|
21
|
-
box-shadow: $input-box-shadow, $input-focus-box-shadow;
|
|
22
|
-
} @else {
|
|
23
|
-
box-shadow: $input-focus-box-shadow;
|
|
1
|
+
// This mixin uses an `if()` technique to be compatible with Dart Sass
|
|
2
|
+
// See https://github.com/sass/sass/issues/1873#issuecomment-152293725 for more details
|
|
3
|
+
@mixin form-validation-state-selector($state) {
|
|
4
|
+
@if ($state == "valid" or $state == "invalid") {
|
|
5
|
+
.was-validated #{if(&, "&", "")}:#{$state},
|
|
6
|
+
#{if(&, "&", "")}.is-#{$state} {
|
|
7
|
+
@content;
|
|
8
|
+
}
|
|
9
|
+
} @else {
|
|
10
|
+
#{if(&, "&", "")}.is-#{$state} {
|
|
11
|
+
@content;
|
|
24
12
|
}
|
|
25
13
|
}
|
|
26
14
|
}
|
|
27
15
|
|
|
28
|
-
|
|
29
16
|
@mixin form-validation-state($state, $color, $icon) {
|
|
30
17
|
.#{$state}-feedback {
|
|
31
18
|
display: none;
|
|
32
19
|
width: 100%;
|
|
33
20
|
margin-top: $form-feedback-margin-top;
|
|
34
21
|
@include font-size($form-feedback-font-size);
|
|
22
|
+
font-style: $form-feedback-font-style;
|
|
35
23
|
color: $color;
|
|
36
24
|
}
|
|
37
25
|
|
|
@@ -45,40 +33,40 @@
|
|
|
45
33
|
margin-top: .1rem;
|
|
46
34
|
@include font-size($form-feedback-tooltip-font-size);
|
|
47
35
|
line-height: $form-feedback-tooltip-line-height;
|
|
48
|
-
color: color-
|
|
36
|
+
color: color-contrast($color);
|
|
49
37
|
background-color: rgba($color, $form-feedback-tooltip-opacity);
|
|
50
38
|
@include border-radius($form-feedback-tooltip-border-radius);
|
|
51
39
|
}
|
|
52
40
|
|
|
41
|
+
@include form-validation-state-selector($state) {
|
|
42
|
+
~ .#{$state}-feedback,
|
|
43
|
+
~ .#{$state}-tooltip {
|
|
44
|
+
display: block;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
53
48
|
.form-control {
|
|
54
|
-
|
|
55
|
-
&.is-#{$state} {
|
|
49
|
+
@include form-validation-state-selector($state) {
|
|
56
50
|
border-color: $color;
|
|
57
51
|
|
|
58
52
|
@if $enable-validation-icons {
|
|
59
53
|
padding-right: $input-height-inner;
|
|
60
|
-
background-image: $icon;
|
|
54
|
+
background-image: escape-svg($icon);
|
|
61
55
|
background-repeat: no-repeat;
|
|
62
|
-
background-position:
|
|
56
|
+
background-position: right $input-height-inner-quarter center;
|
|
63
57
|
background-size: $input-height-inner-half $input-height-inner-half;
|
|
64
58
|
}
|
|
65
59
|
|
|
66
60
|
&:focus {
|
|
67
61
|
border-color: $color;
|
|
68
|
-
box-shadow: 0 0 0 $input-focus-width rgba($color,
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
~ .#{$state}-feedback,
|
|
72
|
-
~ .#{$state}-tooltip {
|
|
73
|
-
display: block;
|
|
62
|
+
box-shadow: 0 0 0 $input-focus-width rgba($color, $input-btn-focus-color-opacity);
|
|
74
63
|
}
|
|
75
64
|
}
|
|
76
65
|
}
|
|
77
66
|
|
|
78
67
|
// stylelint-disable-next-line selector-no-qualifying-type
|
|
79
68
|
textarea.form-control {
|
|
80
|
-
|
|
81
|
-
&.is-#{$state} {
|
|
69
|
+
@include form-validation-state-selector($state) {
|
|
82
70
|
@if $enable-validation-icons {
|
|
83
71
|
padding-right: $input-height-inner;
|
|
84
72
|
background-position: top $input-height-inner-quarter right $input-height-inner-quarter;
|
|
@@ -86,103 +74,56 @@
|
|
|
86
74
|
}
|
|
87
75
|
}
|
|
88
76
|
|
|
89
|
-
.
|
|
90
|
-
|
|
91
|
-
&.is-#{$state} {
|
|
77
|
+
.form-select {
|
|
78
|
+
@include form-validation-state-selector($state) {
|
|
92
79
|
border-color: $color;
|
|
93
80
|
|
|
94
81
|
@if $enable-validation-icons {
|
|
95
|
-
padding-right: $
|
|
96
|
-
background: $
|
|
82
|
+
padding-right: $form-select-feedback-icon-padding-right;
|
|
83
|
+
background-image: escape-svg($form-select-indicator), escape-svg($icon);
|
|
84
|
+
background-position: $form-select-bg-position, $form-select-feedback-icon-position;
|
|
85
|
+
background-size: $form-select-bg-size, $form-select-feedback-icon-size;
|
|
97
86
|
}
|
|
98
87
|
|
|
99
88
|
&:focus {
|
|
100
89
|
border-color: $color;
|
|
101
90
|
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
|
102
91
|
}
|
|
103
|
-
|
|
104
|
-
~ .#{$state}-feedback,
|
|
105
|
-
~ .#{$state}-tooltip {
|
|
106
|
-
display: block;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
.form-control-file {
|
|
113
|
-
.was-validated &:#{$state},
|
|
114
|
-
&.is-#{$state} {
|
|
115
|
-
~ .#{$state}-feedback,
|
|
116
|
-
~ .#{$state}-tooltip {
|
|
117
|
-
display: block;
|
|
118
|
-
}
|
|
119
92
|
}
|
|
120
93
|
}
|
|
121
94
|
|
|
122
95
|
.form-check-input {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
~ .form-check-label {
|
|
126
|
-
color: $color;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
~ .#{$state}-feedback,
|
|
130
|
-
~ .#{$state}-tooltip {
|
|
131
|
-
display: block;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.custom-control-input {
|
|
137
|
-
.was-validated &:#{$state},
|
|
138
|
-
&.is-#{$state} {
|
|
139
|
-
~ .custom-control-label {
|
|
140
|
-
color: $color;
|
|
141
|
-
|
|
142
|
-
&::before {
|
|
143
|
-
border-color: $color;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
~ .#{$state}-feedback,
|
|
148
|
-
~ .#{$state}-tooltip {
|
|
149
|
-
display: block;
|
|
150
|
-
}
|
|
96
|
+
@include form-validation-state-selector($state) {
|
|
97
|
+
border-color: $color;
|
|
151
98
|
|
|
152
99
|
&:checked {
|
|
153
|
-
|
|
154
|
-
border-color: lighten($color, 10%);
|
|
155
|
-
@include gradient-bg(lighten($color, 10%));
|
|
156
|
-
}
|
|
100
|
+
background-color: $color;
|
|
157
101
|
}
|
|
158
102
|
|
|
159
103
|
&:focus {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
104
|
+
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
|
105
|
+
}
|
|
163
106
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
107
|
+
~ .form-check-label {
|
|
108
|
+
color: $color;
|
|
167
109
|
}
|
|
168
110
|
}
|
|
169
111
|
}
|
|
112
|
+
.form-check-inline .form-check-input {
|
|
113
|
+
~ .#{$state}-feedback {
|
|
114
|
+
margin-left: .5em;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
170
117
|
|
|
171
118
|
// custom file
|
|
172
|
-
.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
~ .custom-file-label {
|
|
119
|
+
.form-file-input {
|
|
120
|
+
@include form-validation-state-selector($state) {
|
|
121
|
+
~ .form-file-label {
|
|
176
122
|
border-color: $color;
|
|
177
123
|
}
|
|
178
124
|
|
|
179
|
-
~ .#{$state}-feedback,
|
|
180
|
-
~ .#{$state}-tooltip {
|
|
181
|
-
display: block;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
125
|
&:focus {
|
|
185
|
-
~ .
|
|
126
|
+
~ .form-file-label {
|
|
186
127
|
border-color: $color;
|
|
187
128
|
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
|
188
129
|
}
|