cagov / design-system

State of California Design System
MIT License
80 stars 25 forks source link

Move component CSS inserts into custom elements #915

Closed xjensen closed 2 years ago

xjensen commented 2 years ago

Addresses #914 by moving CSS insertion into each custom element's constructor. This removes the const style from global scope in each file, which may assist in some multi-component build scenarios.

Affected components include the following.

github-actions[bot] commented 2 years ago

Preview site available at 914-less-const.pr.designsystem.webstandards.ca.gov.

zakiya commented 2 years ago

@xjensen have these changes been pushed to npm?

(Something to think about for the whole team: Can we have a way of knowing/ensuring packages are updated on npm without asking on an individual basis?)

xjensen commented 2 years ago

@zakiya No, not yet pushed to NPM. I could push beta versions if needed.

Also, do you want me to merge this into the release branch now, or toward the end of the sprint?

(Ideally we could come up with a script that would do all the publishing to NPM based on changed version numbers, so nobody would need to go through each component.)

zakiya commented 2 years ago

Merge now please.

Sprint ends at the end of the quarter (September) so let's publish to npm now so changes can be available to Danny.

(🤔 )

xjensen commented 2 years ago

Merged and published to NPM.