Skip to content

Commit

Permalink
Revert focus style for regions and add new focus-visible style to han…
Browse files Browse the repository at this point in the history
…dle sending focus from canvas
  • Loading branch information
jeryj committed Jun 14, 2024
1 parent d365ac9 commit 7e989c2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/components/src/higher-order/navigate-regions/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[role="region"] {
position: relative;

// Handles the focus when we programatically send focus to this region
&:focus-visible::after {
position: absolute;
top: 0;
Expand All @@ -17,6 +18,18 @@
}

.is-focusing-regions {
&:focus::after {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
content: "";
pointer-events: none;
outline: 4px solid $components-color-accent;
outline-offset: -4px;
z-index: z-index(".is-focusing-regions {region} :focus::after");
}
// Fixes for edge cases.
// Some of the regions are currently used for layout purposes as 'interface skeleton'
// items. When they're absolutely positioned or when they contain absolutely
Expand Down

0 comments on commit 7e989c2

Please sign in to comment.