react-truncate icon indicating copy to clipboard operation
react-truncate copied to clipboard

Allow passing in font style overrides?

Open JoshuaKGoldberg opened this issue 5 years ago • 1 comments

For text whose styles, particular font-size, can shift around, it can be necessary to put the ... on the text assuming it's the largest size it'd ever be. This can be necessary for design in consistency and accessibility.

Example: if text starts at font-size: 20px but can go up to 22px, and it's desired to not change what text is displayed on the screen, react-truncate should be told to assume 22px.

JoshuaKGoldberg avatar Sep 07 '18 17:09 JoshuaKGoldberg

There are some valid use cases where you'd want to override the default behavior (reading the font from getComputedStyle), e.g. #93 comes to mind.

So - I'm very positive about that feature

pablosichert avatar Sep 08 '18 11:09 pablosichert

Closing out my old issues in repos that haven't had updates in a few years. Cheers!

JoshuaKGoldberg avatar Feb 17 '24 20:02 JoshuaKGoldberg