Skip to content

Commit

Permalink
refactor(switch): move focus-ring styles to the :host level.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 462729325
  • Loading branch information
material-web-copybara authored and copybara-github committed Jul 22, 2022
1 parent 10a6d35 commit 57c2cfd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions switch/lib/_switch-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ $_forced-colors-theme: (
$theme: _resolve-theme($theme, $resolvers);
$theme: theme.create-theme-vars($theme, switch);

:host {
@include _focus-ring($theme);
}

.md3-switch {
@include _root($theme);
}
Expand All @@ -121,15 +125,13 @@ $_forced-colors-theme: (
border-end-end-radius: map.get($theme, track-shape-end-end);
border-end-start-radius: map.get($theme, track-shape-end-start);

@include _focus-ring(
// 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($track-shape) {
@mixin _focus-ring($theme) {
// TODO(b/231741594): use `track-shape` once this is not deleted.
$track-shape: map.get($theme, track-shape-start-start);

@include focus-ring-theme.theme(
(
ring-radius: $track-shape,
Expand Down

0 comments on commit 57c2cfd

Please sign in to comment.