components icon indicating copy to clipboard operation
components copied to clipboard

fix(material/icon): mat-icon misaligned when text-spacing is applied

Open essjay05 opened this issue 1 year ago • 3 comments

Fixes an issue with Angular Components Material Icon component where when text-spacing is applied the icon gets misaligned and if inside of an input or container with an outline, the icon gets cut off. This fix adds css styling to keep the icon middle-aligned when text-spacing is applied.

BEFORE screenshot AFTER screenshot AFTER screencast

Fixes b/250063405

essjay05 avatar Sep 03 '24 22:09 essjay05

Deployed dev-app for e9989199ea4a6d0df4e8f45d70329acd3ae22a92 to: https://ng-dev-previews-comp--pr-angular-components-29686-dev-o9u7tpft.web.app

Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt.

github-actions[bot] avatar Sep 03 '24 23:09 github-actions[bot]

It seems like this causes the icons to bleed out from the button: image

Is there a way that we can undo the text spacing just on icons instead?

crisbeto avatar Sep 19 '24 07:09 crisbeto

It seems like this causes the icons to bleed out from the button: image

Is there a way that we can undo the text spacing just on icons instead?

I've made updates to the CSS to target icon to not be affected by text-spacing and it looks like it does somewhat help, but when really shrinking the window at certain points even the text spills out (as does the icons): image image

Open to any ideas/suggestions you may have @crisbeto.

essjay05 avatar Oct 01 '24 23:10 essjay05

Closing in favor of https://github.com/angular/components/pull/30867

adolgachev avatar Sep 24 '25 17:09 adolgachev

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.