Skip to content

adopt usage of Constructable Stylesheets #29

@thescientist13

Description

@thescientist13

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions