Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick H. Lauke <redux@splintered.co.uk>2021-02-09 21:19:31 +0300
committerMark Otto <otto@github.com>2021-02-11 06:35:52 +0300
commitdf79aad5e449abb14168668150902c45f5d29efa (patch)
treeac34fd8ee62c02f726a2bfc48a1fd129c60b7d48 /scss/_reboot.scss
parent4c7a3e8adf73bf55a5fba5905b356468be17bc0e (diff)
Remove explicit suppression of focus outline
It's unclear what the reason for first introducing the original hack here (for `[tabindex="-1"]:focus {...}`) was. Seems something that may have been useful/necessary in SuitCSS, but don't think BS ever relied on this. https://github.com/twbs/bootstrap/issues/18330 It's since been modified to only apply when the browser wouldn't apply a visible outline anyway based on its own heuristics (the `:not(:focus-visible)` part) https://github.com/twbs/bootstrap/pull/28437/ But now, thinking this through more...in browsers that do support this pseudo-selector, what this is essentially saying is redundant: don't apply outline in cases where a `tabindex="-1"` element receives focus but the browser wouldn't normally apply focus outline". at best, this is unnecessary. at worst, this actually overrides things an author may explicitly be trying to do with adding `:focus { outline: ... }` explicitly.
Diffstat (limited to 'scss/_reboot.scss')
-rw-r--r--scss/_reboot.scss14
1 files changed, 0 insertions, 14 deletions
diff --git a/scss/_reboot.scss b/scss/_reboot.scss
index 973b5d16c7..7b153d1a84 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