X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=scss%2Fbootstrap%2F_reboot.scss;fp=scss%2Fbootstrap%2F_reboot.scss;h=6f73466d3b75671b13e2e933c15c624853aa2762;hb=a278c52cabf7cbc21171385a53f89c1584093647;hp=8c727d029c45592419c50fc8163d95357f383529;hpb=0a809d0ab05f5ad906a757d65865cfdc4474ad81;p=roojs1
diff --git a/scss/bootstrap/_reboot.scss b/scss/bootstrap/_reboot.scss
index 8c727d029c..6f73466d3b 100644
--- a/scss/bootstrap/_reboot.scss
+++ b/scss/bootstrap/_reboot.scss
@@ -14,9 +14,7 @@
// 2. Change the default font family in all browsers.
// 3. Correct the line height in all browsers.
// 4. Prevent adjustments of font size after orientation changes in IE on Windows Phone and in iOS.
-// 5. Setting @viewport causes scrollbars to overlap content in IE11 and Edge, so
-// we force a non-overlapping, non-auto-hiding scrollbar to counteract.
-// 6. Change the default tap highlight to be completely transparent in iOS.
+// 5. Change the default tap highlight to be completely transparent in iOS.
*,
*::before,
@@ -28,15 +26,7 @@ html {
font-family: sans-serif; // 2
line-height: 1.15; // 3
-webkit-text-size-adjust: 100%; // 4
- -ms-overflow-style: scrollbar; // 5
- -webkit-tap-highlight-color: rgba($black, 0); // 6
-}
-
-// IE10+ doesn't honor `` in some cases.
-@at-root {
- @-ms-viewport {
- width: device-width;
- }
+ -webkit-tap-highlight-color: rgba($black, 0); // 5
}
// Shim for "new" HTML5 structural elements to display correctly (IE10, older browsers)
@@ -50,13 +40,13 @@ article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
//
// 1. Remove the margin in all browsers.
// 2. As a best practice, apply a default `background-color`.
-// 3. Set an explicit initial text-align value so that we can later use the
+// 3. Set an explicit initial text-align value so that we can later use
// the `inherit` value on things like `
` elements.
body {
margin: 0; // 1
font-family: $font-family-base;
- font-size: $font-size-base;
+ @include font-size($font-size-base);
font-weight: $font-weight-base;
line-height: $line-height-base;
color: $body-color;
@@ -64,12 +54,16 @@ body {
background-color: $body-bg; // 2
}
-// Suppress the focus outline on elements that cannot be accessed via keyboard.
-// This prevents an unwanted focus outline from appearing around elements that
-// might still respond to pointer events.
+// Future-proof rule: in browsers that support :focus-visible, suppress the focus outline
+// on elements that programmatically receive focus but wouldn't normally show a visible
+// focus outline. In general, this would mean that the outline is only applied if the
+// interaction that led to the element receiving programmatic focus was a keyboard interaction,
+// or the browser has somehow determined that the user is primarily a keyboard user and/or
+// wants focus outlines to always be presented.
//
-// Credit: https://github.com/suitcss/base
-[tabindex="-1"]:focus {
+// See https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible
+// and https://developer.paciellogroup.com/blog/2018/03/focus-visible-and-backwards-compatibility/
+[tabindex="-1"]:focus:not(:focus-visible) {
outline: 0 !important;
}
@@ -161,11 +155,11 @@ blockquote {
b,
strong {
- font-weight: bolder; // Add the correct font weight in Chrome, Edge, and Safari
+ font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari
}
small {
- font-size: 80%; // Add the correct font size in all browsers
+ @include font-size(80%); // Add the correct font size in all browsers
}
//
@@ -176,7 +170,7 @@ small {
sub,
sup {
position: relative;
- font-size: 75%;
+ @include font-size(75%);
line-height: 0;
vertical-align: baseline;
}
@@ -194,30 +188,25 @@ a {
text-decoration: $link-decoration;
background-color: transparent; // Remove the gray background on active links in IE 10.
- @include hover {
+ @include hover() {
color: $link-hover-color;
text-decoration: $link-hover-decoration;
}
}
-// And undo these styles for placeholder links/named anchors (without href)
-// which have not been made explicitly keyboard-focusable (without tabindex).
+// And undo these styles for placeholder links/named anchors (without href).
// It would be more straightforward to just use a[href] in previous block, but that
// causes specificity issues in many other styles that are too complex to fix.
// See https://github.com/twbs/bootstrap/issues/19402
-a:not([href]):not([tabindex]) {
+a:not([href]):not([class]) {
color: inherit;
text-decoration: none;
- @include hover-focus {
+ @include hover() {
color: inherit;
text-decoration: none;
}
-
- &:focus {
- outline: 0;
- }
}
@@ -230,7 +219,7 @@ code,
kbd,
samp {
font-family: $font-family-monospace;
- font-size: 1em; // Correct the odd `em` font sizing in all browsers.
+ @include font-size(1em); // Correct the odd `em` font sizing in all browsers.
}
pre {
@@ -240,8 +229,8 @@ pre {
margin-bottom: 1rem;
// Don't allow content to break outside
overflow: auto;
- // We have @viewport set which causes scrollbars to overlap content in IE11 and Edge, so
- // we force a non-overlapping, non-auto-hiding scrollbar to counteract.
+ // Disable auto-hiding scrollbar in IE & legacy Edge to avoid overlap,
+ // making it impossible to interact with the content
-ms-overflow-style: scrollbar;
}
@@ -289,10 +278,14 @@ caption {
caption-side: bottom;
}
+// 1. Removes font-weight bold by inheriting
+// 2. Matches default `
` alignment by inheriting `text-align`.
+// 3. Fix alignment for Safari
+
th {
- // Matches default `
` alignment by inheriting from the ``, or the
- // closest parent with a set `text-align`.
- text-align: inherit;
+ font-weight: $table-th-font-weight; // 1
+ text-align: inherit; // 2
+ text-align: -webkit-match-parent; // 3
}
@@ -310,6 +303,7 @@ label {
//
// Details at https://github.com/twbs/bootstrap/issues/24093
button {
+ // stylelint-disable-next-line property-disallowed-list
border-radius: 0;
}
@@ -329,7 +323,7 @@ optgroup,
textarea {
margin: 0; // Remove the margin in Firefox and Safari
font-family: inherit;
- font-size: inherit;
+ @include font-size(inherit);
line-height: inherit;
}
@@ -343,6 +337,21 @@ select {
text-transform: none; // Remove the inheritance of text transform in Firefox
}
+// Set the cursor for non-`