1 // stylelint-disable at-rule-no-vendor-prefix, declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
5 // Normalization of HTML elements, manually forked from Normalize.css to remove
6 // styles targeting irrelevant browsers while applying new styles.
8 // Normalize is licensed MIT. https://github.com/necolas/normalize.css
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. 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.
24 box-sizing: border-box; // 1
28 font-family: sans-serif; // 2
29 line-height: 1.15; // 3
30 -webkit-text-size-adjust: 100%; // 4
31 -ms-overflow-style: scrollbar; // 5
32 -webkit-tap-highlight-color: rgba($black, 0); // 6
35 // IE10+ doesn't honor `<meta name="viewport">` in some cases.
42 // Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
44 // stylelint-disable-next-line selector-list-comma-newline-after
45 article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
51 // 1. Remove the margin in all browsers.
52 // 2. As a best practice, apply a default `background-color`.
53 // 3. Set an explicit initial text-align value so that we can later use the
54 // the `inherit` value on things like `<th>` elements.
58 font-family: $font-family-base;
59 font-size: $font-size-base;
60 font-weight: $font-weight-base;
61 line-height: $line-height-base;
63 text-align: left; // 3
64 background-color: $body-bg; // 2
67 // Suppress the focus outline on elements that cannot be accessed via keyboard.
68 // This prevents an unwanted focus outline from appearing around elements that
69 // might still respond to pointer events.
71 // Credit: https://github.com/suitcss/base
72 [tabindex="-1"]:focus {
73 outline: 0 !important;
79 // 1. Add the correct box sizing in Firefox.
80 // 2. Show the overflow in Edge and IE.
83 box-sizing: content-box; // 1
85 overflow: visible; // 2
93 // 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.
97 // stylelint-disable-next-line selector-list-comma-newline-after
98 h1, h2, h3, h4, h5, h6 {
100 margin-bottom: $headings-margin-bottom;
103 // Reset margins on paragraphs
105 // Similarly, the top margin on `<p>`s get reset. However, we also reset the
106 // bottom margin to use `rem` units instead of `em`.
109 margin-bottom: $paragraph-margin-bottom;
114 // 1. Duplicate behavior to the data-* attribute for our tooltip plugin
115 // 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
116 // 3. Add explicit cursor to indicate changed behavior.
117 // 4. Remove the bottom border in Firefox 39-.
118 // 5. Prevent the text-decoration to be skipped.
121 abbr[data-original-title] { // 1
122 text-decoration: underline; // 2
123 text-decoration: underline dotted; // 2
125 border-bottom: 0; // 4
126 text-decoration-skip-ink: none; // 5
132 line-height: inherit;
150 font-weight: $dt-font-weight;
154 margin-bottom: .5rem;
155 margin-left: 0; // Undo browser default
164 font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari
168 font-size: 80%; // Add the correct font size in all browsers
172 // Prevent `sub` and `sup` elements from affecting the line height in
181 vertical-align: baseline;
184 sub { bottom: -.25em; }
194 text-decoration: $link-decoration;
195 background-color: transparent; // Remove the gray background on active links in IE 10.
198 color: $link-hover-color;
199 text-decoration: $link-hover-decoration;
203 // And undo these styles for placeholder links/named anchors (without href)
204 // which have not been made explicitly keyboard-focusable (without tabindex).
205 // It would be more straightforward to just use a[href] in previous block, but that
206 // causes specificity issues in many other styles that are too complex to fix.
207 // See https://github.com/twbs/bootstrap/issues/19402
209 a:not([href]):not([tabindex]) {
211 text-decoration: none;
213 @include hover-focus {
215 text-decoration: none;
232 font-family: $font-family-monospace;
233 font-size: 1em; // Correct the odd `em` font sizing in all browsers.
237 // Remove browser default top margin
239 // Reset browser default of `1em` to use `rem`s
241 // Don't allow content to break outside
243 // We have @viewport set which causes scrollbars to overlap content in IE11 and Edge, so
244 // we force a non-overlapping, non-auto-hiding scrollbar to counteract.
245 -ms-overflow-style: scrollbar;
254 // Apply a consistent margin strategy (matches our type styles).
260 // Images and content
264 vertical-align: middle;
265 border-style: none; // Remove the border on images inside links in IE 10-.
269 // Workaround for the SVG overflow bug in IE10/11 is still required.
270 // See https://github.com/twbs/bootstrap/issues/26878
272 vertical-align: middle;
281 border-collapse: collapse; // Prevent double borders
285 padding-top: $table-cell-padding;
286 padding-bottom: $table-cell-padding;
287 color: $table-caption-color;
289 caption-side: bottom;
293 // Matches default `<td>` alignment by inheriting from the `<body>`, or the
294 // closest parent with a set `text-align`.
304 // Allow labels to use `margin` for spacing.
305 display: inline-block;
306 margin-bottom: $label-margin-bottom;
309 // Remove the default `border-radius` that macOS Chrome adds.
311 // Details at https://github.com/twbs/bootstrap/issues/24093
316 // Work around a Firefox/IE bug where the transparent `button` background
317 // results in a loss of the default `button` focus styles.
319 // Credit: https://github.com/suitcss/base/
322 outline: 5px auto -webkit-focus-ring-color;
330 margin: 0; // Remove the margin in Firefox and Safari
331 font-family: inherit;
333 line-height: inherit;
338 overflow: visible; // Show the overflow in Edge
343 text-transform: none; // Remove the inheritance of text transform in Firefox
346 // 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
347 // controls in Android 4.
348 // 2. Correct the inability to style clickable types in iOS and Safari.
350 [type="button"], // 1
353 -webkit-appearance: button; // 2
356 // Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
357 button::-moz-focus-inner,
358 [type="button"]::-moz-focus-inner,
359 [type="reset"]::-moz-focus-inner,
360 [type="submit"]::-moz-focus-inner {
366 input[type="checkbox"] {
367 box-sizing: border-box; // 1. Add the correct box sizing in IE 10-
368 padding: 0; // 2. Remove the padding in IE 10-
374 input[type="datetime-local"],
375 input[type="month"] {
376 // Remove the default appearance of temporal inputs to avoid a Mobile Safari
377 // bug where setting a custom line-height prevents text from being vertically
378 // centered within the input.
379 // See https://bugs.webkit.org/show_bug.cgi?id=139848
380 // and https://github.com/twbs/bootstrap/issues/11266
381 -webkit-appearance: listbox;
385 overflow: auto; // Remove the default vertical scrollbar in IE.
386 // Textareas should really only resize vertically so they don't break their (horizontal) containers.
391 // Browsers set a default `min-width: min-content;` on fieldsets,
392 // unlike e.g. `<div>`s, which have `min-width: 0;` by default.
393 // So we reset that to ensure fieldsets behave more like a standard block element.
394 // See https://github.com/twbs/bootstrap/issues/12359
395 // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
397 // Reset the default outline behavior of fieldsets so they don't affect page layout.
403 // 1. Correct the text wrapping in Edge and IE.
404 // 2. Correct the color inheritance from `fieldset` elements in IE.
408 max-width: 100%; // 1
410 margin-bottom: .5rem;
412 line-height: inherit;
414 white-space: normal; // 1
418 vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera.
421 // Correct the cursor style of increment and decrement buttons in Chrome.
422 [type="number"]::-webkit-inner-spin-button,
423 [type="number"]::-webkit-outer-spin-button {
428 // This overrides the extra rounded corners on search inputs in iOS so that our
429 // `.form-control` class can properly style them. Note that this cannot simply
430 // be added to `.form-control` as it's not specific enough. For details, see
431 // https://github.com/twbs/bootstrap/issues/11586.
432 outline-offset: -2px; // 2. Correct the outline style in Safari.
433 -webkit-appearance: none;
437 // Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
440 [type="search"]::-webkit-search-decoration {
441 -webkit-appearance: none;
445 // 1. Correct the inability to style clickable types in iOS and Safari.
446 // 2. Change font properties to `inherit` in Safari.
449 ::-webkit-file-upload-button {
451 -webkit-appearance: button; // 1
455 // Correct element displays
459 display: inline-block;
463 display: list-item; // Add the correct display in all browsers
468 display: none; // Add the correct display in IE
471 // Always hide an element with the `hidden` HTML attribute (from PureCSS).
472 // Needed for proper display in IE 10-.
474 display: none !important;