Re: [csswg-drafts] [css-rhythm-1] Define interaction of block-step-align and align-content (#11206)

The CSS Working Group just discussed `[css-rhythm-1] Define interaction of block-step-align and align-content`, and agreed to the following:

* `RESOLVED: if block-step-insert is padding-box or content-box, block-step-align:auto defaults to following align-content when it's not normal`
* `RESOLVED: non-normal values of align-content/self win over block-step-align (depending on whether block-step-insert is putting the space inside or outside the element)`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> fantasai: block-step-align's initial value is "auto", which looks at align-self when you're inserting margins to adjust the step<br>
&lt;TabAtkins> fantasai: that makes sense<br>
&lt;TabAtkins> fantasai: but when you're inserting inside the box (padding or content) we don't look at the alignment properties<br>
&lt;TabAtkins> fantasai: but it probably makes sense to lookk at the align content property<br>
&lt;TabAtkins> fantasai: and might even want to let it win over block-step-align<br>
&lt;fantasai> TabAtkins: So if we're doing block-step by inserting into padding/content, we defer to align-content as long as it's no-normal<br>
&lt;fantasai> TabAtkins: seems plausible<br>
&lt;fantasai> TabAtkins: makes align-content have an effect where doesn't currently, like blocks<br>
&lt;fantasai> fantasai: it does affect blocks<br>
&lt;TabAtkins> fantasai: so proposed resoliution is if block-step-insert is padding-box or content-box, block-step-align:auto defaults to following align-content when it's not normal<br>
&lt;TabAtkins> astearns: what happens when it is normal?<br>
&lt;TabAtkins> fantasai: separate resolution<br>
&lt;TabAtkins> iank_: remind me how this works?<br>
&lt;TabAtkins> iank_: non-normal align-content estalbishes an IFC<br>
&lt;TabAtkins> iank_: that's okay for this?<br>
&lt;TabAtkins> fantasai: I think it's okay. doesn't make the feature more complicated<br>
&lt;dbaron> s/an IFC/an independent formatting context/<br>
&lt;TabAtkins> astearns: so we ahve the first proposed resolution<br>
&lt;bkardell> s/ahve/have<br>
&lt;dbaron> (IFC could also mean "inline formatting context", but Ian said "independent")<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;TabAtkins> RESOLVED: if block-step-insert is padding-box or content-box, block-step-align:auto defaults to following align-content when it's not normal<br>
&lt;TabAtkins> fantasai: so followup, should alingment property win over block-step align if they're both set to an explicit value<br>
&lt;TabAtkins> fantasai: so if you have block-step-align:start and align-content:end...<br>
&lt;TabAtkins> fantasai: seems weird<br>
&lt;TabAtkins> fantasai: can't imagine why you'd want that<br>
&lt;TabAtkins> fantasai: if you're setting the alingment property, and shifting the content by a potnetially large amount, ahving block-step-align move you back away from that desired alignment seems weird<br>
&lt;TabAtkins> astearns: i believe that block-step-align is applied in a more general context, and aling-content will be more specific<br>
&lt;TabAtkins> astearns: so i do agree align-content should win<br>
&lt;fantasai> TabAtkins: Yeah, I think I agree with astearns that align-content would b emore specific<br>
&lt;TabAtkins> jensimmons: in my head, i wonder if it's that alignment should apply to the items inside the box that would be on the side of the box if block-step wasn't turned on, and block-step applies to the space that's put there by block-step<br>
&lt;TabAtkins> jensimmons: imagine a website with components, one with block-step applied and another without lbock-step<br>
&lt;TabAtkins> jensimmons: people can use the block-step for vertical rhythm regardless fo the content alignment, don't think it's contradictory<br>
&lt;astearns> q?<br>
&lt;TabAtkins> fantasai: thing is, if you're alinging contents to the end, and block-step says you need to be slightly bigger, you don't want to push it further away from the end<br>
&lt;TabAtkins> florian_irc: i think this could be another situation similar to the border color, author could be confused why they're alinging something but it's clearly not visually aligned<br>
&lt;TabAtkins> florian_irc: so i agree that align should win there<br>
&lt;TabAtkins> astearns: i don't see it as one or the other, you ahve both things applying to the element, block-step produces a size, but the alignment *within* that size should be controled by the alingment property<br>
&lt;TabAtkins> fantasai: [example on whiteboard]<br>
&lt;TabAtkins> fantasai: so we have a big box. it's larger than its content, and has align-content:end<br>
&lt;TabAtkins> fantasai: so the contents are flush with the end of the box<br>
&lt;TabAtkins> fantasai: then block-step comes in<br>
&lt;TabAtkins> fantasai: everything has 'block-step-align: center'. If this applies naively, it puts some extra space between the box and its contents, so the contents are no longer flush<br>
&lt;TabAtkins> fantasai: confusing gap there<br>
&lt;TabAtkins> jensimmons: okay, this does look liek a case where alignment should win<br>
&lt;TabAtkins> fantasai: right<br>
&lt;TabAtkins> fantasai: different case<br>
&lt;TabAtkins> fantasai: say you ahve a flexbox with vertical rhythm<br>
&lt;TabAtkins> [confused about example]<br>
&lt;TabAtkins> fantasai: if you're inserting block-step into margin, shoudl be consistent with align-self if specified, again so if the element *wants* to be flush with an edge, we stay consistent with that when inserting block-step space<br>
&lt;TabAtkins> fantasai: so i htink alignment should probably always win when it's specified as non-normal<br>
&lt;TabAtkins> fantasai: just can't imagine you'd ever want it to have effects opposite that of the alignment<br>
&lt;TabAtkins> florian_irc: I'm convinced in the first case. I'm confused about the second case.<br>
&lt;TabAtkins> jensimmons: agreed<br>
&lt;TabAtkins> jensimmons: it does feel liek block-step should win when it's on the outside<br>
&lt;TabAtkins> fantasai: if you're self-aligning an item, say in a grid, and block-step is trying to align it, you probably want to match that<br>
&lt;TabAtkins> proposed: non-normal values of align-content/self win over block-step-align (depending on whether block-step-insert is putting the space inside or outside the element)<br>
&lt;fantasai> TabAtkins: This wouldn't give align-self behavior in cases where it doesn't currently apply<br>
&lt;fantasai> fantasai: right<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;fantasai> (we should make that clear)<br>
&lt;TabAtkins> RESOLVED: non-normal values of align-content/self win over block-step-align (depending on whether block-step-insert is putting the space inside or outside the element)<br>
</details>


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


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

Received on Thursday, 3 April 2025 20:15:36 UTC