diff options
Diffstat (limited to 'scss/_reboot.scss')
| -rw-r--r-- | scss/_reboot.scss | 40 |
1 files changed, 13 insertions, 27 deletions
diff --git a/scss/_reboot.scss b/scss/_reboot.scss index 50ba7431b..352046988 100644 --- a/scss/_reboot.scss +++ b/scss/_reboot.scss @@ -57,20 +57,6 @@ body { } -// 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. -// 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; -} - - // Content grouping // // 1. Reset Firefox's gray color @@ -156,7 +142,6 @@ p { abbr[title], abbr[data-bs-original-title] { // 1 - text-decoration: underline; // 2 text-decoration: underline dotted; // 2 cursor: help; // 3 text-decoration-skip-ink: none; // 4 @@ -411,13 +396,13 @@ button { border-radius: 0; } -// Work around a Firefox bug where the transparent `button` background -// results in a loss of the default `button` focus styles. -// Credit https://github.com/suitcss/base/ +// Explicitly remove focus outline in Chromium when it shouldn't be +// visible (e.g. as result of mouse click or touch tap). It already +// should be doing this automatically, but seems to currently be +// confused and applies its very visible two-tone outline anyway. -button:focus { - outline: dotted 1px; - outline: -webkit-focus-ring-color auto 5px; +button:focus:not(:focus-visible) { + outline: 0; } // 1. Remove the margin in Firefox and Safari @@ -434,12 +419,10 @@ textarea { } // Remove the inheritance of text transform in Firefox - button, select { text-transform: none; } - // Set the cursor for non-`<button>` buttons // // Details at https://github.com/twbs/bootstrap/pull/30562 @@ -447,11 +430,15 @@ select { cursor: pointer; } -// Remove the inheritance of word-wrap in Safari. -// See https://github.com/twbs/bootstrap/issues/24990 - select { + // Remove the inheritance of word-wrap in Safari. + // See https://github.com/twbs/bootstrap/issues/24990 word-wrap: normal; + + // Undo the opacity change from Chrome + &:disabled { + opacity: 1; + } } // Remove the dropdown arrow in Chrome from inputs built with datalists. @@ -582,7 +569,6 @@ legend { // Inherit font family and line height for file input buttons -// stylelint-disable-next-line selector-pseudo-element-no-unknown ::file-selector-button { font: inherit; } |
