Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slowly removing/reducing the margin collapsing quirk. #10296

Open
bfgeek opened this issue Apr 24, 2024 · 2 comments
Open

Slowly removing/reducing the margin collapsing quirk. #10296

bfgeek opened this issue Apr 24, 2024 · 2 comments
Labels
needs implementer interest Moving the issue forward requires implementers to express interest normative change topic: rendering

Comments

@bfgeek
Copy link
Member

bfgeek commented Apr 24, 2024

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.

  1. Is there appetite for this? I've previously had some initial tentative discussions with @emilio and @dholbert .
  2. If so - practically speaking we are willing to slowly turn off this behaviour (behind a killswitch), then after the release is stable for 1-2 months update the HTML spec with the part which we've limited/removed. We'd obviously like a upfront agreement for this.

Thoughts?

Thanks,
Ian

@domenic domenic added normative change topic: rendering needs implementer interest Moving the issue forward requires implementers to express interest labels Apr 25, 2024
@annevk
Copy link
Member

annevk commented Apr 25, 2024

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.

@karlcow
Copy link
Member

karlcow commented Apr 25, 2024

@bfgeek do you have example of websites where this is happening? That would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs implementer interest Moving the issue forward requires implementers to express interest normative change topic: rendering
Development

No branches or pull requests

4 participants