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/3611 below:

[css-align] Special case for inline-block+scroll-container elements needs to cover inline blocks that **contain** scroll containers · Issue #3611 · w3c/csswg-drafts · GitHub

This is about the special case described at the end of the "block" section, here:
https://drafts.csswg.org/css-align/#baseline-export
which was added in #2902.
Right now, that spec text says:

...for legacy reasons, if an inline-block is a scroll container or contains no in-flow line boxes, its first and last baseline sets are synthesized from its margin box.

It appears we need to broaden the first part of that condition.

Right now, the special case specifically covers scenarios where the inline-block is a scroll container. But it doesn't cover the case where the inline-block contains a scroll container (and nothing else). Browsers render that scenario the same way, but the spec doesn't say they should, AFAICT.

i.e. Browsers render these two divs the same (using their margin-bottom edge for baseline alignment):

abc
<div style="display:inline-block;overflow:scroll">...</div>
<div style="display:inline-block"><div style="overflow:scroll">...</div></div>

Here's a real-world testcase demonstrating that browsers do in fact align them the same (using the margin-bottom for both): https://hg.mozilla.org/mozilla-central/raw-file/2064e7c799d2/layout/reftests/inline/inline-block-baseline.html

CC @tabatkins @fantasai


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.4