W3C home > Mailing lists > Public > public-css-archive@w3.org > February 2019

[csswg-drafts] [css-align] Special case for inline-block+scroll-container elements needs to cover inline blocks that **contain** scroll containers (#3611)

From: Daniel Holbert via GitHub <sysbot+gh@w3.org>
Date: Mon, 04 Feb 2019 19:48:38 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-406490145-1549309716-sysbot+gh@w3.org>
dholbert has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-align] Special case for inline-block+scroll-container elements needs to cover inline blocks that **contain** scroll containers ==
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 https://github.com/w3c/csswg-drafts/issues/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 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3611 using your GitHub account
Received on Monday, 4 February 2019 19:48:39 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:43 UTC