bootstrap 4.3.1 → 5.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +17 -2
- data/CHANGELOG.md +2 -14
- data/README.md +7 -4
- data/assets/javascripts/bootstrap/alert.js +172 -136
- data/assets/javascripts/bootstrap/base-component.js +182 -0
- data/assets/javascripts/bootstrap/button.js +101 -142
- data/assets/javascripts/bootstrap/carousel.js +483 -408
- data/assets/javascripts/bootstrap/collapse.js +340 -273
- data/assets/javascripts/bootstrap/dom/data.js +68 -0
- data/assets/javascripts/bootstrap/dom/event-handler.js +321 -0
- data/assets/javascripts/bootstrap/dom/manipulator.js +88 -0
- data/assets/javascripts/bootstrap/dom/selector-engine.js +127 -0
- data/assets/javascripts/bootstrap/dropdown.js +491 -399
- data/assets/javascripts/bootstrap/modal.js +841 -449
- data/assets/javascripts/bootstrap/offcanvas.js +866 -0
- data/assets/javascripts/bootstrap/popover.js +121 -198
- data/assets/javascripts/bootstrap/scrollspy.js +256 -240
- data/assets/javascripts/bootstrap/tab.js +218 -154
- data/assets/javascripts/bootstrap/toast.js +329 -189
- data/assets/javascripts/bootstrap/tooltip.js +651 -552
- 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 +3503 -2892
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/stylesheets/_bootstrap-grid.scss +56 -18
- data/assets/stylesheets/_bootstrap-reboot.scss +5 -4
- data/assets/stylesheets/_bootstrap.scss +20 -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 +5 -18
- data/assets/stylesheets/bootstrap/_button-group.scss +21 -45
- data/assets/stylesheets/bootstrap/_buttons.scss +28 -54
- data/assets/stylesheets/bootstrap/_card.scss +52 -125
- data/assets/stylesheets/bootstrap/_carousel.scss +70 -38
- data/assets/stylesheets/bootstrap/_close.scss +30 -31
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +88 -39
- data/assets/stylesheets/bootstrap/_forms.scss +9 -330
- data/assets/stylesheets/bootstrap/_functions.scss +243 -27
- data/assets/stylesheets/bootstrap/_grid.scss +14 -33
- data/assets/stylesheets/bootstrap/_helpers.scss +9 -0
- data/assets/stylesheets/bootstrap/_images.scss +3 -3
- data/assets/stylesheets/bootstrap/_list-group.scss +61 -36
- data/assets/stylesheets/bootstrap/_mixins.scss +12 -16
- data/assets/stylesheets/bootstrap/_modal.scss +64 -84
- data/assets/stylesheets/bootstrap/_nav.scss +29 -10
- data/assets/stylesheets/bootstrap/_navbar.scss +93 -52
- data/assets/stylesheets/bootstrap/_offcanvas.scss +83 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +13 -22
- data/assets/stylesheets/bootstrap/_placeholders.scss +51 -0
- data/assets/stylesheets/bootstrap/_popover.scss +29 -42
- data/assets/stylesheets/bootstrap/_progress.scss +10 -5
- data/assets/stylesheets/bootstrap/_reboot.scss +350 -208
- data/assets/stylesheets/bootstrap/_root.scss +43 -8
- data/assets/stylesheets/bootstrap/_spinners.scss +21 -7
- data/assets/stylesheets/bootstrap/_tables.scss +84 -114
- data/assets/stylesheets/bootstrap/_toasts.scss +21 -14
- data/assets/stylesheets/bootstrap/_tooltip.scss +21 -21
- data/assets/stylesheets/bootstrap/_transitions.scss +8 -1
- data/assets/stylesheets/bootstrap/_type.scss +40 -61
- data/assets/stylesheets/bootstrap/_utilities.scss +630 -17
- data/assets/stylesheets/bootstrap/_variables.scss +1007 -489
- data/assets/stylesheets/bootstrap/bootstrap-utilities.scss +18 -0
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +63 -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 +72 -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/_stacks.scss +15 -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/helpers/_vr.scss +8 -0
- data/assets/stylesheets/bootstrap/mixins/_alert.scss +3 -5
- data/assets/stylesheets/bootstrap/mixins/_backdrop.scss +14 -0
- 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 +77 -51
- 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 +67 -115
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +132 -32
- data/assets/stylesheets/bootstrap/mixins/_image.scss +0 -20
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +17 -8
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +1 -1
- 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 +89 -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 +278 -128
- data/bootstrap.gemspec +4 -6
- data/lib/bootstrap/version.rb +2 -2
- data/tasks/updater/js.rb +25 -6
- data/tasks/updater/network.rb +8 -2
- data/test/dummy_rails/app/assets/config/manifest.js +3 -0
- data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
- data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
- 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
- data/test/support/dummy_rails_integration.rb +3 -1
- data/test/test_helper.rb +18 -13
- metadata +61 -79
- 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/_screen-reader.scss +0 -33
- 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
- data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
@@ -1,4 +1,5 @@
|
|
1
|
-
// stylelint-disable
|
1
|
+
// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
|
2
|
+
|
2
3
|
|
3
4
|
// Reboot
|
4
5
|
//
|
@@ -10,118 +11,163 @@
|
|
10
11
|
|
11
12
|
// Document
|
12
13
|
//
|
13
|
-
//
|
14
|
-
// 2. Change the default font family in all browsers.
|
15
|
-
// 3. Correct the line height in all browsers.
|
16
|
-
// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
|
17
|
-
// 5. Change the default tap highlight to be completely transparent in iOS.
|
14
|
+
// Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
|
18
15
|
|
19
16
|
*,
|
20
17
|
*::before,
|
21
18
|
*::after {
|
22
|
-
box-sizing: border-box;
|
19
|
+
box-sizing: border-box;
|
23
20
|
}
|
24
21
|
|
25
|
-
html {
|
26
|
-
font-family: sans-serif; // 2
|
27
|
-
line-height: 1.15; // 3
|
28
|
-
-webkit-text-size-adjust: 100%; // 4
|
29
|
-
-webkit-tap-highlight-color: rgba($black, 0); // 5
|
30
|
-
}
|
31
22
|
|
32
|
-
//
|
33
|
-
//
|
34
|
-
//
|
35
|
-
|
36
|
-
|
23
|
+
// Root
|
24
|
+
//
|
25
|
+
// Ability to the value of the root font sizes, affecting the value of `rem`.
|
26
|
+
// null by default, thus nothing is generated.
|
27
|
+
|
28
|
+
:root {
|
29
|
+
@if $font-size-root != null {
|
30
|
+
font-size: var(--#{$variable-prefix}root-font-size);
|
31
|
+
}
|
32
|
+
|
33
|
+
@if $enable-smooth-scroll {
|
34
|
+
@media (prefers-reduced-motion: no-preference) {
|
35
|
+
scroll-behavior: smooth;
|
36
|
+
}
|
37
|
+
}
|
37
38
|
}
|
38
39
|
|
40
|
+
|
39
41
|
// Body
|
40
42
|
//
|
41
43
|
// 1. Remove the margin in all browsers.
|
42
44
|
// 2. As a best practice, apply a default `background-color`.
|
43
|
-
// 3.
|
44
|
-
//
|
45
|
+
// 3. Prevent adjustments of font size after orientation changes in iOS.
|
46
|
+
// 4. Change the default tap highlight to be completely transparent in iOS.
|
45
47
|
|
48
|
+
// scss-docs-start reboot-body-rules
|
46
49
|
body {
|
47
50
|
margin: 0; // 1
|
48
|
-
font-family: $font-family
|
49
|
-
@include font-size($font-size
|
50
|
-
font-weight: $font-weight
|
51
|
-
line-height: $line-height
|
52
|
-
color: $body-color;
|
53
|
-
text-align:
|
54
|
-
background-color: $body-bg; // 2
|
55
|
-
|
56
|
-
|
57
|
-
// Suppress the focus outline on elements that cannot be accessed via keyboard.
|
58
|
-
// This prevents an unwanted focus outline from appearing around elements that
|
59
|
-
// might still respond to pointer events.
|
60
|
-
//
|
61
|
-
// Credit: https://github.com/suitcss/base
|
62
|
-
[tabindex="-1"]:focus {
|
63
|
-
outline: 0 !important;
|
51
|
+
font-family: var(--#{$variable-prefix}body-font-family);
|
52
|
+
@include font-size(var(--#{$variable-prefix}body-font-size));
|
53
|
+
font-weight: var(--#{$variable-prefix}body-font-weight);
|
54
|
+
line-height: var(--#{$variable-prefix}body-line-height);
|
55
|
+
color: var(--#{$variable-prefix}body-color);
|
56
|
+
text-align: var(--#{$variable-prefix}body-text-align);
|
57
|
+
background-color: var(--#{$variable-prefix}body-bg); // 2
|
58
|
+
-webkit-text-size-adjust: 100%; // 3
|
59
|
+
-webkit-tap-highlight-color: rgba($black, 0); // 4
|
64
60
|
}
|
61
|
+
// scss-docs-end reboot-body-rules
|
65
62
|
|
66
63
|
|
67
64
|
// Content grouping
|
68
65
|
//
|
69
|
-
// 1.
|
70
|
-
// 2.
|
66
|
+
// 1. Reset Firefox's gray color
|
67
|
+
// 2. Set correct height and prevent the `size` attribute to make the `hr` look like an input field
|
71
68
|
|
72
69
|
hr {
|
73
|
-
|
74
|
-
|
75
|
-
|
70
|
+
margin: $hr-margin-y 0;
|
71
|
+
color: $hr-color; // 1
|
72
|
+
background-color: currentColor;
|
73
|
+
border: 0;
|
74
|
+
opacity: $hr-opacity;
|
75
|
+
}
|
76
|
+
|
77
|
+
hr:not([size]) {
|
78
|
+
height: $hr-height; // 2
|
76
79
|
}
|
77
80
|
|
78
81
|
|
79
|
-
//
|
80
82
|
// Typography
|
81
83
|
//
|
84
|
+
// 1. Remove top margins from headings
|
85
|
+
// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
|
86
|
+
// margin for easier control within type scales as it avoids margin collapsing.
|
82
87
|
|
83
|
-
|
84
|
-
//
|
85
|
-
// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
|
86
|
-
// margin for easier control within type scales as it avoids margin collapsing.
|
87
|
-
// stylelint-disable-next-line selector-list-comma-newline-after
|
88
|
-
h1, h2, h3, h4, h5, h6 {
|
89
|
-
margin-top: 0;
|
88
|
+
%heading {
|
89
|
+
margin-top: 0; // 1
|
90
90
|
margin-bottom: $headings-margin-bottom;
|
91
|
+
font-family: $headings-font-family;
|
92
|
+
font-style: $headings-font-style;
|
93
|
+
font-weight: $headings-font-weight;
|
94
|
+
line-height: $headings-line-height;
|
95
|
+
color: $headings-color;
|
96
|
+
}
|
97
|
+
|
98
|
+
h1 {
|
99
|
+
@extend %heading;
|
100
|
+
@include font-size($h1-font-size);
|
101
|
+
}
|
102
|
+
|
103
|
+
h2 {
|
104
|
+
@extend %heading;
|
105
|
+
@include font-size($h2-font-size);
|
91
106
|
}
|
92
107
|
|
108
|
+
h3 {
|
109
|
+
@extend %heading;
|
110
|
+
@include font-size($h3-font-size);
|
111
|
+
}
|
112
|
+
|
113
|
+
h4 {
|
114
|
+
@extend %heading;
|
115
|
+
@include font-size($h4-font-size);
|
116
|
+
}
|
117
|
+
|
118
|
+
h5 {
|
119
|
+
@extend %heading;
|
120
|
+
@include font-size($h5-font-size);
|
121
|
+
}
|
122
|
+
|
123
|
+
h6 {
|
124
|
+
@extend %heading;
|
125
|
+
@include font-size($h6-font-size);
|
126
|
+
}
|
127
|
+
|
128
|
+
|
93
129
|
// Reset margins on paragraphs
|
94
130
|
//
|
95
131
|
// Similarly, the top margin on `<p>`s get reset. However, we also reset the
|
96
132
|
// bottom margin to use `rem` units instead of `em`.
|
133
|
+
|
97
134
|
p {
|
98
135
|
margin-top: 0;
|
99
136
|
margin-bottom: $paragraph-margin-bottom;
|
100
137
|
}
|
101
138
|
|
139
|
+
|
102
140
|
// Abbreviations
|
103
141
|
//
|
104
|
-
// 1. Duplicate behavior to the data-* attribute for our tooltip plugin
|
105
|
-
// 2. Add the correct text decoration in Chrome, Edge,
|
142
|
+
// 1. Duplicate behavior to the data-bs-* attribute for our tooltip plugin
|
143
|
+
// 2. Add the correct text decoration in Chrome, Edge, Opera, and Safari.
|
106
144
|
// 3. Add explicit cursor to indicate changed behavior.
|
107
|
-
// 4.
|
108
|
-
// 5. Prevent the text-decoration to be skipped.
|
145
|
+
// 4. Prevent the text-decoration to be skipped.
|
109
146
|
|
110
147
|
abbr[title],
|
111
|
-
abbr[data-original-title] { // 1
|
112
|
-
text-decoration: underline; // 2
|
148
|
+
abbr[data-bs-original-title] { // 1
|
113
149
|
text-decoration: underline dotted; // 2
|
114
150
|
cursor: help; // 3
|
115
|
-
|
116
|
-
text-decoration-skip-ink: none; // 5
|
151
|
+
text-decoration-skip-ink: none; // 4
|
117
152
|
}
|
118
153
|
|
154
|
+
|
155
|
+
// Address
|
156
|
+
|
119
157
|
address {
|
120
158
|
margin-bottom: 1rem;
|
121
159
|
font-style: normal;
|
122
160
|
line-height: inherit;
|
123
161
|
}
|
124
162
|
|
163
|
+
|
164
|
+
// Lists
|
165
|
+
|
166
|
+
ol,
|
167
|
+
ul {
|
168
|
+
padding-left: 2rem;
|
169
|
+
}
|
170
|
+
|
125
171
|
ol,
|
126
172
|
ul,
|
127
173
|
dl {
|
@@ -140,33 +186,57 @@ dt {
|
|
140
186
|
font-weight: $dt-font-weight;
|
141
187
|
}
|
142
188
|
|
189
|
+
// 1. Undo browser default
|
190
|
+
|
143
191
|
dd {
|
144
192
|
margin-bottom: .5rem;
|
145
|
-
margin-left: 0; //
|
193
|
+
margin-left: 0; // 1
|
146
194
|
}
|
147
195
|
|
196
|
+
|
197
|
+
// Blockquote
|
198
|
+
|
148
199
|
blockquote {
|
149
200
|
margin: 0 0 1rem;
|
150
201
|
}
|
151
202
|
|
203
|
+
|
204
|
+
// Strong
|
205
|
+
//
|
206
|
+
// Add the correct font weight in Chrome, Edge, and Safari
|
207
|
+
|
152
208
|
b,
|
153
209
|
strong {
|
154
|
-
font-weight: $font-weight-bolder;
|
210
|
+
font-weight: $font-weight-bolder;
|
155
211
|
}
|
156
212
|
|
213
|
+
|
214
|
+
// Small
|
215
|
+
//
|
216
|
+
// Add the correct font size in all browsers
|
217
|
+
|
157
218
|
small {
|
158
|
-
@include font-size(
|
219
|
+
@include font-size($small-font-size);
|
220
|
+
}
|
221
|
+
|
222
|
+
|
223
|
+
// Mark
|
224
|
+
|
225
|
+
mark {
|
226
|
+
padding: $mark-padding;
|
227
|
+
background-color: $mark-bg;
|
159
228
|
}
|
160
229
|
|
230
|
+
|
231
|
+
// Sub and Sup
|
161
232
|
//
|
162
233
|
// Prevent `sub` and `sup` elements from affecting the line height in
|
163
234
|
// all browsers.
|
164
|
-
//
|
165
235
|
|
166
236
|
sub,
|
167
237
|
sup {
|
168
238
|
position: relative;
|
169
|
-
@include font-size(
|
239
|
+
@include font-size($sub-sup-font-size);
|
170
240
|
line-height: 0;
|
171
241
|
vertical-align: baseline;
|
172
242
|
}
|
@@ -175,309 +245,381 @@ sub { bottom: -.25em; }
|
|
175
245
|
sup { top: -.5em; }
|
176
246
|
|
177
247
|
|
178
|
-
//
|
179
248
|
// Links
|
180
|
-
//
|
181
249
|
|
182
250
|
a {
|
183
251
|
color: $link-color;
|
184
252
|
text-decoration: $link-decoration;
|
185
|
-
background-color: transparent; // Remove the gray background on active links in IE 10.
|
186
253
|
|
187
|
-
|
254
|
+
&:hover {
|
188
255
|
color: $link-hover-color;
|
189
256
|
text-decoration: $link-hover-decoration;
|
190
257
|
}
|
191
258
|
}
|
192
259
|
|
193
|
-
// And undo these styles for placeholder links/named anchors (without href)
|
194
|
-
// which have not been made explicitly keyboard-focusable (without tabindex).
|
260
|
+
// And undo these styles for placeholder links/named anchors (without href).
|
195
261
|
// It would be more straightforward to just use a[href] in previous block, but that
|
196
262
|
// causes specificity issues in many other styles that are too complex to fix.
|
197
263
|
// See https://github.com/twbs/bootstrap/issues/19402
|
198
264
|
|
199
|
-
a:not([href]):not([
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
@include hover-focus {
|
265
|
+
a:not([href]):not([class]) {
|
266
|
+
&,
|
267
|
+
&:hover {
|
204
268
|
color: inherit;
|
205
269
|
text-decoration: none;
|
206
270
|
}
|
207
|
-
|
208
|
-
&:focus {
|
209
|
-
outline: 0;
|
210
|
-
}
|
211
271
|
}
|
212
272
|
|
213
273
|
|
214
|
-
//
|
215
274
|
// Code
|
216
|
-
//
|
217
275
|
|
218
276
|
pre,
|
219
277
|
code,
|
220
278
|
kbd,
|
221
279
|
samp {
|
222
|
-
font-family: $font-family-
|
280
|
+
font-family: $font-family-code;
|
223
281
|
@include font-size(1em); // Correct the odd `em` font sizing in all browsers.
|
282
|
+
direction: ltr #{"/* rtl:ignore */"};
|
283
|
+
unicode-bidi: bidi-override;
|
224
284
|
}
|
225
285
|
|
286
|
+
// 1. Remove browser default top margin
|
287
|
+
// 2. Reset browser default of `1em` to use `rem`s
|
288
|
+
// 3. Don't allow content to break outside
|
289
|
+
|
226
290
|
pre {
|
227
|
-
|
228
|
-
margin-top: 0;
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
291
|
+
display: block;
|
292
|
+
margin-top: 0; // 1
|
293
|
+
margin-bottom: 1rem; // 2
|
294
|
+
overflow: auto; // 3
|
295
|
+
@include font-size($code-font-size);
|
296
|
+
color: $pre-color;
|
297
|
+
|
298
|
+
// Account for some code outputs that place code tags in pre tags
|
299
|
+
code {
|
300
|
+
@include font-size(inherit);
|
301
|
+
color: inherit;
|
302
|
+
word-break: normal;
|
303
|
+
}
|
304
|
+
}
|
305
|
+
|
306
|
+
code {
|
307
|
+
@include font-size($code-font-size);
|
308
|
+
color: $code-color;
|
309
|
+
word-wrap: break-word;
|
310
|
+
|
311
|
+
// Streamline the style when inside anchors to avoid broken underline and more
|
312
|
+
a > & {
|
313
|
+
color: inherit;
|
314
|
+
}
|
315
|
+
}
|
316
|
+
|
317
|
+
kbd {
|
318
|
+
padding: $kbd-padding-y $kbd-padding-x;
|
319
|
+
@include font-size($kbd-font-size);
|
320
|
+
color: $kbd-color;
|
321
|
+
background-color: $kbd-bg;
|
322
|
+
@include border-radius($border-radius-sm);
|
323
|
+
|
324
|
+
kbd {
|
325
|
+
padding: 0;
|
326
|
+
@include font-size(1em);
|
327
|
+
font-weight: $nested-kbd-font-weight;
|
328
|
+
}
|
233
329
|
}
|
234
330
|
|
235
331
|
|
236
|
-
//
|
237
332
|
// Figures
|
238
333
|
//
|
334
|
+
// Apply a consistent margin strategy (matches our type styles).
|
239
335
|
|
240
336
|
figure {
|
241
|
-
// Apply a consistent margin strategy (matches our type styles).
|
242
337
|
margin: 0 0 1rem;
|
243
338
|
}
|
244
339
|
|
245
340
|
|
246
|
-
//
|
247
341
|
// Images and content
|
248
|
-
//
|
249
|
-
|
250
|
-
img {
|
251
|
-
vertical-align: middle;
|
252
|
-
border-style: none; // Remove the border on images inside links in IE 10-.
|
253
|
-
}
|
254
342
|
|
343
|
+
img,
|
255
344
|
svg {
|
256
|
-
// Workaround for the SVG overflow bug in IE10/11 is still required.
|
257
|
-
// See https://github.com/twbs/bootstrap/issues/26878
|
258
|
-
overflow: hidden;
|
259
345
|
vertical-align: middle;
|
260
346
|
}
|
261
347
|
|
262
348
|
|
263
|
-
//
|
264
349
|
// Tables
|
265
350
|
//
|
351
|
+
// Prevent double borders
|
266
352
|
|
267
353
|
table {
|
268
|
-
|
354
|
+
caption-side: bottom;
|
355
|
+
border-collapse: collapse;
|
269
356
|
}
|
270
357
|
|
271
358
|
caption {
|
272
|
-
padding-top: $table-cell-padding;
|
273
|
-
padding-bottom: $table-cell-padding;
|
359
|
+
padding-top: $table-cell-padding-y;
|
360
|
+
padding-bottom: $table-cell-padding-y;
|
274
361
|
color: $table-caption-color;
|
275
362
|
text-align: left;
|
276
|
-
caption-side: bottom;
|
277
363
|
}
|
278
364
|
|
365
|
+
// 1. Removes font-weight bold by inheriting
|
366
|
+
// 2. Matches default `<td>` alignment by inheriting `text-align`.
|
367
|
+
// 3. Fix alignment for Safari
|
368
|
+
|
369
|
+
th {
|
370
|
+
font-weight: $table-th-font-weight; // 1
|
371
|
+
text-align: inherit; // 2
|
372
|
+
text-align: -webkit-match-parent; // 3
|
373
|
+
}
|
374
|
+
|
375
|
+
thead,
|
376
|
+
tbody,
|
377
|
+
tfoot,
|
378
|
+
tr,
|
379
|
+
td,
|
279
380
|
th {
|
280
|
-
|
281
|
-
|
282
|
-
|
381
|
+
border-color: inherit;
|
382
|
+
border-style: solid;
|
383
|
+
border-width: 0;
|
283
384
|
}
|
284
385
|
|
285
386
|
|
286
|
-
//
|
287
387
|
// Forms
|
288
388
|
//
|
389
|
+
// 1. Allow labels to use `margin` for spacing.
|
289
390
|
|
290
391
|
label {
|
291
|
-
|
292
|
-
display: inline-block;
|
293
|
-
margin-bottom: $label-margin-bottom;
|
392
|
+
display: inline-block; // 1
|
294
393
|
}
|
295
394
|
|
296
395
|
// Remove the default `border-radius` that macOS Chrome adds.
|
297
|
-
//
|
298
|
-
|
396
|
+
// See https://github.com/twbs/bootstrap/issues/24093
|
397
|
+
|
299
398
|
button {
|
300
|
-
// stylelint-disable-next-line property-
|
399
|
+
// stylelint-disable-next-line property-disallowed-list
|
301
400
|
border-radius: 0;
|
302
401
|
}
|
303
402
|
|
304
|
-
//
|
305
|
-
//
|
306
|
-
//
|
307
|
-
//
|
308
|
-
|
309
|
-
|
310
|
-
outline:
|
403
|
+
// Explicitly remove focus outline in Chromium when it shouldn't be
|
404
|
+
// visible (e.g. as result of mouse click or touch tap). It already
|
405
|
+
// should be doing this automatically, but seems to currently be
|
406
|
+
// confused and applies its very visible two-tone outline anyway.
|
407
|
+
|
408
|
+
button:focus:not(:focus-visible) {
|
409
|
+
outline: 0;
|
311
410
|
}
|
312
411
|
|
412
|
+
// 1. Remove the margin in Firefox and Safari
|
413
|
+
|
313
414
|
input,
|
314
415
|
button,
|
315
416
|
select,
|
316
417
|
optgroup,
|
317
418
|
textarea {
|
318
|
-
margin: 0; //
|
419
|
+
margin: 0; // 1
|
319
420
|
font-family: inherit;
|
320
421
|
@include font-size(inherit);
|
321
422
|
line-height: inherit;
|
322
423
|
}
|
323
424
|
|
324
|
-
|
325
|
-
input {
|
326
|
-
overflow: visible; // Show the overflow in Edge
|
327
|
-
}
|
328
|
-
|
425
|
+
// Remove the inheritance of text transform in Firefox
|
329
426
|
button,
|
330
427
|
select {
|
331
|
-
text-transform: none;
|
428
|
+
text-transform: none;
|
332
429
|
}
|
333
|
-
|
334
|
-
// Remove the inheritance of word-wrap in Safari.
|
430
|
+
// Set the cursor for non-`<button>` buttons
|
335
431
|
//
|
336
|
-
// Details at https://github.com/twbs/bootstrap/
|
432
|
+
// Details at https://github.com/twbs/bootstrap/pull/30562
|
433
|
+
[role="button"] {
|
434
|
+
cursor: pointer;
|
435
|
+
}
|
436
|
+
|
337
437
|
select {
|
438
|
+
// Remove the inheritance of word-wrap in Safari.
|
439
|
+
// See https://github.com/twbs/bootstrap/issues/24990
|
338
440
|
word-wrap: normal;
|
441
|
+
|
442
|
+
// Undo the opacity change from Chrome
|
443
|
+
&:disabled {
|
444
|
+
opacity: 1;
|
445
|
+
}
|
339
446
|
}
|
340
447
|
|
448
|
+
// Remove the dropdown arrow in Chrome from inputs built with datalists.
|
449
|
+
// See https://stackoverflow.com/a/54997118
|
450
|
+
|
451
|
+
[list]::-webkit-calendar-picker-indicator {
|
452
|
+
display: none;
|
453
|
+
}
|
341
454
|
|
342
455
|
// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
343
456
|
// controls in Android 4.
|
344
457
|
// 2. Correct the inability to style clickable types in iOS and Safari.
|
458
|
+
// 3. Opinionated: add "hand" cursor to non-disabled button elements.
|
459
|
+
|
345
460
|
button,
|
346
461
|
[type="button"], // 1
|
347
462
|
[type="reset"],
|
348
463
|
[type="submit"] {
|
349
464
|
-webkit-appearance: button; // 2
|
350
|
-
}
|
351
465
|
|
352
|
-
|
353
|
-
@if $enable-pointer-cursor-for-buttons {
|
354
|
-
button,
|
355
|
-
[type="button"],
|
356
|
-
[type="reset"],
|
357
|
-
[type="submit"] {
|
466
|
+
@if $enable-button-pointers {
|
358
467
|
&:not(:disabled) {
|
359
|
-
cursor: pointer;
|
468
|
+
cursor: pointer; // 3
|
360
469
|
}
|
361
470
|
}
|
362
471
|
}
|
363
472
|
|
364
473
|
// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
|
365
|
-
|
366
|
-
|
367
|
-
[type="reset"]::-moz-focus-inner,
|
368
|
-
[type="submit"]::-moz-focus-inner {
|
474
|
+
|
475
|
+
::-moz-focus-inner {
|
369
476
|
padding: 0;
|
370
477
|
border-style: none;
|
371
478
|
}
|
372
479
|
|
373
|
-
|
374
|
-
input[type="checkbox"] {
|
375
|
-
box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
|
376
|
-
padding: 0; // 2. Remove the padding in IE 10-
|
377
|
-
}
|
378
|
-
|
379
|
-
|
380
|
-
input[type="date"],
|
381
|
-
input[type="time"],
|
382
|
-
input[type="datetime-local"],
|
383
|
-
input[type="month"] {
|
384
|
-
// Remove the default appearance of temporal inputs to avoid a Mobile Safari
|
385
|
-
// bug where setting a custom line-height prevents text from being vertically
|
386
|
-
// centered within the input.
|
387
|
-
// See https://bugs.webkit.org/show_bug.cgi?id=139848
|
388
|
-
// and https://github.com/twbs/bootstrap/issues/11266
|
389
|
-
-webkit-appearance: listbox;
|
390
|
-
}
|
480
|
+
// 1. Textareas should really only resize vertically so they don't break their (horizontal) containers.
|
391
481
|
|
392
482
|
textarea {
|
393
|
-
|
394
|
-
// Textareas should really only resize vertically so they don't break their (horizontal) containers.
|
395
|
-
resize: vertical;
|
483
|
+
resize: vertical; // 1
|
396
484
|
}
|
397
485
|
|
486
|
+
// 1. Browsers set a default `min-width: min-content;` on fieldsets,
|
487
|
+
// unlike e.g. `<div>`s, which have `min-width: 0;` by default.
|
488
|
+
// So we reset that to ensure fieldsets behave more like a standard block element.
|
489
|
+
// See https://github.com/twbs/bootstrap/issues/12359
|
490
|
+
// and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
|
491
|
+
// 2. Reset the default outline behavior of fieldsets so they don't affect page layout.
|
492
|
+
|
398
493
|
fieldset {
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
//
|
403
|
-
// and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
|
404
|
-
min-width: 0;
|
405
|
-
// Reset the default outline behavior of fieldsets so they don't affect page layout.
|
406
|
-
padding: 0;
|
407
|
-
margin: 0;
|
408
|
-
border: 0;
|
494
|
+
min-width: 0; // 1
|
495
|
+
padding: 0; // 2
|
496
|
+
margin: 0; // 2
|
497
|
+
border: 0; // 2
|
409
498
|
}
|
410
499
|
|
411
|
-
// 1.
|
412
|
-
//
|
500
|
+
// 1. By using `float: left`, the legend will behave like a block element.
|
501
|
+
// This way the border of a fieldset wraps around the legend if present.
|
502
|
+
// 2. Fix wrapping bug.
|
503
|
+
// See https://github.com/twbs/bootstrap/issues/29712
|
504
|
+
|
413
505
|
legend {
|
414
|
-
|
506
|
+
float: left; // 1
|
415
507
|
width: 100%;
|
416
|
-
max-width: 100%; // 1
|
417
508
|
padding: 0;
|
418
|
-
margin-bottom:
|
419
|
-
@include font-size(
|
509
|
+
margin-bottom: $legend-margin-bottom;
|
510
|
+
@include font-size($legend-font-size);
|
511
|
+
font-weight: $legend-font-weight;
|
420
512
|
line-height: inherit;
|
421
|
-
|
422
|
-
|
513
|
+
|
514
|
+
+ * {
|
515
|
+
clear: left; // 2
|
516
|
+
}
|
423
517
|
}
|
424
518
|
|
425
|
-
|
426
|
-
|
519
|
+
// Fix height of inputs with a type of datetime-local, date, month, week, or time
|
520
|
+
// See https://github.com/twbs/bootstrap/issues/18842
|
521
|
+
|
522
|
+
::-webkit-datetime-edit-fields-wrapper,
|
523
|
+
::-webkit-datetime-edit-text,
|
524
|
+
::-webkit-datetime-edit-minute,
|
525
|
+
::-webkit-datetime-edit-hour-field,
|
526
|
+
::-webkit-datetime-edit-day-field,
|
527
|
+
::-webkit-datetime-edit-month-field,
|
528
|
+
::-webkit-datetime-edit-year-field {
|
529
|
+
padding: 0;
|
427
530
|
}
|
428
531
|
|
429
|
-
|
430
|
-
[type="number"]::-webkit-inner-spin-button,
|
431
|
-
[type="number"]::-webkit-outer-spin-button {
|
532
|
+
::-webkit-inner-spin-button {
|
432
533
|
height: auto;
|
433
534
|
}
|
434
535
|
|
536
|
+
// 1. Correct the outline style in Safari.
|
537
|
+
// 2. This overrides the extra rounded corners on search inputs in iOS so that our
|
538
|
+
// `.form-control` class can properly style them. Note that this cannot simply
|
539
|
+
// be added to `.form-control` as it's not specific enough. For details, see
|
540
|
+
// https://github.com/twbs/bootstrap/issues/11586.
|
541
|
+
|
435
542
|
[type="search"] {
|
436
|
-
|
437
|
-
|
438
|
-
// be added to `.form-control` as it's not specific enough. For details, see
|
439
|
-
// https://github.com/twbs/bootstrap/issues/11586.
|
440
|
-
outline-offset: -2px; // 2. Correct the outline style in Safari.
|
441
|
-
-webkit-appearance: none;
|
543
|
+
outline-offset: -2px; // 1
|
544
|
+
-webkit-appearance: textfield; // 2
|
442
545
|
}
|
443
546
|
|
444
|
-
//
|
547
|
+
// 1. A few input types should stay LTR
|
548
|
+
// See https://rtlstyling.com/posts/rtl-styling#form-inputs
|
549
|
+
// 2. RTL only output
|
550
|
+
// See https://rtlcss.com/learn/usage-guide/control-directives/#raw
|
551
|
+
|
552
|
+
/* rtl:raw:
|
553
|
+
[type="tel"],
|
554
|
+
[type="url"],
|
555
|
+
[type="email"],
|
556
|
+
[type="number"] {
|
557
|
+
direction: ltr;
|
558
|
+
}
|
559
|
+
*/
|
560
|
+
|
445
561
|
// Remove the inner padding in Chrome and Safari on macOS.
|
446
|
-
//
|
447
562
|
|
448
|
-
|
563
|
+
::-webkit-search-decoration {
|
449
564
|
-webkit-appearance: none;
|
450
565
|
}
|
451
566
|
|
452
|
-
//
|
453
|
-
|
454
|
-
|
455
|
-
|
567
|
+
// Remove padding around color pickers in webkit browsers
|
568
|
+
|
569
|
+
::-webkit-color-swatch-wrapper {
|
570
|
+
padding: 0;
|
571
|
+
}
|
572
|
+
|
573
|
+
|
574
|
+
// Inherit font family and line height for file input buttons
|
575
|
+
|
576
|
+
::file-selector-button {
|
577
|
+
font: inherit;
|
578
|
+
}
|
579
|
+
|
580
|
+
// 1. Change font properties to `inherit`
|
581
|
+
// 2. Correct the inability to style clickable types in iOS and Safari.
|
456
582
|
|
457
583
|
::-webkit-file-upload-button {
|
458
|
-
font: inherit; //
|
459
|
-
-webkit-appearance: button; //
|
584
|
+
font: inherit; // 1
|
585
|
+
-webkit-appearance: button; // 2
|
460
586
|
}
|
461
587
|
|
462
|
-
//
|
463
588
|
// Correct element displays
|
464
|
-
//
|
465
589
|
|
466
590
|
output {
|
467
591
|
display: inline-block;
|
468
592
|
}
|
469
593
|
|
594
|
+
// Remove border from iframe
|
595
|
+
|
596
|
+
iframe {
|
597
|
+
border: 0;
|
598
|
+
}
|
599
|
+
|
600
|
+
// Summary
|
601
|
+
//
|
602
|
+
// 1. Add the correct display in all browsers
|
603
|
+
|
470
604
|
summary {
|
471
|
-
display: list-item; //
|
605
|
+
display: list-item; // 1
|
472
606
|
cursor: pointer;
|
473
607
|
}
|
474
608
|
|
475
|
-
|
476
|
-
|
609
|
+
|
610
|
+
// Progress
|
611
|
+
//
|
612
|
+
// Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
613
|
+
|
614
|
+
progress {
|
615
|
+
vertical-align: baseline;
|
477
616
|
}
|
478
617
|
|
479
|
-
|
480
|
-
//
|
618
|
+
|
619
|
+
// Hidden attribute
|
620
|
+
//
|
621
|
+
// Always hide an element with the `hidden` HTML attribute.
|
622
|
+
|
481
623
|
[hidden] {
|
482
624
|
display: none !important;
|
483
625
|
}
|