aboutsummaryrefslogtreecommitdiff
path: root/scss/helpers/_focus-ring.scss
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2022-12-29 14:19:22 -0800
committerGitHub <[email protected]>2022-12-29 14:19:22 -0800
commit9e17b2b34cdec9dce063bba09b01aa9a63e7dd94 (patch)
treeb7199331dcfef038272229e3fb10133d502828cf /scss/helpers/_focus-ring.scss
parent1a043b55bcfe3b9b1f327fe78639b82321f38633 (diff)
downloadbootstrap-9e17b2b34cdec9dce063bba09b01aa9a63e7dd94.tar.xz
bootstrap-9e17b2b34cdec9dce063bba09b01aa9a63e7dd94.zip
Focus ring helper and utilities (#33125)
* Add global variables for box-shadow focus rings * Update instances of -btn-focus-box-shadow to use -ring-box-shadow, unless it's for buttons or inputs * fix variable name * Add CSS variables for global focus styling, document it * Move to CSS vars section * Update scss/_nav.scss Co-authored-by: Gaël Poupard <[email protected]> * Helper and utils * Fix bundlewatch * Change 'Focus ring' in sidebar so that the page can be visible * Minor typo fix * fix merge * Revamp some more, improve docs Co-authored-by: Gaël Poupard <[email protected]> Co-authored-by: Julien Déramond <[email protected]> Co-authored-by: Patrick H. Lauke <[email protected]>
Diffstat (limited to 'scss/helpers/_focus-ring.scss')
-rw-r--r--scss/helpers/_focus-ring.scss5
1 files changed, 5 insertions, 0 deletions
diff --git a/scss/helpers/_focus-ring.scss b/scss/helpers/_focus-ring.scss
new file mode 100644
index 000000000..26508a8d6
--- /dev/null
+++ b/scss/helpers/_focus-ring.scss
@@ -0,0 +1,5 @@
+.focus-ring:focus {
+ outline: 0;
+ // By default, there is no `--bs-focus-ring-x`, `--bs-focus-ring-y`, or `--bs-focus-ring-blur`, but we provide CSS variables with fallbacks to initial `0` values
+ box-shadow: var(--#{$prefix}focus-ring-x, 0) var(--#{$prefix}focus-ring-y, 0) var(--#{$prefix}focus-ring-blur, 0) var(--#{$prefix}focus-ring-width) var(--#{$prefix}focus-ring-color);
+}