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. (its a lot more complex than this example) "discard": ignores all margins:


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)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • Shipped/Shipping
  • No signals


Search tags

margin, collapsing,

Last updated on 2021-12-13