-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Restore styled focus rings to drag and resize handles
- Loading branch information
1 parent
19395ad
commit 6431927
Showing
5 changed files
with
53 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
@use "../shared.scss" as shared; | ||
|
||
.handle { | ||
cursor: nwse-resize; | ||
} | ||
|
||
.handle:not(.active):focus-visible { | ||
@include shared.focus-highlight(); | ||
} | ||
|
||
.active { | ||
outline: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
@use "../../node_modules/@cloudscape-design/design-tokens/index.scss" as cs; | ||
|
||
@mixin focus-highlight($gutter: 4px, $border-radius: cs.$border-radius-control-default-focus-ring) { | ||
position: relative; | ||
box-sizing: border-box; | ||
outline: none; | ||
& { | ||
outline: 2px dotted transparent; | ||
outline-offset: calc($gutter - 1px); | ||
} | ||
&::before { | ||
content: " "; | ||
display: block; | ||
position: absolute; | ||
box-sizing: border-box; | ||
left: calc(-1 * #{$gutter}); | ||
top: calc(-1 * #{$gutter}); | ||
width: calc(100% + 2 * #{$gutter}); | ||
height: calc(100% + 2 * #{$gutter}); | ||
border-radius: $border-radius; | ||
border: 2px solid cs.$color-border-item-focused; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters