csswg-drafts icon indicating copy to clipboard operation
csswg-drafts copied to clipboard

[css-anchor-position] anchor() arguments should be reorderable

Open fantasai opened this issue 1 year ago • 2 comments

The syntax of anchor() is defined as follows:

<anchor()> = anchor( <anchor-element>? <anchor-side>, <length-percentage>? )

However we have a CSS design principle that if syntax can be unambiguously reordered, it should be allowed to be reordered. Shouldn't this be

<anchor()> = anchor( [ <anchor-element>? && <anchor-side> ], <length-percentage>? )

?

fantasai avatar May 13 '24 01:05 fantasai

I feel like there was a reason I had a strict ordering there at first; it might have been very early in the spec when the anchor name wasn't a dashed-ident but just a custom-ident.

But I agree, at this point it's fine to rearrange them.

tabatkins avatar May 24 '24 18:05 tabatkins

The CSS Working Group just discussed [css-anchor-position] anchor() arguments should be reorderable, and agreed to the following:

  • RESOLVED: anchor() arguments can be reordered
The full IRC log of that discussion <keithamus> fantasai: anchor arguments are custom-ident and keyword. We normally allow them to be re-ordered. Proposal to re-order.
<keithamus> Rossen4: hearing no objections, calling this resolved.
<fantasai> RESOLVED: anchor() arguments can be reordered

css-meeting-bot avatar May 29 '24 16:05 css-meeting-bot