Re: [csswg-drafts] [css-animations-2] Make animation shorthand syntax future-proof (#6946)

>     * Put the animation name first or last and use a slash to separate it from the rest of the longhands

That was the initial suggestion and also what I and obviously @tabatkins would prefer.

> So, my suggestion is that we allow the animation-name component to be prefixed with a /, make future custom-idents (like timeline phase) prefixed with a keyword…

If we're going with prefixes, we still need to enforce the order somehow. Otherwise we'll have another potential name conflict. That time between the prefix keyword and the longhands keywords.

I'd actually separate future custom-idents with another slash instead. This avoids any conflicts of the longhand keywords. Though it would also always require to set the value for the animation name.

So it would be `<animation-name> / <animation-timeline> / …`.

>     * Allow to define the animation name as a `<string>`

One of my initial suggestions. It would clearly distinguish the name from the keywords, though given that we normally don't have names as strings probably not the best option. And it would still require a solution like above for future name-longhands.

>     * New property keywords will only be used if they are unambigiously _not_ an animation name

As Tab wrote, this makes it even more complicated for authors to match what's a name and what's a keyword.

>     * Add new name properties like `animation-timeline` with a prefix

See my point on this above.

>     * Animation name first, then the rest

As Tab wrote, this is not possible given that the name currently comes _last_ when interpreting the values.

Sebastian

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


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

Received on Wednesday, 31 August 2022 17:59:41 UTC