A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/w3c/csswg-drafts/issues/4495 below:

Should vertical-align:middle behave differently when the dominant baseline is not alphabetic? · Issue #4495 · w3c/csswg-drafts · GitHub

In both the definition in CSS 2.1 and the definition in css-inline vertical-align: middle is defined as:

Align the vertical midpoint of the box with the baseline of the parent box plus half the x-height of the parent.

Nothing in the Inline-level alignment section of css-writing-modes appears to modify this definition.

Yet, as far as I can tell, this definition really makes sense primarily when the dominant baseline is alphabetic. If you're starting from an alphabetic baseline, adding half the x-height gives a position that could reasonably described as the "middle". If you're starting from a central baseline... I don't think it does.

In web-platform-tests/wpt@07210df @hshiozawa added tests to web-platform-tests that test this behavior for vertical text with a central baseline. Based on https://wpt.fyi/results/css/css-writing-modes it seems that these tests pass in Chrome (but no other engines). Mozilla bug 1220353 covers making them pass in Gecko.

We could try to implement this to pass these tests... but I'm hesitant to do so given that I don't see how the behavior makes sense.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3