bootstrap 4.5.2 → 5.0.0.beta1

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