-
Notifications
You must be signed in to change notification settings - Fork 711
[css-values] baseline-position unit? #661
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
Relative to the top of its container? That is infeasible, because that would make its value depend on layout result, which would lead to cyclic dependency. It is possible, though, to get the baseline position based on the first font in |
I suppose it would be useful to have access to |
Related: Font Metrics API |
I've just found out about the
ch
andex
units described here:https://www.w3.org/TR/css3-values/#relative-lengths
Baseline position: (perhaps in a format like
top: 1bpos
for example) would give us information on the vertical position of the baseline relative to the top of the box model (without padding?) for a given font. This position varies a lot from one font to anotherThis is something that could become extremely useful in vertical rhythm projects such as Sassline and MegaType, which go to great length to attempt to find this position through other means. When combined with
ex
(and a speculative cap height), we also start to build up a very useful picture of a font's vertical metrics.Is this something that might be considered in future?
Further reading on some existing issues with typographic metrics on the web
The text was updated successfully, but these errors were encountered: