bootstrap 4.6.2 → 5.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/README.md +7 -4
- data/assets/javascripts/bootstrap/alert.js +192 -115
- data/assets/javascripts/bootstrap/base-component.js +63 -0
- data/assets/javascripts/bootstrap/button.js +96 -179
- data/assets/javascripts/bootstrap/carousel.js +472 -359
- data/assets/javascripts/bootstrap/collapse.js +379 -225
- data/assets/javascripts/bootstrap/dom/data.js +68 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +322 -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 +472 -355
- data/assets/javascripts/bootstrap/modal.js +612 -438
- data/assets/javascripts/bootstrap/offcanvas.js +671 -0
- data/assets/javascripts/bootstrap/popover.js +138 -167
- data/assets/javascripts/bootstrap/scrollspy.js +250 -192
- data/assets/javascripts/bootstrap/tab.js +241 -144
- data/assets/javascripts/bootstrap/toast.js +223 -157
- data/assets/javascripts/bootstrap/tooltip.js +651 -487
- 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 +8 -1
- data/assets/javascripts/bootstrap.js +3277 -2590
- 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 +18 -10
- data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
- data/assets/stylesheets/bootstrap/_alert.scss +15 -10
- data/assets/stylesheets/bootstrap/_badge.scss +2 -27
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +3 -17
- data/assets/stylesheets/bootstrap/_button-group.scss +21 -45
- data/assets/stylesheets/bootstrap/_buttons.scss +29 -60
- data/assets/stylesheets/bootstrap/_card.scss +20 -91
- data/assets/stylesheets/bootstrap/_carousel.scss +64 -35
- data/assets/stylesheets/bootstrap/_close.scss +30 -30
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +84 -36
- data/assets/stylesheets/bootstrap/_forms.scss +9 -347
- data/assets/stylesheets/bootstrap/_functions.scss +84 -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 +28 -8
- data/assets/stylesheets/bootstrap/_mixins.scss +8 -13
- data/assets/stylesheets/bootstrap/_modal.scss +45 -57
- data/assets/stylesheets/bootstrap/_nav.scss +20 -6
- data/assets/stylesheets/bootstrap/_navbar.scss +45 -71
- data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +10 -20
- data/assets/stylesheets/bootstrap/_popover.scss +24 -36
- data/assets/stylesheets/bootstrap/_progress.scss +5 -4
- data/assets/stylesheets/bootstrap/_reboot.scss +316 -179
- data/assets/stylesheets/bootstrap/_root.scss +5 -8
- data/assets/stylesheets/bootstrap/_spinners.scss +11 -7
- data/assets/stylesheets/bootstrap/_tables.scss +79 -114
- data/assets/stylesheets/bootstrap/_toasts.scss +20 -15
- data/assets/stylesheets/bootstrap/_tooltip.scss +21 -21
- data/assets/stylesheets/bootstrap/_transitions.scss +2 -7
- data/assets/stylesheets/bootstrap/_type.scss +38 -59
- data/assets/stylesheets/bootstrap/_utilities.scss +594 -18
- data/assets/stylesheets/bootstrap/_variables.scss +800 -485
- 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/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 +10 -8
- 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 +71 -48
- 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 +39 -97
- 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 +3 -3
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +1 -1
- 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 +214 -130
- data/bootstrap.gemspec +1 -3
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +19 -16
- 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_1.gemfile +7 -0
- metadata +45 -73
- 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/_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/_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
- data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
- /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -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
|
@@ -0,0 +1,9 @@
|
|
1
|
+
// Container mixins
|
2
|
+
|
3
|
+
@mixin make-container($gutter: $container-padding-x) {
|
4
|
+
width: 100%;
|
5
|
+
padding-right: var(--#{$variable-prefix}gutter-x, #{$gutter});
|
6
|
+
padding-left: var(--#{$variable-prefix}gutter-x, #{$gutter});
|
7
|
+
margin-right: auto;
|
8
|
+
margin-left: auto;
|
9
|
+
}
|
@@ -1,33 +1,7 @@
|
|
1
|
-
// Form control focus state
|
2
|
-
//
|
3
|
-
// Generate a customized focus state and for any input with the specified color,
|
4
|
-
// which defaults to the `$input-focus-border-color` variable.
|
5
|
-
//
|
6
|
-
// We highly encourage you to not customize the default value, but instead use
|
7
|
-
// this to tweak colors on an as-needed basis. This aesthetic change is based on
|
8
|
-
// WebKit's default styles, but applicable to a wider range of browsers. Its
|
9
|
-
// usability and accessibility should be taken into account with any change.
|
10
|
-
//
|
11
|
-
// Example usage: change the default blue border and shadow to white for better
|
12
|
-
// contrast against a dark gray background.
|
13
|
-
@mixin form-control-focus($ignore-warning: false) {
|
14
|
-
&:focus {
|
15
|
-
color: $input-focus-color;
|
16
|
-
background-color: $input-focus-bg;
|
17
|
-
border-color: $input-focus-border-color;
|
18
|
-
outline: 0;
|
19
|
-
@if $enable-shadows {
|
20
|
-
@include box-shadow($input-box-shadow, $input-focus-box-shadow);
|
21
|
-
} @else {
|
22
|
-
// Avoid using mixin so we can pass custom focus shadow properly
|
23
|
-
box-shadow: $input-focus-box-shadow;
|
24
|
-
}
|
25
|
-
}
|
26
|
-
@include deprecate("The `form-control-focus()` mixin", "v4.4.0", "v5", $ignore-warning);
|
27
|
-
}
|
28
|
-
|
29
1
|
// This mixin uses an `if()` technique to be compatible with Dart Sass
|
30
2
|
// See https://github.com/sass/sass/issues/1873#issuecomment-152293725 for more details
|
3
|
+
|
4
|
+
// scss-docs-start form-validation-mixins
|
31
5
|
@mixin form-validation-state-selector($state) {
|
32
6
|
@if ($state == "valid" or $state == "invalid") {
|
33
7
|
.was-validated #{if(&, "&", "")}:#{$state},
|
@@ -41,19 +15,26 @@
|
|
41
15
|
}
|
42
16
|
}
|
43
17
|
|
44
|
-
@mixin form-validation-state(
|
18
|
+
@mixin form-validation-state(
|
19
|
+
$state,
|
20
|
+
$color,
|
21
|
+
$icon,
|
22
|
+
$tooltip-color: color-contrast($color),
|
23
|
+
$tooltip-bg-color: rgba($color, $form-feedback-tooltip-opacity),
|
24
|
+
$focus-box-shadow: 0 0 $input-btn-focus-blur $input-focus-width rgba($color, $input-btn-focus-color-opacity)
|
25
|
+
) {
|
45
26
|
.#{$state}-feedback {
|
46
27
|
display: none;
|
47
28
|
width: 100%;
|
48
29
|
margin-top: $form-feedback-margin-top;
|
49
30
|
@include font-size($form-feedback-font-size);
|
31
|
+
font-style: $form-feedback-font-style;
|
50
32
|
color: $color;
|
51
33
|
}
|
52
34
|
|
53
35
|
.#{$state}-tooltip {
|
54
36
|
position: absolute;
|
55
37
|
top: 100%;
|
56
|
-
left: 0;
|
57
38
|
z-index: 5;
|
58
39
|
display: none;
|
59
40
|
max-width: 100%; // Contain to parent when possible
|
@@ -61,16 +42,9 @@
|
|
61
42
|
margin-top: .1rem;
|
62
43
|
@include font-size($form-feedback-tooltip-font-size);
|
63
44
|
line-height: $form-feedback-tooltip-line-height;
|
64
|
-
color:
|
65
|
-
background-color:
|
45
|
+
color: $tooltip-color;
|
46
|
+
background-color: $tooltip-bg-color;
|
66
47
|
@include border-radius($form-feedback-tooltip-border-radius);
|
67
|
-
|
68
|
-
// See https://github.com/twbs/bootstrap/pull/31557
|
69
|
-
// Align tooltip to form elements
|
70
|
-
.form-row > .col > &,
|
71
|
-
.form-row > [class*="col-"] > & {
|
72
|
-
left: $form-grid-gutter-width * .5;
|
73
|
-
}
|
74
48
|
}
|
75
49
|
|
76
50
|
@include form-validation-state-selector($state) {
|
@@ -85,7 +59,7 @@
|
|
85
59
|
border-color: $color;
|
86
60
|
|
87
61
|
@if $enable-validation-icons {
|
88
|
-
padding-right: $input-height-inner
|
62
|
+
padding-right: $input-height-inner;
|
89
63
|
background-image: escape-svg($icon);
|
90
64
|
background-repeat: no-repeat;
|
91
65
|
background-position: right $input-height-inner-quarter center;
|
@@ -94,17 +68,7 @@
|
|
94
68
|
|
95
69
|
&:focus {
|
96
70
|
border-color: $color;
|
97
|
-
box-shadow:
|
98
|
-
}
|
99
|
-
}
|
100
|
-
}
|
101
|
-
|
102
|
-
// stylelint-disable-next-line selector-no-qualifying-type
|
103
|
-
select.form-control {
|
104
|
-
@include form-validation-state-selector($state) {
|
105
|
-
@if $enable-validation-icons {
|
106
|
-
padding-right: $input-padding-x * 4 !important; // stylelint-disable-line declaration-no-important
|
107
|
-
background-position: right $input-padding-x * 2 center;
|
71
|
+
box-shadow: $focus-box-shadow;
|
108
72
|
}
|
109
73
|
}
|
110
74
|
}
|
@@ -119,77 +83,55 @@
|
|
119
83
|
}
|
120
84
|
}
|
121
85
|
|
122
|
-
.
|
86
|
+
.form-select {
|
123
87
|
@include form-validation-state-selector($state) {
|
124
88
|
border-color: $color;
|
125
89
|
|
126
90
|
@if $enable-validation-icons {
|
127
|
-
|
128
|
-
|
91
|
+
&:not([multiple]):not([size]),
|
92
|
+
&:not([multiple])[size="1"] {
|
93
|
+
padding-right: $form-select-feedback-icon-padding-end;
|
94
|
+
background-image: escape-svg($form-select-indicator), escape-svg($icon);
|
95
|
+
background-position: $form-select-bg-position, $form-select-feedback-icon-position;
|
96
|
+
background-size: $form-select-bg-size, $form-select-feedback-icon-size;
|
97
|
+
}
|
129
98
|
}
|
130
99
|
|
131
100
|
&:focus {
|
132
101
|
border-color: $color;
|
133
|
-
box-shadow:
|
102
|
+
box-shadow: $focus-box-shadow;
|
134
103
|
}
|
135
104
|
}
|
136
105
|
}
|
137
106
|
|
138
107
|
.form-check-input {
|
139
108
|
@include form-validation-state-selector($state) {
|
140
|
-
|
141
|
-
color: $color;
|
142
|
-
}
|
143
|
-
|
144
|
-
~ .#{$state}-feedback,
|
145
|
-
~ .#{$state}-tooltip {
|
146
|
-
display: block;
|
147
|
-
}
|
148
|
-
}
|
149
|
-
}
|
150
|
-
|
151
|
-
.custom-control-input {
|
152
|
-
@include form-validation-state-selector($state) {
|
153
|
-
~ .custom-control-label {
|
154
|
-
color: $color;
|
155
|
-
|
156
|
-
&::before {
|
157
|
-
border-color: $color;
|
158
|
-
}
|
159
|
-
}
|
109
|
+
border-color: $color;
|
160
110
|
|
161
111
|
&:checked {
|
162
|
-
|
163
|
-
border-color: lighten($color, 10%);
|
164
|
-
@include gradient-bg(lighten($color, 10%));
|
165
|
-
}
|
112
|
+
background-color: $color;
|
166
113
|
}
|
167
114
|
|
168
115
|
&:focus {
|
169
|
-
|
170
|
-
|
171
|
-
}
|
116
|
+
box-shadow: $focus-box-shadow;
|
117
|
+
}
|
172
118
|
|
173
|
-
|
174
|
-
|
175
|
-
}
|
119
|
+
~ .form-check-label {
|
120
|
+
color: $color;
|
176
121
|
}
|
177
122
|
}
|
178
123
|
}
|
124
|
+
.form-check-inline .form-check-input {
|
125
|
+
~ .#{$state}-feedback {
|
126
|
+
margin-left: .5em;
|
127
|
+
}
|
128
|
+
}
|
179
129
|
|
180
|
-
|
181
|
-
.
|
130
|
+
.input-group .form-control,
|
131
|
+
.input-group .form-select {
|
182
132
|
@include form-validation-state-selector($state) {
|
183
|
-
|
184
|
-
border-color: $color;
|
185
|
-
}
|
186
|
-
|
187
|
-
&:focus {
|
188
|
-
~ .custom-file-label {
|
189
|
-
border-color: $color;
|
190
|
-
box-shadow: 0 0 0 $input-focus-width rgba($color, .25);
|
191
|
-
}
|
192
|
-
}
|
133
|
+
z-index: 3;
|
193
134
|
}
|
194
135
|
}
|
195
136
|
}
|
137
|
+
// scss-docs-end form-validation-mixins
|
@@ -1,45 +1,47 @@
|
|
1
1
|
// Gradients
|
2
2
|
|
3
|
-
|
3
|
+
// scss-docs-start gradient-bg-mixin
|
4
|
+
@mixin gradient-bg($color: null) {
|
5
|
+
background-color: $color;
|
6
|
+
|
4
7
|
@if $enable-gradients {
|
5
|
-
background: $
|
6
|
-
} @else {
|
7
|
-
background-color: $color;
|
8
|
+
background-image: var(--#{$variable-prefix}gradient);
|
8
9
|
}
|
9
10
|
}
|
11
|
+
// scss-docs-end gradient-bg-mixin
|
10
12
|
|
13
|
+
// scss-docs-start gradient-mixins
|
11
14
|
// Horizontal gradient, from left to right
|
12
15
|
//
|
13
16
|
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
14
17
|
@mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
|
15
18
|
background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
|
16
|
-
background-repeat: repeat-x;
|
17
19
|
}
|
18
20
|
|
19
21
|
// Vertical gradient, from top to bottom
|
20
22
|
//
|
21
23
|
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
22
|
-
@mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent:
|
24
|
+
@mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: null, $end-percent: null) {
|
23
25
|
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
|
24
|
-
background-repeat: repeat-x;
|
25
26
|
}
|
26
27
|
|
27
28
|
@mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) {
|
28
29
|
background-image: linear-gradient($deg, $start-color, $end-color);
|
29
|
-
background-repeat: repeat-x;
|
30
30
|
}
|
31
|
+
|
31
32
|
@mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
|
32
33
|
background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
|
33
|
-
background-repeat: no-repeat;
|
34
34
|
}
|
35
|
+
|
35
36
|
@mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
|
36
37
|
background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
|
37
|
-
background-repeat: no-repeat;
|
38
38
|
}
|
39
|
+
|
39
40
|
@mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) {
|
40
41
|
background-image: radial-gradient(circle, $inner-color, $outer-color);
|
41
|
-
background-repeat: no-repeat;
|
42
42
|
}
|
43
|
+
|
43
44
|
@mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
|
44
45
|
background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
|
45
46
|
}
|
47
|
+
// scss-docs-end gradient-mixins
|
@@ -2,57 +2,47 @@
|
|
2
2
|
//
|
3
3
|
// Generate semantic grid columns with these mixins.
|
4
4
|
|
5
|
-
@mixin make-container($gutter: $grid-gutter-width) {
|
6
|
-
width: 100%;
|
7
|
-
padding-right: $gutter * .5;
|
8
|
-
padding-left: $gutter * .5;
|
9
|
-
margin-right: auto;
|
10
|
-
margin-left: auto;
|
11
|
-
}
|
12
|
-
|
13
5
|
@mixin make-row($gutter: $grid-gutter-width) {
|
6
|
+
--#{$variable-prefix}gutter-x: #{$gutter};
|
7
|
+
--#{$variable-prefix}gutter-y: 0;
|
14
8
|
display: flex;
|
15
9
|
flex-wrap: wrap;
|
16
|
-
margin-
|
17
|
-
margin-
|
18
|
-
}
|
19
|
-
|
20
|
-
// For each breakpoint, define the maximum width of the container in a media query
|
21
|
-
@mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) {
|
22
|
-
@each $breakpoint, $container-max-width in $max-widths {
|
23
|
-
@include media-breakpoint-up($breakpoint, $breakpoints) {
|
24
|
-
max-width: $container-max-width;
|
25
|
-
}
|
26
|
-
}
|
27
|
-
@include deprecate("The `make-container-max-widths` mixin", "v4.5.2", "v5");
|
10
|
+
margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list
|
11
|
+
margin-right: calc(var(--#{$variable-prefix}gutter-x) / -2); // stylelint-disable-line function-disallowed-list
|
12
|
+
margin-left: calc(var(--#{$variable-prefix}gutter-x) / -2); // stylelint-disable-line function-disallowed-list
|
28
13
|
}
|
29
14
|
|
30
15
|
@mixin make-col-ready($gutter: $grid-gutter-width) {
|
31
|
-
|
16
|
+
// Add box sizing if only the grid is loaded
|
17
|
+
box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);
|
32
18
|
// Prevent columns from becoming too narrow when at smaller grid tiers by
|
33
|
-
// always setting `width: 100%;`. This works because we
|
19
|
+
// always setting `width: 100%;`. This works because we set the width
|
34
20
|
// later on to override this initial width.
|
21
|
+
flex-shrink: 0;
|
35
22
|
width: 100%;
|
36
|
-
|
37
|
-
padding-
|
23
|
+
max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
|
24
|
+
padding-right: calc(var(--#{$variable-prefix}gutter-x) / 2); // stylelint-disable-line function-disallowed-list
|
25
|
+
padding-left: calc(var(--#{$variable-prefix}gutter-x) / 2); // stylelint-disable-line function-disallowed-list
|
26
|
+
margin-top: var(--#{$variable-prefix}gutter-y);
|
38
27
|
}
|
39
28
|
|
40
|
-
@mixin make-col($size, $columns: $grid-columns) {
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
29
|
+
@mixin make-col($size: false, $columns: $grid-columns) {
|
30
|
+
@if $size {
|
31
|
+
flex: 0 0 auto;
|
32
|
+
width: percentage($size / $columns);
|
33
|
+
} @else {
|
34
|
+
flex: 1 1 0;
|
35
|
+
max-width: 100%;
|
36
|
+
}
|
46
37
|
}
|
47
38
|
|
48
39
|
@mixin make-col-auto() {
|
49
40
|
flex: 0 0 auto;
|
50
41
|
width: auto;
|
51
|
-
max-width: 100%; // Reset earlier grid tiers
|
52
42
|
}
|
53
43
|
|
54
44
|
@mixin make-col-offset($size, $columns: $grid-columns) {
|
55
|
-
$num:
|
45
|
+
$num: $size / $columns;
|
56
46
|
margin-left: if($num == 0, 0, percentage($num));
|
57
47
|
}
|
58
48
|
|
@@ -63,7 +53,73 @@
|
|
63
53
|
// style grid.
|
64
54
|
@mixin row-cols($count) {
|
65
55
|
> * {
|
66
|
-
flex: 0 0
|
67
|
-
|
56
|
+
flex: 0 0 auto;
|
57
|
+
width: 100% / $count;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
// Framework grid generation
|
62
|
+
//
|
63
|
+
// Used only by Bootstrap to generate the correct number of grid classes given
|
64
|
+
// any value of `$grid-columns`.
|
65
|
+
|
66
|
+
@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {
|
67
|
+
@each $breakpoint in map-keys($breakpoints) {
|
68
|
+
$infix: breakpoint-infix($breakpoint, $breakpoints);
|
69
|
+
|
70
|
+
@include media-breakpoint-up($breakpoint, $breakpoints) {
|
71
|
+
// Provide basic `.col-{bp}` classes for equal-width flexbox columns
|
72
|
+
.col#{$infix} {
|
73
|
+
flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
|
74
|
+
}
|
75
|
+
|
76
|
+
.row-cols#{$infix}-auto > * {
|
77
|
+
@include make-col-auto();
|
78
|
+
}
|
79
|
+
|
80
|
+
@if $grid-row-columns > 0 {
|
81
|
+
@for $i from 1 through $grid-row-columns {
|
82
|
+
.row-cols#{$infix}-#{$i} {
|
83
|
+
@include row-cols($i);
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
.col#{$infix}-auto {
|
89
|
+
@include make-col-auto();
|
90
|
+
}
|
91
|
+
|
92
|
+
@if $columns > 0 {
|
93
|
+
@for $i from 1 through $columns {
|
94
|
+
.col#{$infix}-#{$i} {
|
95
|
+
@include make-col($i, $columns);
|
96
|
+
}
|
97
|
+
}
|
98
|
+
|
99
|
+
// `$columns - 1` because offsetting by the width of an entire row isn't possible
|
100
|
+
@for $i from 0 through ($columns - 1) {
|
101
|
+
@if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
|
102
|
+
.offset#{$infix}-#{$i} {
|
103
|
+
@include make-col-offset($i, $columns);
|
104
|
+
}
|
105
|
+
}
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
// Gutters
|
110
|
+
//
|
111
|
+
// Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
|
112
|
+
@each $key, $value in $gutters {
|
113
|
+
.g#{$infix}-#{$key},
|
114
|
+
.gx#{$infix}-#{$key} {
|
115
|
+
--#{$variable-prefix}gutter-x: #{$value};
|
116
|
+
}
|
117
|
+
|
118
|
+
.g#{$infix}-#{$key},
|
119
|
+
.gy#{$infix}-#{$key} {
|
120
|
+
--#{$variable-prefix}gutter-y: #{$value};
|
121
|
+
}
|
122
|
+
}
|
123
|
+
}
|
68
124
|
}
|
69
125
|
}
|
@@ -7,30 +7,10 @@
|
|
7
7
|
//
|
8
8
|
// Keep images from scaling beyond the width of their parents.
|
9
9
|
|
10
|
-
@mixin img-fluid
|
10
|
+
@mixin img-fluid {
|
11
11
|
// Part 1: Set a maximum relative to the parent
|
12
12
|
max-width: 100%;
|
13
13
|
// Part 2: Override the height to auto, otherwise images will be stretched
|
14
14
|
// when setting a width and height attribute on the img element.
|
15
15
|
height: auto;
|
16
16
|
}
|
17
|
-
|
18
|
-
|
19
|
-
// Retina image
|
20
|
-
//
|
21
|
-
// Short retina mixin for setting background-image and -size.
|
22
|
-
|
23
|
-
@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) {
|
24
|
-
background-image: url($file-1x);
|
25
|
-
|
26
|
-
// Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio,
|
27
|
-
// but doesn't convert dppx=>dpi.
|
28
|
-
// There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard.
|
29
|
-
// Compatibility info: https://caniuse.com/css-media-resolution
|
30
|
-
@media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx
|
31
|
-
only screen and (min-resolution: 2dppx) { // Standardized
|
32
|
-
background-image: url($file-2x);
|
33
|
-
background-size: $width-1x $height-1x;
|
34
|
-
}
|
35
|
-
@include deprecate("`img-retina()`", "v4.3.0", "v5");
|
36
|
-
}
|
@@ -1,14 +1,16 @@
|
|
1
1
|
// List Groups
|
2
2
|
|
3
|
+
// scss-docs-start list-group-mixin
|
3
4
|
@mixin list-group-item-variant($state, $background, $color) {
|
4
5
|
.list-group-item-#{$state} {
|
5
6
|
color: $color;
|
6
7
|
background-color: $background;
|
7
8
|
|
8
9
|
&.list-group-item-action {
|
9
|
-
|
10
|
+
&:hover,
|
11
|
+
&:focus {
|
10
12
|
color: $color;
|
11
|
-
background-color:
|
13
|
+
background-color: shade-color($background, 10%);
|
12
14
|
}
|
13
15
|
|
14
16
|
&.active {
|
@@ -19,3 +21,4 @@
|
|
19
21
|
}
|
20
22
|
}
|
21
23
|
}
|
24
|
+
// scss-docs-end list-group-mixin
|
@@ -1,22 +1,31 @@
|
|
1
1
|
// Pagination
|
2
2
|
|
3
|
-
|
3
|
+
// scss-docs-start pagination-mixin
|
4
|
+
@mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
|
4
5
|
.page-link {
|
5
6
|
padding: $padding-y $padding-x;
|
6
7
|
@include font-size($font-size);
|
7
|
-
line-height: $line-height;
|
8
8
|
}
|
9
9
|
|
10
10
|
.page-item {
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
@if $pagination-margin-start == (-$pagination-border-width) {
|
12
|
+
&:first-child {
|
13
|
+
.page-link {
|
14
|
+
@include border-start-radius($border-radius);
|
15
|
+
}
|
14
16
|
}
|
15
|
-
|
16
|
-
|
17
|
+
|
18
|
+
&:last-child {
|
19
|
+
.page-link {
|
20
|
+
@include border-end-radius($border-radius);
|
21
|
+
}
|
22
|
+
}
|
23
|
+
} @else {
|
24
|
+
//Add border-radius to all pageLinks in case they have left margin
|
17
25
|
.page-link {
|
18
|
-
@include border-
|
26
|
+
@include border-radius($border-radius);
|
19
27
|
}
|
20
28
|
}
|
21
29
|
}
|
22
30
|
}
|
31
|
+
// scss-docs-end pagination-mixin
|
@@ -1,6 +1,6 @@
|
|
1
|
-
@mixin reset-text
|
1
|
+
@mixin reset-text {
|
2
2
|
font-family: $font-family-base;
|
3
|
-
// We deliberately do NOT reset font-size or word-wrap.
|
3
|
+
// We deliberately do NOT reset font-size or overflow-wrap / word-wrap.
|
4
4
|
font-style: normal;
|
5
5
|
font-weight: $font-weight-normal;
|
6
6
|
line-height: $line-height-base;
|
@@ -11,7 +11,7 @@
|
|
11
11
|
text-transform: none;
|
12
12
|
letter-spacing: normal;
|
13
13
|
word-break: normal;
|
14
|
-
white-space: normal;
|
15
14
|
word-spacing: normal;
|
15
|
+
white-space: normal;
|
16
16
|
line-break: auto;
|
17
17
|
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
// scss-docs-start table-variant
|
2
|
+
@mixin table-variant($state, $background) {
|
3
|
+
.table-#{$state} {
|
4
|
+
$color: color-contrast(opaque($body-bg, $background));
|
5
|
+
$hover-bg: mix($color, $background, percentage($table-hover-bg-factor));
|
6
|
+
$striped-bg: mix($color, $background, percentage($table-striped-bg-factor));
|
7
|
+
$active-bg: mix($color, $background, percentage($table-active-bg-factor));
|
8
|
+
|
9
|
+
--#{$variable-prefix}table-bg: #{$background};
|
10
|
+
--#{$variable-prefix}table-striped-bg: #{$striped-bg};
|
11
|
+
--#{$variable-prefix}table-striped-color: #{color-contrast($striped-bg)};
|
12
|
+
--#{$variable-prefix}table-active-bg: #{$active-bg};
|
13
|
+
--#{$variable-prefix}table-active-color: #{color-contrast($active-bg)};
|
14
|
+
--#{$variable-prefix}table-hover-bg: #{$hover-bg};
|
15
|
+
--#{$variable-prefix}table-hover-color: #{color-contrast($hover-bg)};
|
16
|
+
|
17
|
+
color: $color;
|
18
|
+
border-color: mix($color, $background, percentage($table-border-factor));
|
19
|
+
}
|
20
|
+
}
|
21
|
+
// scss-docs-end table-variant
|
@@ -17,7 +17,7 @@
|
|
17
17
|
transition: $transition;
|
18
18
|
}
|
19
19
|
|
20
|
-
@if $enable-
|
20
|
+
@if $enable-reduced-motion and nth($transition, 1) != null and nth($transition, 1) != none {
|
21
21
|
@media (prefers-reduced-motion: reduce) {
|
22
22
|
transition: none;
|
23
23
|
}
|