bootstrap 4.4.1 → 5.0.1
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 +13 -2
- data/README.md +7 -4
- data/assets/javascripts/bootstrap-global-this-define.js +6 -0
- data/assets/javascripts/bootstrap-global-this-undefine.js +2 -0
- data/assets/javascripts/bootstrap-sprockets.js +15 -8
- data/assets/javascripts/bootstrap.js +3244 -2770
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/javascripts/bootstrap/alert.js +130 -124
- data/assets/javascripts/bootstrap/base-component.js +168 -0
- data/assets/javascripts/bootstrap/button.js +85 -179
- data/assets/javascripts/bootstrap/carousel.js +430 -405
- data/assets/javascripts/bootstrap/collapse.js +325 -264
- data/assets/javascripts/bootstrap/dom/data.js +68 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +315 -0
- data/assets/javascripts/bootstrap/dom/manipulator.js +88 -0
- data/assets/javascripts/bootstrap/dom/selector-engine.js +85 -0
- data/assets/javascripts/bootstrap/dropdown.js +464 -400
- data/assets/javascripts/bootstrap/modal.js +604 -464
- data/assets/javascripts/bootstrap/offcanvas.js +671 -0
- data/assets/javascripts/bootstrap/popover.js +119 -192
- data/assets/javascripts/bootstrap/scrollspy.js +250 -238
- data/assets/javascripts/bootstrap/tab.js +189 -151
- data/assets/javascripts/bootstrap/toast.js +215 -192
- data/assets/javascripts/bootstrap/tooltip.js +604 -544
- data/assets/stylesheets/_bootstrap-grid.scss +54 -18
- data/assets/stylesheets/_bootstrap-reboot.scss +7 -4
- data/assets/stylesheets/_bootstrap.scss +19 -11
- data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
- data/assets/stylesheets/bootstrap/_alert.scss +15 -9
- data/assets/stylesheets/bootstrap/_badge.scss +2 -27
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +4 -18
- data/assets/stylesheets/bootstrap/_button-group.scss +21 -45
- data/assets/stylesheets/bootstrap/_buttons.scss +27 -55
- data/assets/stylesheets/bootstrap/_card.scss +43 -106
- data/assets/stylesheets/bootstrap/_carousel.scss +65 -33
- data/assets/stylesheets/bootstrap/_close.scss +30 -31
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +87 -38
- data/assets/stylesheets/bootstrap/_forms.scss +9 -338
- data/assets/stylesheets/bootstrap/_functions.scss +99 -28
- data/assets/stylesheets/bootstrap/_grid.scss +3 -50
- data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
- data/assets/stylesheets/bootstrap/_list-group.scss +38 -22
- data/assets/stylesheets/bootstrap/_mixins.scss +8 -13
- data/assets/stylesheets/bootstrap/_modal.scss +45 -65
- data/assets/stylesheets/bootstrap/_nav.scss +28 -9
- data/assets/stylesheets/bootstrap/_navbar.scss +51 -69
- data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +11 -20
- data/assets/stylesheets/bootstrap/_popover.scss +15 -27
- data/assets/stylesheets/bootstrap/_progress.scss +6 -4
- data/assets/stylesheets/bootstrap/_reboot.scss +339 -200
- data/assets/stylesheets/bootstrap/_root.scss +5 -9
- data/assets/stylesheets/bootstrap/_spinners.scss +21 -7
- data/assets/stylesheets/bootstrap/_tables.scss +80 -114
- data/assets/stylesheets/bootstrap/_toasts.scss +21 -14
- data/assets/stylesheets/bootstrap/_tooltip.scss +17 -17
- data/assets/stylesheets/bootstrap/_transitions.scss +2 -1
- data/assets/stylesheets/bootstrap/_type.scss +38 -59
- data/assets/stylesheets/bootstrap/_utilities.scss +594 -17
- data/assets/stylesheets/bootstrap/_variables.scss +810 -489
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +61 -0
- data/assets/stylesheets/bootstrap/forms/_form-check.scss +152 -0
- data/assets/stylesheets/bootstrap/forms/_form-control.scss +219 -0
- data/assets/stylesheets/bootstrap/forms/_form-range.scss +91 -0
- data/assets/stylesheets/bootstrap/forms/_form-select.scss +67 -0
- data/assets/stylesheets/bootstrap/forms/_form-text.scss +11 -0
- data/assets/stylesheets/bootstrap/forms/_input-group.scss +121 -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/_position.scss +30 -0
- data/assets/stylesheets/bootstrap/helpers/_ratio.scss +26 -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/helpers/_visually-hidden.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +3 -5
- data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +37 -22
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +7 -9
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +14 -10
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +75 -52
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +10 -8
- data/assets/stylesheets/bootstrap/mixins/_clearfix.scss +2 -0
- data/assets/stylesheets/bootstrap/mixins/_color-scheme.scss +7 -0
- data/assets/stylesheets/bootstrap/mixins/_container.scss +9 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +42 -75
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +90 -34
- data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +17 -8
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +18 -8
- data/assets/stylesheets/bootstrap/mixins/_utilities.scss +68 -0
- data/assets/stylesheets/bootstrap/mixins/_visually-hidden.scss +29 -0
- data/assets/stylesheets/bootstrap/utilities/_api.scss +47 -0
- data/assets/stylesheets/bootstrap/vendor/_rfs.scss +234 -126
- data/bootstrap.gemspec +1 -3
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +20 -5
- data/tasks/updater/network.rb +8 -2
- data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
- data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
- data/test/dummy_rails/app/views/pages/root.html +89 -0
- data/test/dummy_rails/config/application.rb +0 -3
- data/test/gemfiles/rails_6_0.gemfile +7 -0
- data/test/gemfiles/rails_6_1.gemfile +7 -0
- metadata +48 -73
- data/assets/javascripts/bootstrap/util.js +0 -188
- data/assets/stylesheets/bootstrap/_code.scss +0 -48
- data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -521
- data/assets/stylesheets/bootstrap/_input-group.scss +0 -191
- 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 -22
- 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 -71
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -34
- 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 -17
- 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
- data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
|
@@ -1,13 +1,11 @@
|
|
|
1
|
+
// scss-docs-start alert-variant-mixin
|
|
1
2
|
@mixin alert-variant($background, $border, $color) {
|
|
2
3
|
color: $color;
|
|
3
4
|
@include gradient-bg($background);
|
|
4
5
|
border-color: $border;
|
|
5
6
|
|
|
6
|
-
hr {
|
|
7
|
-
border-top-color: darken($border, 5%);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
7
|
.alert-link {
|
|
11
|
-
color:
|
|
8
|
+
color: shade-color($color, 20%);
|
|
12
9
|
}
|
|
13
10
|
}
|
|
11
|
+
// scss-docs-end alert-variant-mixin
|
|
@@ -1,63 +1,78 @@
|
|
|
1
|
-
// stylelint-disable property-
|
|
1
|
+
// stylelint-disable property-disallowed-list
|
|
2
2
|
// Single side border-radius
|
|
3
3
|
|
|
4
|
+
// Helper function to replace negative values with 0
|
|
5
|
+
@function valid-radius($radius) {
|
|
6
|
+
$return: ();
|
|
7
|
+
@each $value in $radius {
|
|
8
|
+
@if type-of($value) == number {
|
|
9
|
+
$return: append($return, max($value, 0));
|
|
10
|
+
} @else {
|
|
11
|
+
$return: append($return, $value);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
@return $return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// scss-docs-start border-radius-mixins
|
|
4
18
|
@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
|
|
5
19
|
@if $enable-rounded {
|
|
6
|
-
border-radius: $radius;
|
|
20
|
+
border-radius: valid-radius($radius);
|
|
7
21
|
}
|
|
8
22
|
@else if $fallback-border-radius != false {
|
|
9
23
|
border-radius: $fallback-border-radius;
|
|
10
24
|
}
|
|
11
25
|
}
|
|
12
26
|
|
|
13
|
-
@mixin border-top-radius($radius) {
|
|
27
|
+
@mixin border-top-radius($radius: $border-radius) {
|
|
14
28
|
@if $enable-rounded {
|
|
15
|
-
border-top-left-radius: $radius;
|
|
16
|
-
border-top-right-radius: $radius;
|
|
29
|
+
border-top-left-radius: valid-radius($radius);
|
|
30
|
+
border-top-right-radius: valid-radius($radius);
|
|
17
31
|
}
|
|
18
32
|
}
|
|
19
33
|
|
|
20
|
-
@mixin border-
|
|
34
|
+
@mixin border-end-radius($radius: $border-radius) {
|
|
21
35
|
@if $enable-rounded {
|
|
22
|
-
border-top-right-radius: $radius;
|
|
23
|
-
border-bottom-right-radius: $radius;
|
|
36
|
+
border-top-right-radius: valid-radius($radius);
|
|
37
|
+
border-bottom-right-radius: valid-radius($radius);
|
|
24
38
|
}
|
|
25
39
|
}
|
|
26
40
|
|
|
27
|
-
@mixin border-bottom-radius($radius) {
|
|
41
|
+
@mixin border-bottom-radius($radius: $border-radius) {
|
|
28
42
|
@if $enable-rounded {
|
|
29
|
-
border-bottom-right-radius: $radius;
|
|
30
|
-
border-bottom-left-radius: $radius;
|
|
43
|
+
border-bottom-right-radius: valid-radius($radius);
|
|
44
|
+
border-bottom-left-radius: valid-radius($radius);
|
|
31
45
|
}
|
|
32
46
|
}
|
|
33
47
|
|
|
34
|
-
@mixin border-
|
|
48
|
+
@mixin border-start-radius($radius: $border-radius) {
|
|
35
49
|
@if $enable-rounded {
|
|
36
|
-
border-top-left-radius: $radius;
|
|
37
|
-
border-bottom-left-radius: $radius;
|
|
50
|
+
border-top-left-radius: valid-radius($radius);
|
|
51
|
+
border-bottom-left-radius: valid-radius($radius);
|
|
38
52
|
}
|
|
39
53
|
}
|
|
40
54
|
|
|
41
|
-
@mixin border-top-
|
|
55
|
+
@mixin border-top-start-radius($radius: $border-radius) {
|
|
42
56
|
@if $enable-rounded {
|
|
43
|
-
border-top-left-radius: $radius;
|
|
57
|
+
border-top-left-radius: valid-radius($radius);
|
|
44
58
|
}
|
|
45
59
|
}
|
|
46
60
|
|
|
47
|
-
@mixin border-top-
|
|
61
|
+
@mixin border-top-end-radius($radius: $border-radius) {
|
|
48
62
|
@if $enable-rounded {
|
|
49
|
-
border-top-right-radius: $radius;
|
|
63
|
+
border-top-right-radius: valid-radius($radius);
|
|
50
64
|
}
|
|
51
65
|
}
|
|
52
66
|
|
|
53
|
-
@mixin border-bottom-
|
|
67
|
+
@mixin border-bottom-end-radius($radius: $border-radius) {
|
|
54
68
|
@if $enable-rounded {
|
|
55
|
-
border-bottom-right-radius: $radius;
|
|
69
|
+
border-bottom-right-radius: valid-radius($radius);
|
|
56
70
|
}
|
|
57
71
|
}
|
|
58
72
|
|
|
59
|
-
@mixin border-bottom-
|
|
73
|
+
@mixin border-bottom-start-radius($radius: $border-radius) {
|
|
60
74
|
@if $enable-rounded {
|
|
61
|
-
border-bottom-left-radius: $radius;
|
|
75
|
+
border-bottom-left-radius: valid-radius($radius);
|
|
62
76
|
}
|
|
63
77
|
}
|
|
78
|
+
// scss-docs-end border-radius-mixins
|
|
@@ -2,17 +2,15 @@
|
|
|
2
2
|
@if $enable-shadows {
|
|
3
3
|
$result: ();
|
|
4
4
|
|
|
5
|
-
@
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
@if nth($shadow, $i) != "none" {
|
|
12
|
-
$result: append($result, nth($shadow, $i), "comma");
|
|
13
|
-
}
|
|
5
|
+
@each $value in $shadow {
|
|
6
|
+
@if $value != null {
|
|
7
|
+
$result: append($result, $value, "comma");
|
|
8
|
+
}
|
|
9
|
+
@if $value == none and length($shadow) > 1 {
|
|
10
|
+
@warn "The keyword 'none' must be used as a single argument.";
|
|
14
11
|
}
|
|
15
12
|
}
|
|
13
|
+
|
|
16
14
|
@if (length($result) > 0) {
|
|
17
15
|
box-shadow: $result;
|
|
18
16
|
}
|
|
@@ -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.
|
|
@@ -104,8 +107,9 @@
|
|
|
104
107
|
// No minimum for the smallest breakpoint, and no maximum for the largest one.
|
|
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
|
-
$min:
|
|
108
|
-
$
|
|
110
|
+
$min: breakpoint-min($name, $breakpoints);
|
|
111
|
+
$next: breakpoint-next($name, $breakpoints);
|
|
112
|
+
$max: breakpoint-max($next);
|
|
109
113
|
|
|
110
114
|
@if $min != null and $max != null {
|
|
111
115
|
@media (min-width: $min) and (max-width: $max) {
|
|
@@ -116,7 +120,7 @@
|
|
|
116
120
|
@content;
|
|
117
121
|
}
|
|
118
122
|
} @else if $min == null {
|
|
119
|
-
@include media-breakpoint-down($
|
|
123
|
+
@include media-breakpoint-down($next, $breakpoints) {
|
|
120
124
|
@content;
|
|
121
125
|
}
|
|
122
126
|
}
|
|
@@ -3,108 +3,131 @@
|
|
|
3
3
|
// Easily pump out default styles, as well as :hover, :focus, :active,
|
|
4
4
|
// and disabled options for all buttons
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
// scss-docs-start btn-variant-mixin
|
|
7
|
+
@mixin button-variant(
|
|
8
|
+
$background,
|
|
9
|
+
$border,
|
|
10
|
+
$color: color-contrast($background),
|
|
11
|
+
$hover-background: if($color == $color-contrast-light, shade-color($background, $btn-hover-bg-shade-amount), tint-color($background, $btn-hover-bg-tint-amount)),
|
|
12
|
+
$hover-border: if($color == $color-contrast-light, shade-color($border, $btn-hover-border-shade-amount), tint-color($border, $btn-hover-border-tint-amount)),
|
|
13
|
+
$hover-color: color-contrast($hover-background),
|
|
14
|
+
$active-background: if($color == $color-contrast-light, shade-color($background,$btn-active-bg-shade-amount), tint-color($background, $btn-active-bg-tint-amount)),
|
|
15
|
+
$active-border: if($color == $color-contrast-light, shade-color($border, $btn-active-border-shade-amount), tint-color($border, $btn-active-border-tint-amount)),
|
|
16
|
+
$active-color: color-contrast($active-background),
|
|
17
|
+
$disabled-background: $background,
|
|
18
|
+
$disabled-border: $border,
|
|
19
|
+
$disabled-color: color-contrast($disabled-background)
|
|
20
|
+
) {
|
|
21
|
+
color: $color;
|
|
8
22
|
@include gradient-bg($background);
|
|
9
23
|
border-color: $border;
|
|
10
24
|
@include box-shadow($btn-box-shadow);
|
|
11
25
|
|
|
12
|
-
|
|
13
|
-
color:
|
|
26
|
+
&:hover {
|
|
27
|
+
color: $hover-color;
|
|
14
28
|
@include gradient-bg($hover-background);
|
|
15
29
|
border-color: $hover-border;
|
|
16
30
|
}
|
|
17
31
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
color:
|
|
32
|
+
.btn-check:focus + &,
|
|
33
|
+
&:focus {
|
|
34
|
+
color: $hover-color;
|
|
21
35
|
@include gradient-bg($hover-background);
|
|
22
36
|
border-color: $hover-border;
|
|
23
|
-
// Avoid using mixin so we can pass custom focus shadow properly
|
|
24
37
|
@if $enable-shadows {
|
|
25
|
-
box-shadow
|
|
38
|
+
@include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
|
|
26
39
|
} @else {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Disabled comes first so active can properly restyle
|
|
32
|
-
&.disabled,
|
|
33
|
-
&:disabled {
|
|
34
|
-
color: color-yiq($background);
|
|
35
|
-
background-color: $background;
|
|
36
|
-
border-color: $border;
|
|
37
|
-
// Remove CSS gradients if they're enabled
|
|
38
|
-
@if $enable-gradients {
|
|
39
|
-
background-image: none;
|
|
40
|
+
// Avoid using mixin so we can pass custom focus shadow properly
|
|
41
|
+
box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
+
.btn-check:checked + &,
|
|
46
|
+
.btn-check:active + &,
|
|
47
|
+
&:active,
|
|
48
|
+
&.active,
|
|
45
49
|
.show > &.dropdown-toggle {
|
|
46
|
-
color:
|
|
50
|
+
color: $active-color;
|
|
47
51
|
background-color: $active-background;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
52
|
+
// Remove CSS gradients if they're enabled
|
|
53
|
+
background-image: if($enable-gradients, none, null);
|
|
51
54
|
border-color: $active-border;
|
|
52
55
|
|
|
53
56
|
&:focus {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5);
|
|
57
|
+
@if $enable-shadows {
|
|
58
|
+
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
|
|
57
59
|
} @else {
|
|
58
|
-
|
|
60
|
+
// Avoid using mixin so we can pass custom focus shadow properly
|
|
61
|
+
box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
|
|
59
62
|
}
|
|
60
63
|
}
|
|
61
64
|
}
|
|
65
|
+
|
|
66
|
+
&:disabled,
|
|
67
|
+
&.disabled {
|
|
68
|
+
color: $disabled-color;
|
|
69
|
+
background-color: $disabled-background;
|
|
70
|
+
// Remove CSS gradients if they're enabled
|
|
71
|
+
background-image: if($enable-gradients, none, null);
|
|
72
|
+
border-color: $disabled-border;
|
|
73
|
+
}
|
|
62
74
|
}
|
|
75
|
+
// scss-docs-end btn-variant-mixin
|
|
63
76
|
|
|
64
|
-
|
|
77
|
+
// scss-docs-start btn-outline-variant-mixin
|
|
78
|
+
@mixin button-outline-variant(
|
|
79
|
+
$color,
|
|
80
|
+
$color-hover: color-contrast($color),
|
|
81
|
+
$active-background: $color,
|
|
82
|
+
$active-border: $color,
|
|
83
|
+
$active-color: color-contrast($active-background)
|
|
84
|
+
) {
|
|
65
85
|
color: $color;
|
|
66
86
|
border-color: $color;
|
|
67
87
|
|
|
68
|
-
|
|
88
|
+
&:hover {
|
|
69
89
|
color: $color-hover;
|
|
70
90
|
background-color: $active-background;
|
|
71
91
|
border-color: $active-border;
|
|
72
92
|
}
|
|
73
93
|
|
|
74
|
-
|
|
75
|
-
|
|
94
|
+
.btn-check:focus + &,
|
|
95
|
+
&:focus {
|
|
76
96
|
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
|
|
77
97
|
}
|
|
78
98
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
&:not(:disabled):not(.disabled):active,
|
|
86
|
-
&:not(:disabled):not(.disabled).active,
|
|
87
|
-
.show > &.dropdown-toggle {
|
|
88
|
-
color: color-yiq($active-background);
|
|
99
|
+
.btn-check:checked + &,
|
|
100
|
+
.btn-check:active + &,
|
|
101
|
+
&:active,
|
|
102
|
+
&.active,
|
|
103
|
+
&.dropdown-toggle.show {
|
|
104
|
+
color: $active-color;
|
|
89
105
|
background-color: $active-background;
|
|
90
106
|
border-color: $active-border;
|
|
91
107
|
|
|
92
108
|
&:focus {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5);
|
|
109
|
+
@if $enable-shadows {
|
|
110
|
+
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
|
|
96
111
|
} @else {
|
|
112
|
+
// Avoid using mixin so we can pass custom focus shadow properly
|
|
97
113
|
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
|
|
98
114
|
}
|
|
99
115
|
}
|
|
100
116
|
}
|
|
117
|
+
|
|
118
|
+
&:disabled,
|
|
119
|
+
&.disabled {
|
|
120
|
+
color: $color;
|
|
121
|
+
background-color: transparent;
|
|
122
|
+
}
|
|
101
123
|
}
|
|
124
|
+
// scss-docs-end btn-outline-variant-mixin
|
|
102
125
|
|
|
103
|
-
//
|
|
104
|
-
@mixin button-size($padding-y, $padding-x, $font-size, $
|
|
126
|
+
// scss-docs-start btn-size-mixin
|
|
127
|
+
@mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
|
|
105
128
|
padding: $padding-y $padding-x;
|
|
106
129
|
@include font-size($font-size);
|
|
107
|
-
line-height: $line-height;
|
|
108
130
|
// Manually declare to provide an override to the browser default
|
|
109
131
|
@include border-radius($border-radius, 0);
|
|
110
132
|
}
|
|
133
|
+
// scss-docs-end btn-size-mixin
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
// scss-docs-start caret-mixins
|
|
2
|
+
@mixin caret-down {
|
|
2
3
|
border-top: $caret-width solid;
|
|
3
4
|
border-right: $caret-width solid transparent;
|
|
4
5
|
border-bottom: 0;
|
|
5
6
|
border-left: $caret-width solid transparent;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
|
-
@mixin caret-up
|
|
9
|
+
@mixin caret-up {
|
|
9
10
|
border-top: 0;
|
|
10
11
|
border-right: $caret-width solid transparent;
|
|
11
12
|
border-bottom: $caret-width solid;
|
|
12
13
|
border-left: $caret-width solid transparent;
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
@mixin caret-
|
|
16
|
+
@mixin caret-end {
|
|
16
17
|
border-top: $caret-width solid transparent;
|
|
17
18
|
border-right: 0;
|
|
18
19
|
border-bottom: $caret-width solid transparent;
|
|
19
20
|
border-left: $caret-width solid;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
@mixin caret-
|
|
23
|
+
@mixin caret-start {
|
|
23
24
|
border-top: $caret-width solid transparent;
|
|
24
25
|
border-right: $caret-width solid;
|
|
25
26
|
border-bottom: $caret-width solid transparent;
|
|
@@ -36,12 +37,12 @@
|
|
|
36
37
|
@include caret-down();
|
|
37
38
|
} @else if $direction == up {
|
|
38
39
|
@include caret-up();
|
|
39
|
-
} @else if $direction ==
|
|
40
|
-
@include caret-
|
|
40
|
+
} @else if $direction == end {
|
|
41
|
+
@include caret-end();
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
@if $direction ==
|
|
45
|
+
@if $direction == start {
|
|
45
46
|
&::after {
|
|
46
47
|
display: none;
|
|
47
48
|
}
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
margin-right: $caret-spacing;
|
|
52
53
|
vertical-align: $caret-vertical-align;
|
|
53
54
|
content: "";
|
|
54
|
-
@include caret-
|
|
55
|
+
@include caret-start();
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
|
|
@@ -60,3 +61,4 @@
|
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
}
|
|
64
|
+
// scss-docs-end caret-mixins
|