File tree Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Expand file tree Collapse file tree 2 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -566,15 +566,6 @@ $fallbacks: m3-chip.get-tokens();
566566.mat-mdc-standard-chip {
567567 -webkit-tap-highlight-color : transparent ;
568568
569- // MDC sets `overflow: hidden` on these elements in order to truncate the text. This is
570- // unnecessary since our chips don't truncate their text and it makes it difficult to style
571- // the strong focus indicators so we need to override it.
572- .mdc-evolution-chip__cell--primary ,
573- .mdc-evolution-chip__action--primary ,
574- .mat-mdc-chip-action-label {
575- overflow : visible ;
576- }
577-
578569 // MDC sizes and positions this element using `width`, `height` and `padding`.
579570 // This usually works, but it's common for apps to add `box-sizing: border-box`
580571 // to all elements on the page which can cause the graphic to be clipped.
Original file line number Diff line number Diff line change @@ -86,6 +86,10 @@ $default-border-radius: 4px;
8686 $config : map .merge ($default-config , $config );
8787
8888 @include _customize-focus-indicators ($config );
89+
90+ // Strong focus indicators currently need chip labels to have overflow visible.
91+ // TODO(b/446709063) revisit the structure to find a way to remove this dependency.
92+ @include _chip-label-overflow-visible ();
8993}
9094
9195@mixin strong-focus-indicators-color ($theme-or-color ) {
@@ -108,3 +112,15 @@ $default-border-radius: 4px;
108112 }
109113 }
110114}
115+
116+ @mixin _chip-label-overflow-visible {
117+ .mat-mdc-standard-chip {
118+ // MDC sets `overflow: hidden` on these elements in order to truncate the text. This conflicts
119+ // with how we structure and style the strong focus indicators so we need to override it.
120+ .mdc-evolution-chip__cell--primary ,
121+ .mdc-evolution-chip__action--primary ,
122+ .mat-mdc-chip-action-label {
123+ overflow : visible ;
124+ }
125+ }
126+ }
You can’t perform that action at this time.
0 commit comments