Open bfgeek opened 4 months ago
Why not recommend them to use <!doctype html>
? It's not entirely clear to me what the upside is of creating subtle breakage for the long tail of websites.
@bfgeek do you have example of websites where this is happening? That would be great.
So there are a few reasons why I believe this is good generally for the web platform:
@karlcow - We don't have a use-counter in place for this - its actually relatively difficult to determine when this would trigger.
Sep 2024 update - we've received some more bug reports with developers getting confused by the margin collapsing quirks.
Sep 2024 update - we've received some more bug reports with developers getting confused by the margin collapsing quirks.
If this is referring to https://issues.chromium.org/u/1/issues/365516487 (my issue): The main problem isn't the quirk, the main problem is that your dev tools pretend the quirk doesn't exist and end up showing values that don't line up with the visual behavior on the page.
Also, on the note of usage counting and pages where this is happening: The header on this page is rendered in quirks mode in a way that would break if the quirk were to be removed entirely. It is also already broken in Firefox, but I think that's due to differences in the user agent style sheets(?)
I looked into this a bit more and, if I'm not mistaken, the Blink implementation of this part of the spec is currently wrong. I've made a web platform test for this and I suspect that this is the source of at least part of the confusion that developers are facing.
What is the issue with the HTML Standard?
Hi all,
Occasionally we (Blink) get bug reports about the margin collapsing quirk. Either a developer doesn't get a margin when they are expecting one, and/or there is a subtle difference between implementations.
See: https://html.spec.whatwg.org/#margin-collapsing-quirks
We (Blink) suspect it's possible to slowly remove/reduce this quirk by slowing limiting the cases it applies.
We are prepared to (slowly) start removing it by removing the quirk for various elements, for example starting with
pre
,xmp
,plaintext
,listing
.It's plausible (but not a certainty, just an example) that we'll end up in a situation where the quirk will apply to say
p
,h1
,h2
and only in the<body>
. Unfortunately due to how margin collapsing works, this is difficult (for us) to use-count, hence starting small with some of the lesser used elements.Thoughts?
Thanks, Ian