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

>  I don't know why they would need to have the same computed value, as I don't think that applies to other logical property groupings.

It does, see https://drafts.csswg.org/css-logical/#box:

> Although the [specified value](https://drafts.csswg.org/css-cascade-5/#specified-value) of each property remains distinct, paired properties share a computed value

Your example with `margin` is different. With `direction: ltr` the pairing is `margin-left = margin-inline-start`, and with `direction: rtl` the pairing is `margin-left = margin-inline-end`. For each one of these pairings, the computed value is shared: 2px.

In my example, the computed value is not shared: one of the paired properties is set to 0%, the other to 100%.

But I guess we can try to address this in the same way as #9217, i.e.

 - `background-position-x: 0%` will make the computed value be `0%`, which will serialize as `0%` for `background-position-x`, and as `100%` for `background-position-inline` (in horizontal rtl)
 - `background-position-inline: 0%` will make the computed value be `0% logical`, which will serialize as `0%` for `background-position-inline`, and as `100%` for `background-position-x` (in horizontal rtl)



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


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

Received on Thursday, 3 July 2025 16:16:56 UTC