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

Locally scoped css #278

Open
clinuxrulz opened this issue Jun 8, 2021 · 2 comments
Open

Locally scoped css #278

clinuxrulz opened this issue Jun 8, 2021 · 2 comments

Comments

@clinuxrulz
Copy link

Is there any plans to support locally scoped css in moxie-dom?

@anp
Copy link
Owner

anp commented Jun 8, 2021

I'm reading about locally scoped CSS for the first time and it seems really cool! It looks like in order to support it we'd need to expose access to the style field of DOM nodes to let values be set directly. Seems doable but haven't looked into how to do it concretely yet.

@clinuxrulz
Copy link
Author

I believe the bundlers for React, Svelte, SolidJS etc. actually create a global css at the end from the users given locally scoped css. They do this by generating non-conflicting class names so the end user can reuse a css class name while only having a local effect on the the style of their DOM. Widespread web-browser support for locally scopped css is not likely to come anytime soon, thats why the compiled it into a single global css.

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

No branches or pull requests

2 participants