-
Notifications
You must be signed in to change notification settings - Fork 711
[css-env-1] Add a text-scale env() (name to be bikeshedded). #10674 #11961
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sharing the initial draft!
css-env-1/Overview.bs
Outdated
then ''env(bikeshed-text-scale)'' would resolve to ''2''. | ||
|
||
Note: The ''bsem'' unit represents this same information; | ||
''1em'' is exactly equivalent to ''calc(1em * env(bikeshed-text-scale))''. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't seem right to me. In #10674 (comment), I defined it as the computed value of font-size: medium
× env(bikeshed-text-scale)
I don't think we discussed in the issue whether the unit could be relative to 1em
unit - the computed value of the selected element's font-size
. My understanding was the computed value of 1bsem
would be the same regardless of what element it was used on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my understanding matches Josh's -- computed value of 1bsem
would be the same regardless of what element it was used on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was under the impression that the point of the unit was to allow authors to avoid having to manually type calc(... * env(preferred-text-scale))
all over the place; it was supposed to be syntax sugar for that expression, essentially. Thus, it should scale with the local definition of the em; otherwise, authors can just set a variable at the root and use that instead, and we don't care quite as much about the verbosity in that case.
That said, putting some thought into this revealed that the definition of the unit is going to be very problematically tied into the definition of text-size-adjust itself, which is currently both underspecified (it doesn't actually say enough about its effects) and wrongly specified (it claims to be a computed-time adjustment, which testing trivially shows it isn't).
Luckily, the unit isn't meant to be defined by this spec; it goes over into V&U. So I'll just leave the references here for now, and deal with the definition of pem
elsewhere when we resolve the text-size-adjust
issues more generally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #11636 for discussion on this.
No description provided.