Hacker News new | past | comments | ask | show | jobs | submit login

There's still no good way of publishing an npm package with multiple components, stylesheets per component, and transitive consumers using only the stylesheets for the components they reference while rendering fully server side. CSS is still not scalable.



This is what native CSS module scripts solve.

You can import CSS directly into JavaScript modules:

    import styles from './styles.css' assert {type: 'css'};

https://web.dev/css-module-scripts/

Live example: https://lit.dev/playground/#gist=f0bdd3b5db5e4a404297e695305...


SSR was mentioned though.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: