Re: [csswg-drafts] [css-animations-2] Scoping keyframe names between UA and developer styles. (#7560)

> Each keyframe declaration in the UA stylesheet will have a CSS function to scope it:

We don't necessarily need to tag the `@keyframes` name specially. I was envisioning `ua(foo)` just referring to a `@keyframes foo` in a UA-origin style sheet. But either way works.

> I think you meant -fade-in

Yes, in that part I was referring to just using a custom-ident with a single-dash prefix, rather than a function.

> but turns out that a [single dash is valid syntax](https://jsbin.com/motulamesa/edit?html,output) for custom idents today

It is, yeah, tho I'm not sure what existing usage is. We could potentially ban this naming pattern from the production, or perhaps just a `-ua-` prefix for use here.

> If the same keyframe declaration is used in any stylesheet other than user-agent origin it will rejected at parsing time.

If we went with a special naming convention in the `@keyframes` rule, then yes, it would be invalid to write `@keyframes ua(foo) {...}` anywhere but a UA style sheet.

> This includes both @Keyframe and when applying the keyframe to the animation-name property. 

Sure. As you say, it's not strictly necessary to ban it from being used in `animation-name` outside a UA style sheet, but doing so makes it less likely that pages can depend on precise details of the animation, thus allowing us some freedom to tweak it in the future.

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


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

Received on Tuesday, 30 August 2022 23:09:01 UTC