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