Re: [csswg-drafts] [css-box-4] margin-trim auto-margins needs more clarification wrt. fallback alignment. (#11397)

The CSS Working Group just discussed `[css-box-4] margin-trim auto-margins needs more clarification wrt. fallback alignment.`, and agreed to the following:

* `RESOLVED: trim margins the same as 0 margins for alignment`

<details><summary>The full IRC log of that discussion</summary>
&lt;ydaniv> TabAtkins: iank_ raised a question about what we do with margin-trim with [missed]<br>
&lt;ydaniv> ... naively the ignore alignment, so their block level margins should be trimmed, cause their on the edge<br>
&lt;ydaniv> ... so question is, because the margins disappear, should we do something auto?<br>
&lt;fantasai> s/do something auto/honor alignment now/<br>
&lt;ydaniv> ... consensus suggests that ppl do expect margins to get trimmed and alignment to work<br>
&lt;iank_> q+<br>
&lt;astearns> ack iank_<br>
&lt;ydaniv> iank_: one complexity here, basically you're in a situtation where you shrink to fit and do auto margins, and then you stretch<br>
&lt;ydaniv> ... and that is a large layout change<br>
&lt;fantasai> >______&lt;<br>
&lt;sgill> q+<br>
&lt;ydaniv> ... and that's where trimming happens<br>
&lt;astearns> ack sgill<br>
&lt;ydaniv> sgill: if we do trimming after the main and cross side, do we still have that problem with shring to fit?<br>
&lt;ydaniv> iank_: yes, for single line flexbox you shrink ahead of time<br>
&lt;ydaniv> ... problem is when you got multi-line flexbox, if you trimm only after, and you assume contribution is not trimmed, that can be the case where you start stretching and your size can get weird<br>
&lt;ydaniv> ... might be fine, what ppl expect<br>
&lt;ydaniv> ... if you have auto margins at all, you still keep the shrink fitting but [missed]<br>
&lt;astearns> s/[missed]/go to start alignment/<br>
&lt;ydaniv> sgill: so guess it depends if the behavior you describe is suprising to authors or not<br>
&lt;ydaniv> iank_: yea<br>
&lt;ydaniv> astearns: given iank_'s complicatoins, TabAtkins are you still inline with what you described?<br>
&lt;ydaniv> TabAtkins: I think so, I think it's expected for single line, and for multi-line don't do that<br>
&lt;ydaniv> iank_: there's also a separate issue on when trimming should work on multi line containers<br>
&lt;ydaniv> astearns: are we going to resolve? proposal?<br>
&lt;ydaniv> PROPOSED RESOLUTION: trim margins the same as 0 margins for alignment<br>
&lt;TabAtkins> (if you're *expecting* a stretch to turn into shrink-to-fit from auto margins, but also removing some of those margins, you can just... not depend on stretch to do that. Set the size yourself.)<br>
&lt;ydaniv> astearns: objections on this issue?<br>
&lt;ydaniv> RESOLVED: trim margins the same as 0 margins for alignment<br>
</details>


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


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

Received on Wednesday, 6 May 2026 17:02:07 UTC