-
Notifications
You must be signed in to change notification settings - Fork 695
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
[css-sizing] fill-available sizing should be clearer about margin collapsing #923
Comments
After discussion, fantasai and I think we can get away with just making the text simpler, and saying that for this purpose you should treat the margins as non-collapsing. It's much simpler, has no effect in many layout modes (flex and grid items never collapse margins), and tho it can sometimes cause issues in block layout, they're usually avoidable. An alternative is to assume that the element is definitely collapsing its margin with its parent (if the parent allows that); in other words, ignoring any possible intervening siblings. Thoughts? |
Actually, tracking this algorithm backwards, we find that the "accounting for collapsing margins" concept comes from your original algorithm, back in 2009. If you could remember what you meant by that 8 years ago, we can just amend the spec accordingly. ^_^ |
The other possibility is that it causes margins to not collapse. That's already sometimes the case (at the block-end edge... even though it might cause things to line up perfectly so the margins are "touching" even though they're not officially "adjacent"), so maybe it would make sense to make it true all the time? |
I think this issue is solved now... See related discussion in #1614 |
The section of css-sizing on fill-available sizing should be clearer about margin collapsing. Margin collapsing is quite complicated, and it's not clear what "less the box’s inline-axis margins (after any margin collapsing, and treating auto margins as zero)" means. In other words, what is a margin of the box after margin collapsing? Which margins are associated with which boxes, etc.? (Remember that this definition recurses to the containing block, and you thus need to be careful not to consider the same margin twice.)
Also, note that this prose is all actually important not for the case as written, but for "The fill-available block size of a box is defined analogously, but in the other dimension."
The text was updated successfully, but these errors were encountered: