Re: [css-houdini-drafts] [css-properties-values-api] Should property registration be scoped? (#939)

> Shouldn't it at least apply within the shadow DOM's scope, or are `@property`'s currently forbidden in the shadow DOM? I know many of the examples in this discussion are hypothetical, but I'm not quite sure on what the current state allows.
> 
> I suppose it would be make sense, considering the JS API for registering is on the global `CSS` object.

The [spec currently specifies](https://drafts.css-houdini.org/css-properties-values-api/#:~:text=A%20%40property%20is%20invalid%20if%20it%20occurs%20in%20a%20stylesheet%20inside%20of%20a%20shadow%20tree%2C%20and%20must%20be%20ignored.) that `@property` should be ignored inside Shadow DOM.

This is presumably to allow the door for shadow scoped later, although as @tabatkins points out this probably won't work for `--custom-name` anyway due to host elements existing in multiple scopes.

-- 
GitHub Notification of comment by Jamesernator
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/939#issuecomment-1008545020 using your GitHub account


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

Received on Monday, 10 January 2022 05:01:14 UTC