bootstrap 4.6.2.1 → 5.0.0.alpha1

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