Skip to content

Commit

Permalink
feat(switch): use tokens to shape the focus ring
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 460478882
  • Loading branch information
material-web-copybara authored and copybara-github committed Jul 12, 2022
1 parent b945f30 commit ed58af1
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions switch/lib/_switch-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,17 @@ $_forced-colors-theme: (
border-end-start-radius: map.get($theme, track-shape-end-start);

@include _focus-ring(
$width: map.get($theme, track-width),
$height: map.get($theme, track-height)
// TODO(b/231741594): use `track-shape` once this is not deleted.
$track-shape: map.get($theme, track-shape-start-start)
);

@include _forced-colors-mode-theme;
}

@mixin _focus-ring($height, $width) {
$radius: min($height, $width);

// TODO(b/230413957): remove the hard coded value
@mixin _focus-ring($track-shape) {
@include focus-ring-theme.theme(
(
ring-radius: 22px,
ring-radius: $track-shape,
)
);
}
Expand Down

0 comments on commit ed58af1

Please sign in to comment.