Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-text] Performance risks of text-wrap:pretty #10785

Open
jyasskin opened this issue Aug 26, 2024 · 1 comment
Open

[css-text] Performance risks of text-wrap:pretty #10785

jyasskin opened this issue Aug 26, 2024 · 1 comment

Comments

@jyasskin
Copy link
Member

In the TAG review for text-wrap: pretty, the TAG was worried that if adoption is too widespread, then engines will feel benchmark pressure to make text-wrap: pretty cheaper and less pretty, perhaps reducing it all the way to an alias of text-wrap: auto. There was a suggestion to rename pretty to some term that indicates that the mode has costs as well as benefits.

Could the CSSWG consider whether there's a risk that "too many" sites will adopt this for too many elements and thereby either hurt the web's overall performance or drive implementations to effectively ignore the property value? And if there is that risk, try to find a way to mitigate it.

@bfgeek
Copy link

bfgeek commented Aug 26, 2024

Blink's implementation of pretty has explicitly added guardrails such that the overhead is minimal if a site added it to every paragraph, and during development we measured performance of page load times in this scenario and found it acceptable.

The feedback regarding the naming not indicating the cost is somewhat late, (one year post filing the tag review initially). Given its current relatively high usage I think we'd be opposed any name-change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants