Skip to content

Commit

Permalink
Drop unused --bs-focus-ring-box-shadow and add documentation for `-…
Browse files Browse the repository at this point in the history
…-bs-focus-ring-{x|y|blur}` (#38095)
  • Loading branch information
julien-deramond authored Feb 25, 2023
1 parent c634528 commit 51299bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 0 additions & 2 deletions scss/_root.scss
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@
--#{$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

// scss-docs-start root-form-validation-variables
Expand Down
8 changes: 8 additions & 0 deletions site/content/docs/5.3/helpers/focus-ring.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ Modify the `--bs-focus-ring-*` CSS variables as needed to change the default app

{{< scss-docs name="root-focus-variables" file="scss/_root.scss" >}}

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. Modify them to change the default appearance.

{{< example >}}
<a href="#" class="d-inline-flex focus-ring py-1 px-2 text-decoration-none border rounded-2" style="--bs-focus-ring-x: 10px; --bs-focus-ring-y: 10px; --bs-focus-ring-blur: 4px">
Blurry offset focus ring
</a>
{{< /example >}}

### Sass

Customize the focus ring Sass variables to modify all usage of the focus ring styles across your Bootstrap-powered project.
Expand Down

0 comments on commit 51299bf

Please sign in to comment.