Skip to content

Commit

Permalink
chore(styles): added additional param for outline style
Browse files Browse the repository at this point in the history
  • Loading branch information
schaertim committed Sep 25, 2024
1 parent ae4e861 commit 06cc569
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/styles/src/mixins/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@
$additional-selector: '',
$offset: spacing.$size-line,
$width: spacing.$size-line,
$color: var(--post-focus-color)
$color: var(--post-focus-color),
$style: solid
) {
&#{$additional-selector} {
outline-style: none !important; // !important is needed to override bootstrap .form-control:focus
Expand All @@ -109,7 +110,7 @@

// :has(:focus-visible) mimic a focus-visible-within pseudo-class
&:is(:focus-visible, :has(:focus-visible), .pretend-focus)#{$additional-selector} {
outline-style: solid !important;
outline-style: $style !important;

@include high-contrast-mode() {
outline-color: Highlight !important;
Expand All @@ -122,7 +123,7 @@
// When a browser doesn't support :has, use focus-within as a fallback. This means that focus state is displayed on focus and not on focus-visible only (except some browsers like Safari).
@supports not selector(:has(:focus-visible)) {
&:is(:focus-visible, :focus-within, .pretend-focus)#{$additional-selector} {
outline-style: solid !important;
outline-style: $style !important;

@include high-contrast-mode() {
outline-color: Highlight !important;
Expand Down

0 comments on commit 06cc569

Please sign in to comment.