Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Prevent focus styles to appear unnecessarily when opening the Mini Ca…
Browse files Browse the repository at this point in the history
…rt drawer
  • Loading branch information
Aljullu committed May 11, 2023
1 parent 5559d21 commit bf1f53c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions assets/js/base/components/drawer/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ $drawer-animation-duration: 0.3s;
opacity: 1;
}

// Don't show focus styles if the close button hasn't been focused by the
// user directly. This is done to prevent focus styles to appear when
// opening the drawer with the mouse, as the focus is moved inside
// programmatically.
&:focus:not(:focus-visible) {
box-shadow: none;
outline: none;
}

> span {
@include visually-hidden();
}
Expand Down

0 comments on commit bf1f53c

Please sign in to comment.