vertical-align: middle incorrect when dominant baseline is central (mixed, upright)
Categories
(Core :: Layout: Block and Inline, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox45 | --- | affected |
People
(Reporter: bugzilla, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
(Keywords: testcase)
| Reporter | ||
Updated•10 years ago
|
Looking at these tests makes me wonder if this behavior is desirable.
In particular, the current definition of the alignment point for vertical-align: middle:
Align the vertical midpoint of the box with the baseline of the parent box plus half the x-height of the parent.
seems to assume that the parent has an alphabetic baseline -- that's why it wants to add half the x-height of the parent to get to a "middle" position.
But I don't see why adding half the x-height of the parent is desirable if you're starting from a central baseline.
It seems like a reasonable definition of middle, in a context where the dominant baseline is central, would be either:
- just use the central baseline directly (probably better), or
- use the alphabetic baseline and add half the x-height.
I'm inclined to think we should raise a spec issue here rather than fix these tests, but I'm curious what others think.
Actually, I filed https://github.com/w3c/csswg-drafts/issues/4495 so that I don't forget to do so...
| Reporter | ||
Comment 3•6 years ago
|
||
(...)
The primary objective of the "central" vertical align is to align the center of lines. The value "middle" was defined as the center of x-height, which does not work for CJK use cases. So from my point of view, "central" aligns characters to characters (from user perspective, sometimes <img> are characters.)
Assuming my understanding of "both use cases exist", "middle" already serves one, so making "central" the same as "middle" looses another use case.
I prefer less differences when in horizontal and in vertical, unless it's really needed.
(...)
https://lists.w3.org/Archives/Public/www-style/2015Jul/0008.html
Updated•3 years ago
|
Description
•