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

adopt usage of Constructable Stylesheets #29

Open
thescientist13 opened this issue Nov 2, 2024 · 0 comments
Open

adopt usage of Constructable Stylesheets #29

thescientist13 opened this issue Nov 2, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@thescientist13
Copy link
Member

thescientist13 commented Nov 2, 2024

I think it's just a matter of having the right NodeJS compat for Vercel, but would be cool if we could set Greenwood's Import Attributes and refactor the inline CSS in the src/components/ directory to use Constructable StyleSheets.

So instead of all the inline CSS

  1. move it into its own dedicated file
  2. Use Import Attributes, ex
    import sheet from './card.css' with { type: 'css' }
  3. Adopt it into the Shadow Root, instead of an inline <style> tag in the template
    this.shadowRoot.adoptedStyleSheets = [ sheet ];

I think was attempted in #22 but Vercel didn't support the Node 18.x version we wanted, but maybe it does now?

@thescientist13 thescientist13 added enhancement New feature or request good first issue Good for newcomers labels Nov 2, 2024
@thescientist13 thescientist13 changed the title use Constructable Stylesheets adopt usage of Constructable Stylesheets Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant