diff options
| author | Mark Otto <[email protected]> | 2022-12-29 14:19:22 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-12-29 14:19:22 -0800 |
| commit | 9e17b2b34cdec9dce063bba09b01aa9a63e7dd94 (patch) | |
| tree | b7199331dcfef038272229e3fb10133d502828cf /scss/_root.scss | |
| parent | 1a043b55bcfe3b9b1f327fe78639b82321f38633 (diff) | |
| download | bootstrap-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/_root.scss')
| -rw-r--r-- | scss/_root.scss | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scss/_root.scss b/scss/_root.scss index 45de31090..323a5217b 100644 --- a/scss/_root.scss +++ b/scss/_root.scss @@ -127,6 +127,15 @@ @each $name, $value in $grid-breakpoints { --#{$prefix}breakpoint-#{$name}: #{$value}; } + + // Focus styles + // scss-docs-start root-focus-variables + --#{$prefix}focus-ring-width: #{$focus-ring-width}; + --#{$prefix}focus-ring-opacity: #{$focus-ring-opacity}; + --#{$prefix}focus-ring-color: #{$focus-ring-color}; + // 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 + --#{$prefix}focus-ring-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); + // scss-docs-end root-focus-variables } @if $enable-dark-mode { |
