Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-properties-values-api] @property in shadow trees #846

Closed
andruud opened this issue Dec 12, 2018 · 2 comments
Closed

[css-properties-values-api] @property in shadow trees #846

andruud opened this issue Dec 12, 2018 · 2 comments

Comments

@andruud
Copy link
Member

andruud commented Dec 12, 2018

What happens when @property rules appear inside shadow trees?

  • Ignored?
  • Applied (i.e. causes property registration) at the document level?
  • Some new concept of scoped/local variables?
andruud added a commit to andruud/css-houdini-drafts that referenced this issue Dec 12, 2018
This adds basic support for @Property, without solving any of the
potentially complicated issues, like w3c#845 and w3c#846.

Resolves w3c#137, at least partially.
andruud added a commit to andruud/css-houdini-drafts that referenced this issue Jul 2, 2019
This adds basic support for @Property, without solving any of the
potentially complicated issues, like w3c#845 and w3c#846.

Resolves w3c#137, at least partially.
tabatkins pushed a commit that referenced this issue Jul 22, 2019
* [css-properties-values-api] Add @Property.

This adds basic support for @Property, without solving any of the
potentially complicated issues, like #845 and #846.

Resolves #137, at least partially.

* Remove merge conflict things.

* Rewrapping, tiny wording tweaks, IDL/linking fixes
@tabatkins
Copy link
Member

CSS.registerProperty() is allowed inside of shadows, and produces a global registration, which suggests that we should allow @Property, and have it similarly produce a global registration (with all the clashing pain that implies).

That said, it would require us to define a stylesheet ordering of shadow stylesheets relative to the rest of the page. That seems complicated; I'm pretty sure we've avoided it so far?

I'm inclined to just disallow it, at least for now. If you're using shadow DOM, you're running script, right now; you can just call CSS.registerProperty().

@andruud
Copy link
Member Author

andruud commented Jul 25, 2019

I'm inclined to just disallow it, at least for now. If you're using shadow DOM, you're running script, right now; you can just call CSS.registerProperty().

Sounds good.

Long term it should probably do something, and I'd expect e.g. @keyframes and @property to have similar semantics. But it's probably smart to tread carefully here, since @keyframes is a mess right now (in Chrome anyway). So I support specifying that's it's disallowed, perhaps with a note that it might be allowed in the future. It should mean @property isn't blocked by anything difficult and can move forward relatively quickly. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants