Re: [csswg-drafts] [css-shapes][css3-backgrounds] No explicit <position> serialization steps in background spec (#368)

I was looking for issues related to the serialization of `<position>` (ie. the "generic" `<position>`) and `<bg-position>` because I do not understand the rationale for the following (quoted from [CSS Shapes, 3.3 Serialization of Basic Shapes](https://drafts.csswg.org/css-shapes-1/#basic-shape-serialization)), which is matching the current browser outputs and [WPT tests](https://github.com/web-platform-tests/wpt/blob/3c77bf496e9c506b6ce32cf5866fa3a97f95f881/css/css-shapes/basic-shape-circle-ellipse-serialization.html#L27):

> Omitting components means that some default values do not show up in the serialization. But since <position> always uses the 2- or 4-value form, a default <position> is not omitted.
>
> `circle(closest-side at center)` serializes as `circle(at 50% 50%)`

I guess that *<position> always uses the 2- or 4-value form* comes from an old version of CSS Shape, but why this rule is also applied to `<bg-position>`? And why would it be required? Furthermore, the following (quoted from [CSSOM, 6.7.2 Serializing CSS Values](https://drafts.csswg.org/cssom/#serializing-css-values)) is a normative text against it:

> If component values can be omitted or replaced with a shorter representation without changing the meaning of the value, omit/replace them.

`circle()`, `circle(at center)`, `circle(at 50%)`, ... are all valid and *means the same value*, and my guess would have been to serialize them as `circle()`. I am not claiming that they should be serialized like this, but I just woud like to understand the current browser outputs.

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


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

Received on Friday, 26 November 2021 09:48:01 UTC