bootstrap 4.6.2 → 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/README.md +1 -1
- data/assets/javascripts/bootstrap/alert.js +148 -73
- data/assets/javascripts/bootstrap/button.js +71 -154
- data/assets/javascripts/bootstrap/carousel.js +315 -209
- data/assets/javascripts/bootstrap/collapse.js +307 -153
- 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 +257 -205
- data/assets/javascripts/bootstrap/modal.js +354 -250
- data/assets/javascripts/bootstrap/popover.js +85 -94
- data/assets/javascripts/bootstrap/scrollspy.js +179 -107
- data/assets/javascripts/bootstrap/tab.js +170 -99
- data/assets/javascripts/bootstrap/toast.js +181 -110
- data/assets/javascripts/bootstrap/tooltip.js +375 -226
- data/assets/javascripts/bootstrap-sprockets.js +5 -1
- data/assets/javascripts/bootstrap.js +2260 -1550
- data/assets/javascripts/bootstrap.min.js +3 -3
- data/assets/stylesheets/_bootstrap-grid.scss +53 -18
- data/assets/stylesheets/_bootstrap-reboot.scss +6 -3
- data/assets/stylesheets/_bootstrap.scss +16 -10
- data/assets/stylesheets/bootstrap/_alert.scss +3 -4
- data/assets/stylesheets/bootstrap/_badge.scss +2 -27
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -17
- data/assets/stylesheets/bootstrap/_button-group.scss +16 -38
- data/assets/stylesheets/bootstrap/_buttons.scss +27 -45
- data/assets/stylesheets/bootstrap/_card.scss +22 -68
- data/assets/stylesheets/bootstrap/_carousel.scss +15 -20
- data/assets/stylesheets/bootstrap/_close.scss +9 -13
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +12 -9
- data/assets/stylesheets/bootstrap/_forms.scss +9 -347
- data/assets/stylesheets/bootstrap/_functions.scss +82 -69
- data/assets/stylesheets/bootstrap/_grid.scss +3 -54
- data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
- data/assets/stylesheets/bootstrap/_images.scss +1 -1
- data/assets/stylesheets/bootstrap/_list-group.scss +7 -4
- data/assets/stylesheets/bootstrap/_mixins.scss +6 -12
- data/assets/stylesheets/bootstrap/_modal.scss +36 -41
- data/assets/stylesheets/bootstrap/_nav.scss +7 -9
- data/assets/stylesheets/bootstrap/_navbar.scss +42 -82
- data/assets/stylesheets/bootstrap/_pagination.scss +7 -20
- data/assets/stylesheets/bootstrap/_popover.scss +14 -14
- data/assets/stylesheets/bootstrap/_progress.scss +3 -5
- data/assets/stylesheets/bootstrap/_reboot.scss +304 -172
- data/assets/stylesheets/bootstrap/_root.scss +5 -8
- data/assets/stylesheets/bootstrap/_spinners.scss +8 -17
- data/assets/stylesheets/bootstrap/_tables.scss +80 -114
- data/assets/stylesheets/bootstrap/_toasts.scss +2 -4
- data/assets/stylesheets/bootstrap/_tooltip.scss +9 -9
- data/assets/stylesheets/bootstrap/_transitions.scss +0 -7
- data/assets/stylesheets/bootstrap/_type.scss +38 -59
- data/assets/stylesheets/bootstrap/_utilities.scss +503 -18
- data/assets/stylesheets/bootstrap/_variables.scss +548 -437
- 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 +1 -1
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +11 -8
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +62 -47
- 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 +23 -85
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +9 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +86 -34
- data/assets/stylesheets/bootstrap/mixins/_image.scss +1 -21
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +2 -1
- data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +15 -8
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +3 -3
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +18 -24
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +2 -2
- 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 +214 -130
- data/bootstrap.gemspec +1 -1
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +6 -18
- data/tasks/updater/network.rb +1 -7
- metadata +34 -42
- data/assets/javascripts/bootstrap/util.js +0 -189
- data/assets/stylesheets/bootstrap/_code.scss +0 -48
- data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -526
- data/assets/stylesheets/bootstrap/_input-group.scss +0 -211
- data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -17
- data/assets/stylesheets/bootstrap/_media.scss +0 -8
- data/assets/stylesheets/bootstrap/_print.scss +0 -132
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -23
- 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 -80
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -11
- 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/_interactions.scss +0 -5
- 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
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Base styles
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
.input-group {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-wrap: wrap; // For form validation feedback
|
|
9
|
+
align-items: stretch;
|
|
10
|
+
width: 100%;
|
|
11
|
+
|
|
12
|
+
> .form-control,
|
|
13
|
+
> .form-select,
|
|
14
|
+
> .form-file {
|
|
15
|
+
position: relative; // For focus state's z-index
|
|
16
|
+
flex: 1 1 auto;
|
|
17
|
+
width: 1%;
|
|
18
|
+
min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Bring the "active" form control to the top of surrounding elements
|
|
22
|
+
> .form-control:focus,
|
|
23
|
+
> .form-select:focus,
|
|
24
|
+
> .form-file .form-file-input:focus ~ .form-file-label {
|
|
25
|
+
z-index: 3;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Bring the custom file input above the label
|
|
29
|
+
> .form-file {
|
|
30
|
+
> .form-file-input:focus {
|
|
31
|
+
z-index: 4;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:not(:last-child) > .form-file-label {
|
|
35
|
+
@include border-right-radius(0);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:not(:first-child) > .form-file-label {
|
|
39
|
+
@include border-left-radius(0);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Ensure buttons are always above inputs for more visually pleasing borders.
|
|
44
|
+
// This isn't needed for `.input-group-text` since it shares the same border-color
|
|
45
|
+
// as our inputs.
|
|
46
|
+
.btn {
|
|
47
|
+
position: relative;
|
|
48
|
+
z-index: 2;
|
|
49
|
+
|
|
50
|
+
&:focus {
|
|
51
|
+
z-index: 3;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
// Textual addons
|
|
58
|
+
//
|
|
59
|
+
// Serves as a catch-all element for any text or radio/checkbox input you wish
|
|
60
|
+
// to prepend or append to an input.
|
|
61
|
+
|
|
62
|
+
.input-group-text {
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
padding: $input-padding-y $input-padding-x;
|
|
66
|
+
@include font-size($input-font-size); // Match inputs
|
|
67
|
+
font-weight: $font-weight-normal;
|
|
68
|
+
line-height: $input-line-height;
|
|
69
|
+
color: $input-group-addon-color;
|
|
70
|
+
text-align: center;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
background-color: $input-group-addon-bg;
|
|
73
|
+
border: $input-border-width solid $input-group-addon-border-color;
|
|
74
|
+
@include border-radius($input-border-radius);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
// Sizing
|
|
79
|
+
//
|
|
80
|
+
// Remix the default form control sizing classes into new ones for easier
|
|
81
|
+
// manipulation.
|
|
82
|
+
|
|
83
|
+
.input-group-lg > .form-control {
|
|
84
|
+
min-height: $input-height-lg;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.input-group-lg > .form-select {
|
|
88
|
+
height: $input-height-lg;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.input-group-lg > .form-control,
|
|
92
|
+
.input-group-lg > .form-select,
|
|
93
|
+
.input-group-lg > .input-group-text,
|
|
94
|
+
.input-group-lg > .btn {
|
|
95
|
+
padding: $input-padding-y-lg $input-padding-x-lg;
|
|
96
|
+
@include font-size($input-font-size-lg);
|
|
97
|
+
@include border-radius($input-border-radius-lg);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.input-group-sm > .form-control {
|
|
101
|
+
min-height: $input-height-sm;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.input-group-sm > .form-select {
|
|
105
|
+
height: $input-height-sm;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.input-group-sm > .form-control,
|
|
109
|
+
.input-group-sm > .form-select,
|
|
110
|
+
.input-group-sm > .input-group-text,
|
|
111
|
+
.input-group-sm > .btn {
|
|
112
|
+
padding: $input-padding-y-sm $input-padding-x-sm;
|
|
113
|
+
@include font-size($input-font-size-sm);
|
|
114
|
+
@include border-radius($input-border-radius-sm);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.input-group-lg > .form-select,
|
|
118
|
+
.input-group-sm > .form-select {
|
|
119
|
+
padding-right: $form-select-padding-x + $form-select-indicator-padding;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
// Rounded corners
|
|
124
|
+
//
|
|
125
|
+
// These rulesets must come after the sizing ones to properly override sm and lg
|
|
126
|
+
// border-radius values when extending. They're more specific than we'd like
|
|
127
|
+
// with the `.input-group >` part, but without it, we cannot override the sizing.
|
|
128
|
+
|
|
129
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
|
130
|
+
.input-group {
|
|
131
|
+
> :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu),
|
|
132
|
+
> .dropdown-toggle:nth-last-child(n + 3) {
|
|
133
|
+
@include border-right-radius(0);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
> :not(:first-child):not(.dropdown-menu) {
|
|
137
|
+
margin-left: -$input-border-width;
|
|
138
|
+
@include border-left-radius(0);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Labels
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
.form-label {
|
|
6
|
+
margin-bottom: $form-label-margin-bottom;
|
|
7
|
+
@include font-size($form-label-font-size);
|
|
8
|
+
font-style: $form-label-font-style;
|
|
9
|
+
font-weight: $form-label-font-weight;
|
|
10
|
+
color: $form-label-color;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// For use with horizontal and inline forms, when you need the label (or legend)
|
|
14
|
+
// text to align with the form controls.
|
|
15
|
+
.col-form-label {
|
|
16
|
+
padding-top: add($input-padding-y, $input-border-width);
|
|
17
|
+
padding-bottom: add($input-padding-y, $input-border-width);
|
|
18
|
+
margin-bottom: 0; // Override the `<legend>` default
|
|
19
|
+
@include font-size(inherit); // Override the `<legend>` default
|
|
20
|
+
font-style: $form-label-font-style;
|
|
21
|
+
font-weight: $form-label-font-weight;
|
|
22
|
+
line-height: $input-line-height;
|
|
23
|
+
color: $form-label-color;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.col-form-label-lg {
|
|
27
|
+
padding-top: add($input-padding-y-lg, $input-border-width);
|
|
28
|
+
padding-bottom: add($input-padding-y-lg, $input-border-width);
|
|
29
|
+
@include font-size($input-font-size-lg);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.col-form-label-sm {
|
|
33
|
+
padding-top: add($input-padding-y-sm, $input-border-width);
|
|
34
|
+
padding-bottom: add($input-padding-y-sm, $input-border-width);
|
|
35
|
+
@include font-size($input-font-size-sm);
|
|
36
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// Form validation
|
|
2
|
+
//
|
|
3
|
+
// Provide feedback to users when form field values are valid or invalid. Works
|
|
4
|
+
// primarily for client-side validation via scoped `:invalid` and `:valid`
|
|
5
|
+
// pseudo-classes but also includes `.is-invalid` and `.is-valid` classes for
|
|
6
|
+
// server-side validation.
|
|
7
|
+
|
|
8
|
+
// scss-docs-start form-validation-states-loop
|
|
9
|
+
@each $state, $data in $form-validation-states {
|
|
10
|
+
@include form-validation-state($state, map-get($data, color), map-get($data, icon));
|
|
11
|
+
}
|
|
12
|
+
// scss-docs-end form-validation-states-loop
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Credit: Nicolas Gallagher and SUIT CSS.
|
|
2
|
+
|
|
3
|
+
.embed-responsive {
|
|
4
|
+
position: relative;
|
|
5
|
+
width: 100%;
|
|
6
|
+
|
|
7
|
+
&::before {
|
|
8
|
+
display: block;
|
|
9
|
+
content: "";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.embed-responsive-item,
|
|
13
|
+
iframe,
|
|
14
|
+
embed,
|
|
15
|
+
object,
|
|
16
|
+
video {
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@each $key, $ratio in $embed-responsive-aspect-ratios {
|
|
26
|
+
.embed-responsive-#{$key} {
|
|
27
|
+
&::before {
|
|
28
|
+
padding-top: percentage(map-get($ratio, y) / map-get($ratio, x));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Shorthand
|
|
2
|
+
|
|
3
|
+
.fixed-top {
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
left: 0;
|
|
8
|
+
z-index: $zindex-fixed;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.fixed-bottom {
|
|
12
|
+
position: fixed;
|
|
13
|
+
right: 0;
|
|
14
|
+
bottom: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
z-index: $zindex-fixed;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Responsive sticky top
|
|
20
|
+
@each $breakpoint in map-keys($grid-breakpoints) {
|
|
21
|
+
@include media-breakpoint-up($breakpoint) {
|
|
22
|
+
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
|
23
|
+
|
|
24
|
+
.sticky#{$infix}-top {
|
|
25
|
+
position: sticky;
|
|
26
|
+
top: 0;
|
|
27
|
+
z-index: $zindex-sticky;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -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,94 +3,104 @@
|
|
|
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
|
-
color:
|
|
28
|
+
.btn-check:focus + &,
|
|
29
|
+
&:focus {
|
|
30
|
+
color: $hover-color;
|
|
21
31
|
@include gradient-bg($hover-background);
|
|
22
32
|
border-color: $hover-border;
|
|
23
33
|
@if $enable-shadows {
|
|
24
|
-
@include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color
|
|
34
|
+
@include box-shadow($btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
|
|
25
35
|
} @else {
|
|
26
36
|
// Avoid using mixin so we can pass custom focus shadow properly
|
|
27
|
-
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color
|
|
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;
|
|
37
|
+
box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
.btn-check:checked + &,
|
|
42
|
+
.btn-check:active + &,
|
|
43
|
+
&:active,
|
|
44
|
+
&.active,
|
|
45
45
|
.show > &.dropdown-toggle {
|
|
46
|
-
color:
|
|
46
|
+
color: $active-color;
|
|
47
47
|
background-color: $active-background;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
48
|
+
// Remove CSS gradients if they're enabled
|
|
49
|
+
background-image: if($enable-gradients, none, null);
|
|
51
50
|
border-color: $active-border;
|
|
52
51
|
|
|
53
52
|
&:focus {
|
|
54
|
-
@if $enable-shadows
|
|
55
|
-
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color
|
|
53
|
+
@if $enable-shadows {
|
|
54
|
+
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5));
|
|
56
55
|
} @else {
|
|
57
56
|
// Avoid using mixin so we can pass custom focus shadow properly
|
|
58
|
-
box-shadow: 0 0 0 $btn-focus-width rgba(mix(color
|
|
57
|
+
box-shadow: 0 0 0 $btn-focus-width rgba(mix($color, $border, 15%), .5);
|
|
59
58
|
}
|
|
60
59
|
}
|
|
61
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
|
+
}
|
|
62
70
|
}
|
|
63
71
|
|
|
64
|
-
@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
|
+
) {
|
|
65
79
|
color: $color;
|
|
66
80
|
border-color: $color;
|
|
67
81
|
|
|
68
|
-
|
|
82
|
+
&:hover {
|
|
69
83
|
color: $color-hover;
|
|
70
84
|
background-color: $active-background;
|
|
71
85
|
border-color: $active-border;
|
|
72
86
|
}
|
|
73
87
|
|
|
74
|
-
|
|
75
|
-
|
|
88
|
+
.btn-check:focus + &,
|
|
89
|
+
&:focus {
|
|
76
90
|
box-shadow: 0 0 0 $btn-focus-width rgba($color, .5);
|
|
77
91
|
}
|
|
78
92
|
|
|
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);
|
|
93
|
+
.btn-check:checked + &,
|
|
94
|
+
.btn-check:active + &,
|
|
95
|
+
&:active,
|
|
96
|
+
&.active,
|
|
97
|
+
&.dropdown-toggle.show {
|
|
98
|
+
color: $active-color;
|
|
89
99
|
background-color: $active-background;
|
|
90
100
|
border-color: $active-border;
|
|
91
101
|
|
|
92
102
|
&:focus {
|
|
93
|
-
@if $enable-shadows
|
|
103
|
+
@if $enable-shadows {
|
|
94
104
|
@include box-shadow($btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5));
|
|
95
105
|
} @else {
|
|
96
106
|
// Avoid using mixin so we can pass custom focus shadow properly
|
|
@@ -98,13 +108,18 @@
|
|
|
98
108
|
}
|
|
99
109
|
}
|
|
100
110
|
}
|
|
111
|
+
|
|
112
|
+
&:disabled,
|
|
113
|
+
&.disabled {
|
|
114
|
+
color: $color;
|
|
115
|
+
background-color: transparent;
|
|
116
|
+
}
|
|
101
117
|
}
|
|
102
118
|
|
|
103
119
|
// Button sizes
|
|
104
|
-
@mixin button-size($padding-y, $padding-x, $font-size, $
|
|
120
|
+
@mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
|
|
105
121
|
padding: $padding-y $padding-x;
|
|
106
122
|
@include font-size($font-size);
|
|
107
|
-
line-height: $line-height;
|
|
108
123
|
// Manually declare to provide an override to the browser default
|
|
109
124
|
@include border-radius($border-radius, 0);
|
|
110
125
|
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
@mixin caret-down
|
|
1
|
+
@mixin caret-down {
|
|
2
2
|
border-top: $caret-width solid;
|
|
3
3
|
border-right: $caret-width solid transparent;
|
|
4
4
|
border-bottom: 0;
|
|
5
5
|
border-left: $caret-width solid transparent;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
@mixin caret-up
|
|
8
|
+
@mixin caret-up {
|
|
9
9
|
border-top: 0;
|
|
10
10
|
border-right: $caret-width solid transparent;
|
|
11
11
|
border-bottom: $caret-width solid;
|
|
12
12
|
border-left: $caret-width solid transparent;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
@mixin caret-right
|
|
15
|
+
@mixin caret-right {
|
|
16
16
|
border-top: $caret-width solid transparent;
|
|
17
17
|
border-right: 0;
|
|
18
18
|
border-bottom: $caret-width solid transparent;
|
|
19
19
|
border-left: $caret-width solid;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
@mixin caret-left
|
|
22
|
+
@mixin caret-left {
|
|
23
23
|
border-top: $caret-width solid transparent;
|
|
24
24
|
border-right: $caret-width solid;
|
|
25
25
|
border-bottom: $caret-width solid transparent;
|