-
Notifications
You must be signed in to change notification settings - Fork 757
Description
https://drafts.csswg.org/css-overflow-3/#scrollable
The UA may additionally include the margin areas of boxes for which it is the containing block.
The conditions under which such margin areas are included is undefined in this level.
ISSUE 6. This needs further testing and investigation; is therefore deferred in this draft.
Firefox and Chrome handles margins differently (see testcases in bug 1527539). This might lead to web-compat problems.
It looks like Chrome includes the block-end margin of children when calculating the overflow for Grid and Flexbox layout, whereas Firefox doesn't. Both includes it in block layout though, well at least in most cases... (exact details TBD)
(Fwiw, the relevant block layout code in Gecko lives here in case anyone wants to decipher when the margin is included in blockEndEdgeOfChildren there.)