- From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
- Date: Tue, 29 Oct 2024 22:17:55 +0000
- To: public-css-archive@w3.org
Starting from the OP; I'll respond to further comments after. First, we definitely don't care about siblings. We wrote these rules on the assumption that the stretched chidl is the sole content; if that's not the case, it might give suboptimal results, but you should be using Flexbox in that case anyway. We also, I'm pretty sure intentionally, *are not changing margin collapse behavior in any way*. Margin collapse is complicated and we didn't want to touch it. All we say is that, *if* the margin is adjoining with its parents (and, for bottom margins, pretend the parent isn't using a sizing value that would prevent adjoinment), then for the purpose of sizing the child its margins are truncated to zero. If, independent of that, the child's margins *are* adjoining either of the parent's margins, according to the *standard* rules, then they collapse as normal. This means that a sole child using 'stretch', inside of a fixed-size parent, will automatically be flush with both the top and bottom of the parent, *and* its top margin will be collapsing with the parent as normal; its bottom margin is simply ignored. @fantasai, does this sound right? It's been a while since we last worked on this section. ------ > I think the spec says that magenta should be like WebKit, and cyan like Blink, which is what looks the best to me. Correct, that's the spec's intention. Additionally, in the magenta case, the child's top margin will have collapsed with the parent's, so the parent will effectively have a 10px top margin. The example in <https://github.com/w3c/csswg-drafts/issues/11044#issuecomment-2420287787> is also correct. -------- > That is, it's not clear if the sentence is structured as "(For this purpose, X), and furthermore, Y." or "For this purpose, (X, and furthermore, Y).". As Oriol suggests, it's the latter. On a reread, it did take me a second to parse, tho, so I do think we should rewrite that a little. -- GitHub Notification of comment by tabatkins Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11044#issuecomment-2445430909 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 29 October 2024 22:17:55 UTC