Adds properties controlling margin collapsing: -webkit-margin-top-collapse, -webkit-margin-before-collapse, -webkit-margin-before-collapse, and -webkit-margin-after-collapse. These properties have two values: "separate": disables margin collapsing by "separating the margins", e.g. https://www.software.hixie.ch/utilities/js/live-dom-viewer/?saved=7507 (its a lot more complex than this example) "discard": ignores all margins: https://www.software.hixie.ch/utilities/js/live-dom-viewer/?
Motivation
This will improve compat with browsers which don't support this WebKit specific feature. It didn't gain wide adoption by web developers, and other browsers (FF, EdgeHTML) didn't find the compat need to implement this feature (yet). Additionally margin collapsing is complex (at the best of times), these values change it in very subtle, but complicated ways. We've been added additional DCHECKs in our codebase, and clusterfuzz is finding many logic errors within these features. Removing will remove this class of bugs, and reduce the maintenance burden.
Status in Chromium
Enabled by default (tracking bug) in:
- Chrome for desktop release 81
- Chrome for Android release 81
- Android WebView release 81
Consensus & Standardization
- No signal
- No signal
- Shipped/Shipping
- No signals
Owner
Search tags
margin, collapsing,Last updated on 2020-12-02