From ed58af19c7540bdf950011a966e0fb5d9407cd00 Mon Sep 17 00:00:00 2001 From: Material Web Team Date: Tue, 12 Jul 2022 09:13:43 -0700 Subject: [PATCH] feat(switch): use tokens to shape the focus ring PiperOrigin-RevId: 460478882 --- switch/lib/_switch-theme.scss | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/switch/lib/_switch-theme.scss b/switch/lib/_switch-theme.scss index 40062f1231..c65ef7e04a 100644 --- a/switch/lib/_switch-theme.scss +++ b/switch/lib/_switch-theme.scss @@ -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, ) ); }