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

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