From fc9b945d9969091611d54b7b80e6b41a44c2df16 Mon Sep 17 00:00:00 2001 From: Elizabeth Mitchell Date: Mon, 21 Aug 2023 13:39:26 -0700 Subject: [PATCH] fix(chips): per spec, trailing focus rings are always circles PiperOrigin-RevId: 558887707 --- chips/internal/_trailing-icon.scss | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/chips/internal/_trailing-icon.scss b/chips/internal/_trailing-icon.scss index e4a5e9aa9c..233f61ab0b 100644 --- a/chips/internal/_trailing-icon.scss +++ b/chips/internal/_trailing-icon.scss @@ -14,27 +14,16 @@ padding: 0 8px; } - .trailing.action md-focus-ring { - // Note: the trailing action's shape only follows the trailing end of the - // chip. For example, if the leading end is rounded, but the trailing is end - // squared, then the focus ring will be squared (not rounded+squared). - @include focus-ring.theme( - ( - 'shape-start-start': var(--_container-shape-start-end), - 'shape-end-start': var(--_container-shape-end-end), - 'shape-end-end': var(--_container-shape-end-end), - 'shape-start-end': var(--_container-shape-start-end), - 'outward-offset': -2px, - ) - ); - } - - .trailing.action md-ripple { + .trailing.action :is(md-ripple, md-focus-ring) { border-radius: 50%; height: calc(4 / 3 * var(--_icon-size)); // 24px default width: calc(4 / 3 * var(--_icon-size)); // 24px default } + .trailing.action md-focus-ring { + inset: unset; + } + .has-trailing .primary.action { padding-inline-end: 0; }