bootstrap 4.1.3 → 5.0.0
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.
- checksums.yaml +4 -4
- data/.travis.yml +17 -2
- data/CHANGELOG.md +2 -14
- data/README.md +7 -4
- data/Rakefile +2 -2
- data/assets/javascripts/bootstrap/alert.js +226 -166
- data/assets/javascripts/bootstrap/base-component.js +63 -0
- data/assets/javascripts/bootstrap/button.js +119 -165
- data/assets/javascripts/bootstrap/carousel.js +634 -445
- data/assets/javascripts/bootstrap/collapse.js +447 -327
- 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 +550 -425
- data/assets/javascripts/bootstrap/modal.js +695 -492
- data/assets/javascripts/bootstrap/offcanvas.js +671 -0
- data/assets/javascripts/bootstrap/popover.js +167 -217
- data/assets/javascripts/bootstrap/scrollspy.js +319 -302
- data/assets/javascripts/bootstrap/tab.js +303 -221
- data/assets/javascripts/bootstrap/toast.js +333 -0
- data/assets/javascripts/bootstrap/tooltip.js +896 -577
- 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 +15 -7
- data/assets/javascripts/bootstrap.js +4262 -3163
- data/assets/javascripts/bootstrap.min.js +4 -4
- data/assets/stylesheets/_bootstrap-grid.scss +54 -21
- data/assets/stylesheets/_bootstrap-reboot.scss +7 -4
- data/assets/stylesheets/_bootstrap.scss +21 -11
- data/assets/stylesheets/bootstrap/_accordion.scss +118 -0
- data/assets/stylesheets/bootstrap/_alert.scss +15 -9
- data/assets/stylesheets/bootstrap/_badge.scss +3 -21
- data/assets/stylesheets/bootstrap/_breadcrumb.scss +5 -18
- data/assets/stylesheets/bootstrap/_button-group.scss +29 -62
- data/assets/stylesheets/bootstrap/_buttons.scss +33 -65
- data/assets/stylesheets/bootstrap/_card.scss +55 -141
- data/assets/stylesheets/bootstrap/_carousel.scss +94 -101
- data/assets/stylesheets/bootstrap/_close.scss +33 -28
- data/assets/stylesheets/bootstrap/_containers.scss +41 -0
- data/assets/stylesheets/bootstrap/_dropdown.scss +114 -40
- data/assets/stylesheets/bootstrap/_forms.scss +9 -333
- data/assets/stylesheets/bootstrap/_functions.scss +148 -29
- data/assets/stylesheets/bootstrap/_grid.scss +4 -34
- data/assets/stylesheets/bootstrap/_helpers.scss +7 -0
- data/assets/stylesheets/bootstrap/_images.scss +4 -4
- data/assets/stylesheets/bootstrap/_list-group.scss +86 -27
- data/assets/stylesheets/bootstrap/_mixins.scss +17 -16
- data/assets/stylesheets/bootstrap/_modal.scss +90 -42
- data/assets/stylesheets/bootstrap/_nav.scss +31 -10
- data/assets/stylesheets/bootstrap/_navbar.scss +68 -61
- data/assets/stylesheets/bootstrap/_offcanvas.scss +77 -0
- data/assets/stylesheets/bootstrap/_pagination.scss +13 -27
- data/assets/stylesheets/bootstrap/_popover.scss +63 -88
- data/assets/stylesheets/bootstrap/_progress.scss +20 -6
- data/assets/stylesheets/bootstrap/_reboot.scss +349 -211
- data/assets/stylesheets/bootstrap/_root.scss +5 -8
- data/assets/stylesheets/bootstrap/_spinners.scss +69 -0
- data/assets/stylesheets/bootstrap/_tables.scss +79 -116
- data/assets/stylesheets/bootstrap/_toasts.scss +51 -0
- data/assets/stylesheets/bootstrap/_tooltip.scss +18 -18
- data/assets/stylesheets/bootstrap/_transitions.scss +2 -3
- data/assets/stylesheets/bootstrap/_type.scss +42 -63
- data/assets/stylesheets/bootstrap/_utilities.scss +594 -15
- data/assets/stylesheets/bootstrap/_variables.scss +952 -440
- 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 +57 -14
- data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +14 -1
- data/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +13 -9
- data/assets/stylesheets/bootstrap/mixins/_buttons.scss +77 -53
- data/assets/stylesheets/bootstrap/mixins/_caret.scss +14 -16
- 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/_deprecate.scss +10 -0
- data/assets/stylesheets/bootstrap/mixins/_forms.scss +87 -97
- data/assets/stylesheets/bootstrap/mixins/_gradients.scss +13 -11
- data/assets/stylesheets/bootstrap/mixins/_grid.scss +106 -33
- data/assets/stylesheets/bootstrap/mixins/_image.scss +0 -20
- data/assets/stylesheets/bootstrap/mixins/_list-group.scss +5 -2
- data/assets/stylesheets/bootstrap/mixins/_pagination.scss +18 -9
- data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
- data/assets/stylesheets/bootstrap/mixins/_table-variants.scss +21 -0
- data/assets/stylesheets/bootstrap/mixins/_transition.scss +19 -6
- 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 +312 -0
- data/bootstrap.gemspec +7 -6
- data/lib/bootstrap/engine.rb +3 -0
- data/lib/bootstrap/version.rb +4 -2
- data/lib/bootstrap.rb +10 -7
- data/tasks/updater/js.rb +20 -5
- data/tasks/updater/network.rb +8 -2
- data/test/dummy_rails/app/assets/config/manifest.js +3 -0
- data/test/dummy_rails/app/assets/javascripts/application.js +4 -3
- data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
- data/test/dummy_rails/app/views/layouts/application.html.erb +3 -1
- data/test/dummy_rails/app/views/pages/root.html +89 -0
- data/test/dummy_rails/config/application.rb +0 -3
- data/test/gemfiles/rails_6_0.gemfile +7 -0
- data/test/gemfiles/rails_6_1.gemfile +7 -0
- data/test/support/dummy_rails_integration.rb +3 -1
- data/test/test_helper.rb +18 -13
- metadata +64 -79
- data/assets/javascripts/bootstrap/util.js +0 -143
- data/assets/stylesheets/bootstrap/_code.scss +0 -48
- data/assets/stylesheets/bootstrap/_custom-forms.scss +0 -433
- data/assets/stylesheets/bootstrap/_input-group.scss +0 -173
- data/assets/stylesheets/bootstrap/_jumbotron.scss +0 -16
- data/assets/stylesheets/bootstrap/_media.scss +0 -8
- data/assets/stylesheets/bootstrap/_print.scss +0 -141
- data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -21
- data/assets/stylesheets/bootstrap/mixins/_badge.scss +0 -12
- data/assets/stylesheets/bootstrap/mixins/_float.scss +0 -11
- data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -67
- data/assets/stylesheets/bootstrap/mixins/_hover.scss +0 -37
- data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
- data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +0 -33
- data/assets/stylesheets/bootstrap/mixins/_size.scss +0 -6
- data/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -30
- data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -14
- data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +0 -13
- data/assets/stylesheets/bootstrap/mixins/_visibility.scss +0 -7
- 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 -59
- data/assets/stylesheets/bootstrap/utilities/_display.scss +0 -38
- data/assets/stylesheets/bootstrap/utilities/_embed.scss +0 -52
- data/assets/stylesheets/bootstrap/utilities/_flex.scss +0 -51
- data/assets/stylesheets/bootstrap/utilities/_float.scss +0 -9
- data/assets/stylesheets/bootstrap/utilities/_position.scss +0 -37
- 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 -12
- data/assets/stylesheets/bootstrap/utilities/_spacing.scss +0 -51
- data/assets/stylesheets/bootstrap/utilities/_text.scss +0 -58
- data/assets/stylesheets/bootstrap/utilities/_visibility.scss +0 -11
- data/test/dummy_rails/app/views/pages/root.html.slim +0 -58
- /data/assets/stylesheets/bootstrap/{utilities → helpers}/_clearfix.scss +0 -0
@@ -1,4 +1,5 @@
|
|
1
|
-
// stylelint-disable
|
1
|
+
// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
|
2
|
+
|
2
3
|
|
3
4
|
// Reboot
|
4
5
|
//
|
@@ -10,128 +11,159 @@
|
|
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. Setting @viewport causes scrollbars to overlap content in IE11 and Edge, so
|
18
|
-
// we force a non-overlapping, non-auto-hiding scrollbar to counteract.
|
19
|
-
// 6. 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`.
|
20
15
|
|
21
16
|
*,
|
22
17
|
*::before,
|
23
18
|
*::after {
|
24
|
-
box-sizing: border-box;
|
19
|
+
box-sizing: border-box;
|
25
20
|
}
|
26
21
|
|
27
|
-
html {
|
28
|
-
font-family: sans-serif; // 2
|
29
|
-
line-height: 1.15; // 3
|
30
|
-
-webkit-text-size-adjust: 100%; // 4
|
31
|
-
-ms-text-size-adjust: 100%; // 4
|
32
|
-
-ms-overflow-style: scrollbar; // 5
|
33
|
-
-webkit-tap-highlight-color: rgba($black, 0); // 6
|
34
|
-
}
|
35
22
|
|
36
|
-
//
|
37
|
-
|
38
|
-
|
39
|
-
|
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
|
+
}
|
40
35
|
}
|
41
36
|
}
|
42
37
|
|
43
|
-
// stylelint-disable selector-list-comma-newline-after
|
44
|
-
// Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
|
45
|
-
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
|
46
|
-
display: block;
|
47
|
-
}
|
48
|
-
// stylelint-enable selector-list-comma-newline-after
|
49
38
|
|
50
39
|
// Body
|
51
40
|
//
|
52
41
|
// 1. Remove the margin in all browsers.
|
53
42
|
// 2. As a best practice, apply a default `background-color`.
|
54
|
-
// 3.
|
55
|
-
//
|
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.
|
56
45
|
|
57
46
|
body {
|
58
47
|
margin: 0; // 1
|
59
48
|
font-family: $font-family-base;
|
60
|
-
font-size
|
49
|
+
@include font-size($font-size-base);
|
61
50
|
font-weight: $font-weight-base;
|
62
51
|
line-height: $line-height-base;
|
63
52
|
color: $body-color;
|
64
|
-
text-align:
|
53
|
+
text-align: $body-text-align;
|
65
54
|
background-color: $body-bg; // 2
|
66
|
-
|
67
|
-
|
68
|
-
// Suppress the focus outline on elements that cannot be accessed via keyboard.
|
69
|
-
// This prevents an unwanted focus outline from appearing around elements that
|
70
|
-
// might still respond to pointer events.
|
71
|
-
//
|
72
|
-
// Credit: https://github.com/suitcss/base
|
73
|
-
[tabindex="-1"]:focus {
|
74
|
-
outline: 0 !important;
|
55
|
+
-webkit-text-size-adjust: 100%; // 3
|
56
|
+
-webkit-tap-highlight-color: rgba($black, 0); // 4
|
75
57
|
}
|
76
58
|
|
77
59
|
|
78
60
|
// Content grouping
|
79
61
|
//
|
80
|
-
// 1.
|
81
|
-
// 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
|
82
64
|
|
83
65
|
hr {
|
84
|
-
|
85
|
-
|
86
|
-
|
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
|
87
75
|
}
|
88
76
|
|
89
77
|
|
90
|
-
//
|
91
78
|
// Typography
|
92
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.
|
93
83
|
|
94
|
-
|
95
|
-
//
|
96
|
-
// By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
|
97
|
-
// margin for easier control within type scales as it avoids margin collapsing.
|
98
|
-
// stylelint-disable selector-list-comma-newline-after
|
99
|
-
h1, h2, h3, h4, h5, h6 {
|
100
|
-
margin-top: 0;
|
84
|
+
%heading {
|
85
|
+
margin-top: 0; // 1
|
101
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);
|
97
|
+
}
|
98
|
+
|
99
|
+
h2 {
|
100
|
+
@extend %heading;
|
101
|
+
@include font-size($h2-font-size);
|
102
102
|
}
|
103
|
-
|
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
|
+
|
104
124
|
|
105
125
|
// Reset margins on paragraphs
|
106
126
|
//
|
107
127
|
// Similarly, the top margin on `<p>`s get reset. However, we also reset the
|
108
128
|
// bottom margin to use `rem` units instead of `em`.
|
129
|
+
|
109
130
|
p {
|
110
131
|
margin-top: 0;
|
111
132
|
margin-bottom: $paragraph-margin-bottom;
|
112
133
|
}
|
113
134
|
|
135
|
+
|
114
136
|
// Abbreviations
|
115
137
|
//
|
116
|
-
// 1.
|
117
|
-
// 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.
|
118
140
|
// 3. Add explicit cursor to indicate changed behavior.
|
119
|
-
// 4.
|
141
|
+
// 4. Prevent the text-decoration to be skipped.
|
120
142
|
|
121
143
|
abbr[title],
|
122
|
-
abbr[data-original-title] { //
|
123
|
-
text-decoration: underline; // 2
|
144
|
+
abbr[data-bs-original-title] { // 1
|
124
145
|
text-decoration: underline dotted; // 2
|
125
146
|
cursor: help; // 3
|
126
|
-
|
147
|
+
text-decoration-skip-ink: none; // 4
|
127
148
|
}
|
128
149
|
|
150
|
+
|
151
|
+
// Address
|
152
|
+
|
129
153
|
address {
|
130
154
|
margin-bottom: 1rem;
|
131
155
|
font-style: normal;
|
132
156
|
line-height: inherit;
|
133
157
|
}
|
134
158
|
|
159
|
+
|
160
|
+
// Lists
|
161
|
+
|
162
|
+
ol,
|
163
|
+
ul {
|
164
|
+
padding-left: 2rem;
|
165
|
+
}
|
166
|
+
|
135
167
|
ol,
|
136
168
|
ul,
|
137
169
|
dl {
|
@@ -150,39 +182,57 @@ dt {
|
|
150
182
|
font-weight: $dt-font-weight;
|
151
183
|
}
|
152
184
|
|
185
|
+
// 1. Undo browser default
|
186
|
+
|
153
187
|
dd {
|
154
188
|
margin-bottom: .5rem;
|
155
|
-
margin-left: 0; //
|
189
|
+
margin-left: 0; // 1
|
156
190
|
}
|
157
191
|
|
192
|
+
|
193
|
+
// Blockquote
|
194
|
+
|
158
195
|
blockquote {
|
159
196
|
margin: 0 0 1rem;
|
160
197
|
}
|
161
198
|
|
162
|
-
dfn {
|
163
|
-
font-style: italic; // Add the correct font style in Android 4.3-
|
164
|
-
}
|
165
199
|
|
166
|
-
//
|
200
|
+
// Strong
|
201
|
+
//
|
202
|
+
// Add the correct font weight in Chrome, Edge, and Safari
|
203
|
+
|
167
204
|
b,
|
168
205
|
strong {
|
169
|
-
font-weight: bolder;
|
206
|
+
font-weight: $font-weight-bolder;
|
170
207
|
}
|
171
|
-
|
208
|
+
|
209
|
+
|
210
|
+
// Small
|
211
|
+
//
|
212
|
+
// Add the correct font size in all browsers
|
172
213
|
|
173
214
|
small {
|
174
|
-
font-size
|
215
|
+
@include font-size($small-font-size);
|
216
|
+
}
|
217
|
+
|
218
|
+
|
219
|
+
// Mark
|
220
|
+
|
221
|
+
mark {
|
222
|
+
padding: $mark-padding;
|
223
|
+
background-color: $mark-bg;
|
175
224
|
}
|
176
225
|
|
226
|
+
|
227
|
+
// Sub and Sup
|
177
228
|
//
|
178
229
|
// Prevent `sub` and `sup` elements from affecting the line height in
|
179
230
|
// all browsers.
|
180
|
-
//
|
181
231
|
|
182
232
|
sub,
|
183
233
|
sup {
|
184
234
|
position: relative;
|
185
|
-
font-size
|
235
|
+
@include font-size($sub-sup-font-size);
|
186
236
|
line-height: 0;
|
187
237
|
vertical-align: baseline;
|
188
238
|
}
|
@@ -191,293 +241,381 @@ sub { bottom: -.25em; }
|
|
191
241
|
sup { top: -.5em; }
|
192
242
|
|
193
243
|
|
194
|
-
//
|
195
244
|
// Links
|
196
|
-
//
|
197
245
|
|
198
246
|
a {
|
199
247
|
color: $link-color;
|
200
248
|
text-decoration: $link-decoration;
|
201
|
-
background-color: transparent; // Remove the gray background on active links in IE 10.
|
202
|
-
-webkit-text-decoration-skip: objects; // Remove gaps in links underline in iOS 8+ and Safari 8+.
|
203
249
|
|
204
|
-
|
250
|
+
&:hover {
|
205
251
|
color: $link-hover-color;
|
206
252
|
text-decoration: $link-hover-decoration;
|
207
253
|
}
|
208
254
|
}
|
209
255
|
|
210
|
-
// And undo these styles for placeholder links/named anchors (without href)
|
211
|
-
// which have not been made explicitly keyboard-focusable (without tabindex).
|
256
|
+
// And undo these styles for placeholder links/named anchors (without href).
|
212
257
|
// It would be more straightforward to just use a[href] in previous block, but that
|
213
258
|
// causes specificity issues in many other styles that are too complex to fix.
|
214
259
|
// See https://github.com/twbs/bootstrap/issues/19402
|
215
260
|
|
216
|
-
a:not([href]):not([
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
@include hover-focus {
|
261
|
+
a:not([href]):not([class]) {
|
262
|
+
&,
|
263
|
+
&:hover {
|
221
264
|
color: inherit;
|
222
265
|
text-decoration: none;
|
223
266
|
}
|
224
|
-
|
225
|
-
&:focus {
|
226
|
-
outline: 0;
|
227
|
-
}
|
228
267
|
}
|
229
268
|
|
230
269
|
|
231
|
-
//
|
232
270
|
// Code
|
233
|
-
//
|
234
271
|
|
235
272
|
pre,
|
236
273
|
code,
|
237
274
|
kbd,
|
238
275
|
samp {
|
239
|
-
font-family: $font-family-
|
240
|
-
font-size
|
276
|
+
font-family: $font-family-code;
|
277
|
+
@include font-size(1em); // Correct the odd `em` font sizing in all browsers.
|
278
|
+
direction: ltr #{"/* rtl:ignore */"};
|
279
|
+
unicode-bidi: bidi-override;
|
241
280
|
}
|
242
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
|
+
|
243
286
|
pre {
|
244
|
-
|
245
|
-
margin-top: 0;
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
//
|
252
|
-
|
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
|
+
}
|
253
325
|
}
|
254
326
|
|
255
327
|
|
256
|
-
//
|
257
328
|
// Figures
|
258
329
|
//
|
330
|
+
// Apply a consistent margin strategy (matches our type styles).
|
259
331
|
|
260
332
|
figure {
|
261
|
-
// Apply a consistent margin strategy (matches our type styles).
|
262
333
|
margin: 0 0 1rem;
|
263
334
|
}
|
264
335
|
|
265
336
|
|
266
|
-
//
|
267
337
|
// Images and content
|
268
|
-
//
|
269
|
-
|
270
|
-
img {
|
271
|
-
vertical-align: middle;
|
272
|
-
border-style: none; // Remove the border on images inside links in IE 10-.
|
273
|
-
}
|
274
338
|
|
339
|
+
img,
|
275
340
|
svg {
|
276
|
-
// Workaround for the SVG overflow bug in IE10/11 is still required.
|
277
|
-
// See https://github.com/twbs/bootstrap/issues/26878
|
278
|
-
overflow: hidden;
|
279
341
|
vertical-align: middle;
|
280
342
|
}
|
281
343
|
|
282
344
|
|
283
|
-
//
|
284
345
|
// Tables
|
285
346
|
//
|
347
|
+
// Prevent double borders
|
286
348
|
|
287
349
|
table {
|
288
|
-
|
350
|
+
caption-side: bottom;
|
351
|
+
border-collapse: collapse;
|
289
352
|
}
|
290
353
|
|
291
354
|
caption {
|
292
|
-
padding-top: $table-cell-padding;
|
293
|
-
padding-bottom: $table-cell-padding;
|
355
|
+
padding-top: $table-cell-padding-y;
|
356
|
+
padding-bottom: $table-cell-padding-y;
|
294
357
|
color: $table-caption-color;
|
295
358
|
text-align: left;
|
296
|
-
caption-side: bottom;
|
297
359
|
}
|
298
360
|
|
361
|
+
// 1. Removes font-weight bold by inheriting
|
362
|
+
// 2. Matches default `<td>` alignment by inheriting `text-align`.
|
363
|
+
// 3. Fix alignment for Safari
|
364
|
+
|
365
|
+
th {
|
366
|
+
font-weight: $table-th-font-weight; // 1
|
367
|
+
text-align: inherit; // 2
|
368
|
+
text-align: -webkit-match-parent; // 3
|
369
|
+
}
|
370
|
+
|
371
|
+
thead,
|
372
|
+
tbody,
|
373
|
+
tfoot,
|
374
|
+
tr,
|
375
|
+
td,
|
299
376
|
th {
|
300
|
-
|
301
|
-
|
302
|
-
|
377
|
+
border-color: inherit;
|
378
|
+
border-style: solid;
|
379
|
+
border-width: 0;
|
303
380
|
}
|
304
381
|
|
305
382
|
|
306
|
-
//
|
307
383
|
// Forms
|
308
384
|
//
|
385
|
+
// 1. Allow labels to use `margin` for spacing.
|
309
386
|
|
310
387
|
label {
|
311
|
-
|
312
|
-
display: inline-block;
|
313
|
-
margin-bottom: $label-margin-bottom;
|
388
|
+
display: inline-block; // 1
|
314
389
|
}
|
315
390
|
|
316
391
|
// Remove the default `border-radius` that macOS Chrome adds.
|
317
|
-
//
|
318
|
-
|
392
|
+
// See https://github.com/twbs/bootstrap/issues/24093
|
393
|
+
|
319
394
|
button {
|
395
|
+
// stylelint-disable-next-line property-disallowed-list
|
320
396
|
border-radius: 0;
|
321
397
|
}
|
322
398
|
|
323
|
-
//
|
324
|
-
//
|
325
|
-
//
|
326
|
-
//
|
327
|
-
|
328
|
-
|
329
|
-
outline:
|
399
|
+
// Explicitly remove focus outline in Chromium when it shouldn't be
|
400
|
+
// visible (e.g. as result of mouse click or touch tap). It already
|
401
|
+
// should be doing this automatically, but seems to currently be
|
402
|
+
// confused and applies its very visible two-tone outline anyway.
|
403
|
+
|
404
|
+
button:focus:not(:focus-visible) {
|
405
|
+
outline: 0;
|
330
406
|
}
|
331
407
|
|
408
|
+
// 1. Remove the margin in Firefox and Safari
|
409
|
+
|
332
410
|
input,
|
333
411
|
button,
|
334
412
|
select,
|
335
413
|
optgroup,
|
336
414
|
textarea {
|
337
|
-
margin: 0; //
|
415
|
+
margin: 0; // 1
|
338
416
|
font-family: inherit;
|
339
|
-
font-size
|
417
|
+
@include font-size(inherit);
|
340
418
|
line-height: inherit;
|
341
419
|
}
|
342
420
|
|
421
|
+
// Remove the inheritance of text transform in Firefox
|
343
422
|
button,
|
344
|
-
|
345
|
-
|
423
|
+
select {
|
424
|
+
text-transform: none;
|
425
|
+
}
|
426
|
+
// Set the cursor for non-`<button>` buttons
|
427
|
+
//
|
428
|
+
// Details at https://github.com/twbs/bootstrap/pull/30562
|
429
|
+
[role="button"] {
|
430
|
+
cursor: pointer;
|
346
431
|
}
|
347
432
|
|
348
|
-
button,
|
349
433
|
select {
|
350
|
-
|
434
|
+
// Remove the inheritance of word-wrap in Safari.
|
435
|
+
// See https://github.com/twbs/bootstrap/issues/24990
|
436
|
+
word-wrap: normal;
|
437
|
+
|
438
|
+
// Undo the opacity change from Chrome
|
439
|
+
&:disabled {
|
440
|
+
opacity: 1;
|
441
|
+
}
|
442
|
+
}
|
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;
|
351
449
|
}
|
352
450
|
|
353
451
|
// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
|
354
452
|
// controls in Android 4.
|
355
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
|
+
|
356
456
|
button,
|
357
|
-
|
457
|
+
[type="button"], // 1
|
358
458
|
[type="reset"],
|
359
459
|
[type="submit"] {
|
360
460
|
-webkit-appearance: button; // 2
|
461
|
+
|
462
|
+
@if $enable-button-pointers {
|
463
|
+
&:not(:disabled) {
|
464
|
+
cursor: pointer; // 3
|
465
|
+
}
|
466
|
+
}
|
361
467
|
}
|
362
468
|
|
363
469
|
// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
|
364
|
-
|
365
|
-
|
366
|
-
[type="reset"]::-moz-focus-inner,
|
367
|
-
[type="submit"]::-moz-focus-inner {
|
470
|
+
|
471
|
+
::-moz-focus-inner {
|
368
472
|
padding: 0;
|
369
473
|
border-style: none;
|
370
474
|
}
|
371
475
|
|
372
|
-
|
373
|
-
input[type="checkbox"] {
|
374
|
-
box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
|
375
|
-
padding: 0; // 2. Remove the padding in IE 10-
|
376
|
-
}
|
377
|
-
|
378
|
-
|
379
|
-
input[type="date"],
|
380
|
-
input[type="time"],
|
381
|
-
input[type="datetime-local"],
|
382
|
-
input[type="month"] {
|
383
|
-
// Remove the default appearance of temporal inputs to avoid a Mobile Safari
|
384
|
-
// bug where setting a custom line-height prevents text from being vertically
|
385
|
-
// centered within the input.
|
386
|
-
// See https://bugs.webkit.org/show_bug.cgi?id=139848
|
387
|
-
// and https://github.com/twbs/bootstrap/issues/11266
|
388
|
-
-webkit-appearance: listbox;
|
389
|
-
}
|
476
|
+
// 1. Textareas should really only resize vertically so they don't break their (horizontal) containers.
|
390
477
|
|
391
478
|
textarea {
|
392
|
-
|
393
|
-
// Textareas should really only resize vertically so they don't break their (horizontal) containers.
|
394
|
-
resize: vertical;
|
479
|
+
resize: vertical; // 1
|
395
480
|
}
|
396
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
|
+
|
397
489
|
fieldset {
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
//
|
402
|
-
// and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
|
403
|
-
min-width: 0;
|
404
|
-
// Reset the default outline behavior of fieldsets so they don't affect page layout.
|
405
|
-
padding: 0;
|
406
|
-
margin: 0;
|
407
|
-
border: 0;
|
490
|
+
min-width: 0; // 1
|
491
|
+
padding: 0; // 2
|
492
|
+
margin: 0; // 2
|
493
|
+
border: 0; // 2
|
408
494
|
}
|
409
495
|
|
410
|
-
// 1.
|
411
|
-
//
|
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
|
+
|
412
501
|
legend {
|
413
|
-
|
502
|
+
float: left; // 1
|
414
503
|
width: 100%;
|
415
|
-
max-width: 100%; // 1
|
416
504
|
padding: 0;
|
417
|
-
margin-bottom:
|
418
|
-
font-size
|
505
|
+
margin-bottom: $legend-margin-bottom;
|
506
|
+
@include font-size($legend-font-size);
|
507
|
+
font-weight: $legend-font-weight;
|
419
508
|
line-height: inherit;
|
420
|
-
|
421
|
-
|
509
|
+
|
510
|
+
+ * {
|
511
|
+
clear: left; // 2
|
512
|
+
}
|
422
513
|
}
|
423
514
|
|
424
|
-
|
425
|
-
|
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;
|
426
526
|
}
|
427
527
|
|
428
|
-
|
429
|
-
[type="number"]::-webkit-inner-spin-button,
|
430
|
-
[type="number"]::-webkit-outer-spin-button {
|
528
|
+
::-webkit-inner-spin-button {
|
431
529
|
height: auto;
|
432
530
|
}
|
433
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
|
+
|
434
538
|
[type="search"] {
|
435
|
-
|
436
|
-
|
437
|
-
// be added to `.form-control` as it's not specific enough. For details, see
|
438
|
-
// https://github.com/twbs/bootstrap/issues/11586.
|
439
|
-
outline-offset: -2px; // 2. Correct the outline style in Safari.
|
440
|
-
-webkit-appearance: none;
|
539
|
+
outline-offset: -2px; // 1
|
540
|
+
-webkit-appearance: textfield; // 2
|
441
541
|
}
|
442
542
|
|
443
|
-
//
|
444
|
-
//
|
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
|
+
|
557
|
+
// Remove the inner padding in Chrome and Safari on macOS.
|
446
558
|
|
447
|
-
|
448
|
-
[type="search"]::-webkit-search-decoration {
|
559
|
+
::-webkit-search-decoration {
|
449
560
|
-webkit-appearance: none;
|
450
561
|
}
|
451
562
|
|
452
|
-
//
|
453
|
-
|
454
|
-
|
455
|
-
|
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.
|
456
578
|
|
457
579
|
::-webkit-file-upload-button {
|
458
|
-
font: inherit; //
|
459
|
-
-webkit-appearance: button; //
|
580
|
+
font: inherit; // 1
|
581
|
+
-webkit-appearance: button; // 2
|
460
582
|
}
|
461
583
|
|
462
|
-
//
|
463
584
|
// Correct element displays
|
464
|
-
//
|
465
585
|
|
466
586
|
output {
|
467
587
|
display: inline-block;
|
468
588
|
}
|
469
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
|
+
|
470
600
|
summary {
|
471
|
-
display: list-item; //
|
601
|
+
display: list-item; // 1
|
472
602
|
cursor: pointer;
|
473
603
|
}
|
474
604
|
|
475
|
-
|
476
|
-
|
605
|
+
|
606
|
+
// Progress
|
607
|
+
//
|
608
|
+
// Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
609
|
+
|
610
|
+
progress {
|
611
|
+
vertical-align: baseline;
|
477
612
|
}
|
478
613
|
|
479
|
-
|
480
|
-
//
|
614
|
+
|
615
|
+
// Hidden attribute
|
616
|
+
//
|
617
|
+
// Always hide an element with the `hidden` HTML attribute.
|
618
|
+
|
481
619
|
[hidden] {
|
482
620
|
display: none !important;
|
483
621
|
}
|