aboutsummaryrefslogtreecommitdiff
path: root/scss
diff options
context:
space:
mode:
authorPatrick H. Lauke <[email protected]>2022-09-01 02:30:23 +0100
committerGitHub <[email protected]>2022-08-31 18:30:23 -0700
commitcda901f2444d6b09cfa3261c84ef98288e3b9834 (patch)
treebd4fd58e7d3c5776e1c9ab5d59570317a37396d0 /scss
parent87aaf9499620c9a7b592711a6e8d86e9a30467b6 (diff)
downloadbootstrap-cda901f2444d6b09cfa3261c84ef98288e3b9834.tar.xz
bootstrap-cda901f2444d6b09cfa3261c84ef98288e3b9834.zip
v5/docs: reintroduce `outline` for docs code samples, buttons when `:not(:focus-visible)` (#36507)
* Remove outline suppression for focused `<pre>` Sighted keyboard users rely on knowing where their focus is. If the `<pre>` receives focus (so that it can be scrolled by keyboard users, for instance) then it's essential that they know this is the case * Only suppress outline for buttons when `:not(:focus-visible)` * Add right-hand margin to pre avoids having the focus outline awkwardly clipped by the copy button
Diffstat (limited to 'scss')
-rw-r--r--scss/_buttons.scss6
1 files changed, 5 insertions, 1 deletions
diff --git a/scss/_buttons.scss b/scss/_buttons.scss
index 30f435c01..09bdf032b 100644
--- a/scss/_buttons.scss
+++ b/scss/_buttons.scss
@@ -52,7 +52,6 @@
color: var(--#{$prefix}btn-hover-color);
@include gradient-bg(var(--#{$prefix}btn-hover-bg));
border-color: var(--#{$prefix}btn-hover-border-color);
- outline: 0;
// Avoid using mixin so we can pass custom focus shadow properly
@if $enable-shadows {
box-shadow: var(--#{$prefix}btn-box-shadow), var(--#{$prefix}btn-focus-box-shadow);
@@ -61,6 +60,11 @@
}
}
+ .btn-check:focus:not(:focus-visible) + &,
+ &:focus:not(:focus-visible) {
+ outline: 0;
+ }
+
.btn-check:checked + &,
.btn-check:active + &,
&:active,