-
Notifications
You must be signed in to change notification settings - Fork 707
[css-text-decor-4] text-underline-offset and text-underline-width has no easy way of being proportional to font size #3121
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
Comments
<div id="outer" style="font-size: 32px; text-underline-offset: 12.5%;">
<div id="inner" style="font-size: 16px; text-decoration: underline;"> ... </div>
</div> The observed offset on the inner element should be 2px <div id="outer" style="font-size: 32px; text-underline-offset: 12.5%; text-decoration: underline;">
<div id="inner" style="font-size: 16px;> ... </div>
</div>
The observed offset on the inner element should be 4px because of the decorating box. |
Also, text-underline-width should get it too. |
Would it make sense to introduce a new unit that is relative to the font size like |
Wait a minute. Why wouldn’t text-underline-offset: 0.125em work? |
Same problem as #2165, it would work as long as it's set on every element that inherits it and changes the |
Ah, I see. Cool. |
The resolution for #2165 should cover this. |
https://drafts.csswg.org/css-text-decor-4/#underline-offset
Perhaps it should also take a percentage, which gets multiplied by the font size?
The text was updated successfully, but these errors were encountered: