[CSS2] Current definition of margin collapsing isn't interoperable.
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
https://www.w3.org/TR/CSS2/box.html#collapsing-margins
This is somewhat a meta issue which was found while investigating behaviour for aspect-ratio. We (Blink) haven't had any reports of users hitting these inconsistencies between implementations so this is largely an "academic" issue and not immediately important.
While investigating I created this testcase:
https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=8342
The inconsistencies are around collapsing through margins, and when things are considered adjoining. Some implementations will "double-count" a margin in certain cases (which seems bad).
This indicates that the current definition isn't sufficient (or consistent) for building an interoperable implementation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the CSS2 box model section on collapsing margins and reproduce the behavior using the linked live DOM viewer testcase. Compare how implementations handle collapsing through margins, adjoining margins, and possible double-counting. Done means producing a clarified definition that implementations can apply consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100