Re: [csswg-drafts] [css-box-4] Applying margin-trim to inlines (#6922)

The CSS Working Group just discussed `[css-box-4] Applying margin-trim to inlines`, and agreed to the following:

* `RESOLVED: margin-trim has no effect on the inline axis of a block container`
* `RESOLVED: margin-trim on a containing block does not affect inline-level content`

<details><summary>The full IRC log of that discussion</summary>
&lt;jarhar> fantasai: the question was kind of what effect this should have on inline boxes and what effect should htis have on the inline axis of boxes<br>
&lt;jarhar> fantasai: those are the two questions i wanted to ask to the working group. applying it to inline level boxes is complicated so we probably dont want to do that<br>
&lt;jarhar> fantasai: if you set margin trim block inline then that would always affect the block i guess?<br>
&lt;jarhar> fantasai: but im not sure why you would want to do that<br>
&lt;una> q+<br>
&lt;miriam> ack una<br>
&lt;jarhar> una: i can see why yodu possibly want to do this on an inline element, if it was creating more height than youd want then you could trim it, but im not sure about straight inline<br>
&lt;jarhar> fantasai: oriol pointed out one of the complications of inlines is that we generate anonymous block classes, so if its margin trim doesnt inherit then if somethings the first - is on the top line then its not necessarily that its adjoining the top edge of the box so we would have to i guess drill through the block edges that dont have padding and<br>
&lt;jarhar> margin and border just like margin col.apse<br>
&lt;jarhar> fantasai: which we can do<br>
&lt;jarhar> iank_: keep in mind that margin collapsing pieces through inlines block side of an inline of that inner block affects the position<br>
&lt;astearns> s/pieces/pierces/<br>
&lt;jarhar> iank_: it makes me sad too<br>
&lt;una> s/inline element/inline-block element<br>
&lt;jarhar> dbaron: so my intuition about this is sort of that this proeprty makes sense in the direction in which a block lays out - in the direction in which a blocks children advance. but it doesnt make sas miuch sense in the other direction because of the other thing that you mentioned about inheritance because it becomes hard to follwo the principle that<br>
&lt;jarhar> addaing an empty div aroudn sometjhing doesnt change it. it does apply to block but not grid etc<br>
&lt;jarhar> dbaron: so i kind of feel like for block we probalby dont want this to apply on the inline sides<br>
&lt;astearns> s/addaing an empty div aroudn sometjhing/dbaron: adding an empty div around something/<br>
&lt;jarhar> dbaron: mainly i think because of the idea that it does really weird things for thing sthat are diredcdt children of the blcok and we dont want that distinction to be exposed that heavily<br>
&lt;jarhar> fantasai: yeah you have to have a recursive effect to make it do that<br>
&lt;jarhar> fantasai: but then i can see it bein gusefulf or inlines if you have an inline block for example and its on the edge of the paragraph you might not want it to have a margin on that edge. but that could be something we do with a spearate property that applies to the inline rather than this property<br>
&lt;miriam> s/bein gusefulf/being useful/<br>
&lt;jarhar> dbaron: and i guess one response to something una said earlier, maybe somebody said this already in the meantime but the property applies to block containers flex container grid containers which means it does apply to inline block because block container means that the dipslay type on the inside<br>
&lt;jarhar> dbaron: so that means blcok and inline block<br>
&lt;jarhar> dbaron: vs the other term for the thing on the outside<br>
&lt;jarhar> fantasai: inline ???<br>
&lt;jarhar> fantasai: ok so current state is that we are going to spec margin trim on the block container and no affect on inline container, only affects its block level content, basically ignores the inline values of margin trim<br>
&lt;jarhar> miriam: is that a propsoed resolution?<br>
&lt;jarhar> fantasai: yeah<br>
&lt;astearns> s/???/block versus atomic inline/<br>
&lt;jarhar> miriam: any objections to that resolution?<br>
&lt;una> SGTM<br>
&lt;dbaron> (block level)<br>
&lt;fantasai> RESOLVED: margin-trim has no effect on the inline axis of a block container<br>
&lt;fantasai> RESOLVED: margin-trim on a containing block does not affect inline-level content<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6922#issuecomment-2160980922 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 11 June 2024 14:57:30 UTC