- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 14 May 2025 16:53:43 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed ``[css-align] Clarify how `justify-self` affects automatic size of block-level box``, and agreed to the following: * ``RESOLVED: Values of `justify-self` other than normal or stretch treat the automatic size as fit-content, just like in flex/grid`` * `RESOLVED: auto margins do not prevent justify-self from imposing fit-content` <details><summary>The full IRC log of that discussion</summary> <emilio> oriol: two implementations of justify-self on block boxes (blink and servo). We interpreted some things that the spec says in different ways<br> <emilio> ... some things we agree on fantasai disagreed on<br> <emilio> ... want to clarify this<br> <emilio> ... two questions:<br> <emilio> ... first could be the effect of `justify-self` on the auto size of a block level box<br> <emilio> ... spec says that values other than stretch makes auto size fit-content<br> <emilio> ... so it applies to grid/flex items and block level items<br> <emilio> ... both blink and servo did this<br> <emilio> ... fantasai was interpreting it as this property doesn't affect block level sizing, only in over-constrained cases<br> <iank_> +1 to Oriol - it makes it more consistent w/ grid/flex<br> <emilio> ... I kinda prefer the fit-content behavior unconditional<br> <emilio> ... allows to explain tables<br> <emilio> ... could be explained as `justify-self: normal` on keywords is `start` rather than `stretch`<br> <emilio> ... on the other hand means diverging from `<center>` and html `align` attributes since those don't prevent stretching<br> <emilio> ... I prefer treating block-level boxes as other boxes<br> <emilio> ... but if fantasai wants to argue for an exception...<br> <astearns> ack fantasai<br> <iank_> q+<br> <emilio> fantasai: this also plays into the related issue about the effect of these properties when anon boxes are present<br> <emilio> ... anon boxes always stretch<br> <emilio> ... so there's an issue there where if you take the position that this affects fit-content you get inconsistent behavior if you have anon boxes<br> <emilio> ... I initially thought that this was fixing the alignment of stuff given how long block layout has existed<br> <emilio> ... guess we could go either way<br> <astearns> ack iank_<br> <emilio> iank_: IMO this makes the feature useful by default<br> <emilio> ... so kinda prefer how servo and blink interpret it<br> <emilio> q+<br> <astearns> ack emilio<br> <fantasai> emilio: Don't disagree, but was curious about the anonymous box situation<br> <fantasai> emilio: justify wouldn't apply to the anonymous box, right?<br> <fantasai> iank_: Concern for top-level anonymous boxes that are generated<br> <fantasai> iank_: consider our previous behavior a bug, so changed so that anonymous boxes ignore justify and always stretch, but we can talk about that issue separately<br> <fantasai> emilio: Makes sense to be consistent with block (???) to not introduce other issues<br> <fantasai> iank_: What do you mean?<br> <fantasai> emilio: If it doesn't do weird things if you have an anonymous block inside.<br> <fantasai> emilio: If that's ok, then making it work by default makes sense.<br> <fantasai> astearns: Do we have consensus? what's the resolution?<br> <fantasai> oriol: Values other than normal or stretch treat the automatic size as fit-content, just like in flex/grid<br> <fantasai> astearns: Does everyone agree?<br> <fantasai> fantasai: I'm ok with it.<br> <emilio> fantasai: we should ack that this makes justify-self not work for html centering stuff<br> <TabAtkins> yeah, we've abandoned doing <center> with this now<br> <emilio> PROPOSED: Values of `justify-self` other than normal or stretch treat the automatic size as fit-content, just like in flex/grid<br> <emilio> RESOLVED: Values of `justify-self` other than normal or stretch treat the automatic size as fit-content, just like in flex/grid<br> <emilio> oriol: there's another thing about how auto margins behave with this<br> <emilio> ... in servo we have different interpretations<br> <emilio> ... there's an example in the issue. If you set `justify-self: right` then the size will be `fit-content`, however if then you add auto margins, then these prevent `justify-self` from forcing fit-content<br> <emilio> ... in servo justify-self still prevents the stretching even with auto margins, and I think that makes more sense<br> <fantasai> +1<br> <oriol> https://github.com/w3c/csswg-drafts/issues/12102<br> <emilio> iank_: yeah basically, do auto margins disable justify-self or just the alignment part of it<br> <fantasai> If stretching is disabled for zero margins, then it should definitely be disabled for auto margins<br> <emilio> +1<br> <emilio> fantasai: this goes back to the first issue, where alignment is applied after margins<br> <fantasai> which are applied after sizing decisions<br> <emilio> oriol: right in this case the size of the margin box fills the container<br> <emilio> ... so you don't see the effect but it's not "not working"<br> <emilio> fantasai: if the box is larger than the container the auto margins will not absorb that space<br> <emilio> ... not sure we want the alignment to take effect in that case<br> <emilio> ... if you have auto margins you were expecting a particular alignment<br> <emilio> ... or do you just start-align it<br> <emilio> oriol: I think if you have unsafe alignment then why not<br> <emilio> ... but yeah, not sure<br> <emilio> iank_: I think auto margins are safe by default, so I think the defaults are actually the same<br> <emilio> fantasai: right but in this case the margin can't absorb the negative space<br> <emilio> iank_: but by default it's safe alignment so the default should be fine?<br> <emilio> fantasai: not sure it falls out of the definitions<br> <emilio> iank_: to be clear I'm fine changing blink here<br> <fantasai> I think CSS2.1 is written in a way that this wouldn't fall out.<br> <emilio> astearns: does the previous resolution apply here?<br> <emilio> oriol: probably should be a separate one<br> <emilio> ... the question that fantasai raised could be for a separate issue. We can resolve for the non-overflowing cases<br> <emilio> PROPOSED: alignment values different than stretch cause sizing to be fit-content, regardless of auto margins<br> <fantasai> PROPOSED: auto margins do not prevent justify-self from imposing fit-content<br> <fantasai> RESOLVED: auto margins do not prevent justify-self from imposing fit-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/12102#issuecomment-2880917326 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 14 May 2025 16:53:44 UTC