Skip to content

Commit

Permalink
feat(patterns/button): improve button focus for accessibility (#746)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiloyi committed Mar 2, 2021
1 parent 4f0d48c commit aa5e98c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
4 changes: 3 additions & 1 deletion packages/styles/components/_c.button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

&:focus {
@include add-demo-state-class {
box-shadow: 0 1px 5px 0 rgba($color-grey-999, 0.2);
box-shadow:
0 0 0 ($mu025/2) $color-font-lightest,
0 0 0 $mu025 $color-info-500;
}
}

Expand Down
12 changes: 0 additions & 12 deletions packages/styles/settings-tools/_s.buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,6 @@ $button-color-default: map-get(get-token(color, button, 'solid'), 'font');
}
}

@if map-has-key($props, 'focus') {
$focus-props: map-get($props, 'focus');

@each $prop, $value in $focus-props {
&:focus {
@include add-demo-state-class {
border-color: map-get($focus-props, 'border');
}
}
}
}

@if map-has-key($props, 'active') {
$active-props: map-get($props, 'active');

Expand Down

0 comments on commit aa5e98c

Please sign in to comment.