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

[Feature request]: Implement Constructable Stylesheets #2658

Closed
3 tasks done
feerglas opened this issue May 14, 2024 · 2 comments
Closed
3 tasks done

[Feature request]: Implement Constructable Stylesheets #2658

feerglas opened this issue May 14, 2024 · 2 comments

Comments

@feerglas
Copy link
Contributor

Preflight Checklist

Request type

Request for enhancement of a component

It affects the following packages

Components

Functionality

Working with shadow root has it's drawbacks. On of them is duplication of styles and code.

Since CSSStyleSheet gained broad baseline support last year, it might be the time now to think about incorporating constructable stylesheets?

I have no concrete idea at which level this would be best integrated. I have the feeling that it would make most sense to integrate it at the lowest level possible (during/after bundling styles for the components) rather then leaving it up to consumers of the components.

https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/CSSStyleSheet

I did not find anything in the issues and projects about this topic in this repo, so I thought I'll try to raise the topic :)

Link to design proposal file

No response

@feerglas
Copy link
Contributor Author

Just noticed that styles already seem to be nicely constructed on a component level and that the issue of duplicated styles comes from my shaky integration testing with ssr ;) sorry for disruption guy 😇

@feerglas
Copy link
Contributor Author

Once this PR get's merged, my problems might go away ;)
Shared and de-duplicated declarative styles utility

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

1 participant