Re: [csswg-drafts] [css-backgrounds-4] Using logical keywords in background-position shorthand with multiple backgrounds (#12132)

The CSS Working Group just discussed `[css-backgrounds-4] Using logical keywords in background-position shorthand with multiple backgrounds`.

<details><summary>The full IRC log of that discussion</summary>
&lt;emilio> fantasai: it gets tricky how to expand background properties that contain logical shorthands<br>
&lt;oriol> q+<br>
&lt;emilio> ... proposal is introducing a defer keyword which defer to the opposite's coordinate system value<br>
&lt;fantasai> s/contain/contain both/<br>
&lt;weinig> q+<br>
&lt;fantasai> s/both/both physical and/<br>
&lt;dbaron> q+<br>
&lt;emilio> ... so if I have `bg-position-x` and `bg-position-inline`, then `defer` gets ignored and the shorthand can expand into all properties<br>
&lt;Rossen3> ack oriol<br>
&lt;emilio> oriol: how this longhands work is quite unclear to me<br>
&lt;emilio> ... they're supposed to form a logical property group<br>
&lt;emilio> ... but there the pairing of logical and physical properties share a computed value<br>
&lt;emilio> ... does defer get resolved at computed value time?<br>
&lt;emilio> ... also grammars are similar<br>
&lt;emilio> q+<br>
&lt;emilio> weinig: can clarify that<br>
&lt;emilio> s/similar/different<br>
&lt;emilio> weinig: defer would not exist at computed value time, for the background the keywords never make it to the computed value time<br>
&lt;emilio> ... it's currently replacing what currently is the empty string<br>
&lt;emilio> ... so when you read the logical version at specified time it gives you the empty string<br>
&lt;emilio> ... which works fine when you don't have a list<br>
&lt;emilio> ... so it's just kinda replacing the empty string<br>
&lt;emilio> ... we could also use defer for non-list properties<br>
&lt;emilio> ... but I don't have a strong feeling either way<br>
&lt;SebastianZ> q+<br>
&lt;fantasai> +1 to using for all properties, not just lists<br>
&lt;emilio> ack weinig<br>
&lt;emilio> dbaron: if I'm understanding this correctly then implementing it requires doing additive cascade<br>
&lt;Rossen3> ack dbaron<br>
&lt;emilio> ... which has a lot of use cases<br>
&lt;emilio> ... and I think we should flesh it out<br>
&lt;bramus> +1<br>
&lt;emilio> weinig: what is additive cascade?<br>
&lt;emilio> dbaron: basically instead of overriding the pre-existing values, you add to your background list or counter-reset list<br>
&lt;emilio> fantasai: I don't think this is quite that<br>
&lt;emilio> ... it just lets you say that the value of this item in the list is taken from the value of a different property<br>
&lt;emilio> dbaron: right but to implement it you need to sort of search further back<br>
&lt;emilio> ... in this case there's sort of at most two declarations involved<br>
&lt;emilio> fantasai: and for different properties<br>
&lt;emilio> ... so you do the whole cascade and you end up with declared values for -x/-y/-block/-inline<br>
&lt;Rossen3> ?<br>
&lt;emilio> ... similar to margin longhands / shorthands<br>
&lt;Rossen3> q?<br>
&lt;fantasai> emilio: I think the model wasn't quite clear. I agree with Oriol that this feels odd. It's not quite the same as margins, for example<br>
&lt;fantasai> emilio: because there you map the property while you're doing the cascade<br>
&lt;fantasai> emilio: here the specified values ...<br>
&lt;fantasai> emilio: Not necessarily opposed, but it feels awkward<br>
&lt;fantasai> emilio: but don't have a suggestion<br>
&lt;fantasai> SebastianZ: My point was regarding when you setting 'defer' on the longhands, what should we do<br>
&lt;emilio> SebastianZ: what should we do when you set `defer` on the longhands?<br>
&lt;fantasai> SebastianZ: fantasai suggested 2 options, we need to decide on those.<br>
&lt;fantasai> weinig: If you do have a concern, providing a syntax example -- I tried to show in the issue, with each thing, put examples to help think it through<br>
&lt;fantasai> weinig: so be specific with your concerns<br>
</details>


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


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

Received on Wednesday, 2 July 2025 17:03:29 UTC