wpt icon indicating copy to clipboard operation
wpt copied to clipboard

[css-lists] test <div> and <span><div> in list item

Open foolip opened this issue 4 years ago • 7 comments

This is to test the behavior exposed in this webcompat.com issue: https://github.com/webcompat/web-bugs/issues/62451.

foolip avatar Dec 02 '20 10:12 foolip

@emilio can you tell which spec governs this?

foolip avatar Dec 02 '20 10:12 foolip

So, fwiw, I said that Gecko's behavior seemed "reasonable", not "correct", necessarily.

This is a bit more subtle than it seems. If only because Firefox's behavior matches Chrome/WebKit's in quirks mode.

The <span><div> case basically behaves as if it was <span></span><div></div>.

That creates two line boxes. Now the issue is whether in presence of an outside marker the first line should be "empty" or not (and thus whether it should take space).

So I guess this is basically https://github.com/w3c/csswg-drafts/issues/4574, which is still not super-greatly defined.

emilio avatar Dec 02 '20 14:12 emilio

I just checked if the quirk that makes this work in quirks mode in Firefox is bullet/list specific and it's not, fwiw: https://searchfox.org/mozilla-central/rev/0d6e8b21569f93a1e1ae8e377ab10f43a6cb12c1/layout/generic/nsLineLayout.cpp#1813

emilio avatar Dec 02 '20 14:12 emilio

https://wpt.fyi/results/css/css-lists?label=pr_head&max-count=1&pr=26715 shows that at least I achieved what I tried to, showing that there is in fact a difference here.

Since this came from a real web compat issue, one where the result was a broken layout for Firefox users, it would be great to get to the bottom of this, but I don't know this area more than superficially.

@emilio are there people you know we should ping for this?

foolip avatar Dec 02 '20 16:12 foolip

Oh, and the lint is failing because I don't have a spec link. That's true :)

foolip avatar Dec 02 '20 16:12 foolip

@emilio do you think it would make sense to make this a tentative test with reference to https://github.com/w3c/csswg-drafts/issues/4574?

foolip avatar Mar 22 '23 10:03 foolip

Seems reasonable

emilio avatar Mar 22 '23 16:03 emilio