Home | Notifications | New Note | Local | Federated | Search | Logout

Note Detail


Firefox for Web Developers@firefoxwebdevs@mastodon.social (2026-01-23 23:28:29)
CSS module scripts landed in Firefox 147, so you can import CSS directly into JavaScript.

Docs:

Import attributes https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import/with
CSSStyleSheet https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet ---Attachments--- video: https://files.mastodon.social/media_attachments/files/115/944/881/429/553/149/original/7d8c7fc4b8b4eed6.mp4

---Reply--- Jesper@Jespertheend@mastodon.social (2026-01-23 23:58:33) @firefoxwebdevs I've been using this for well over 4 years! Yes, I wouldn't serve this to my users either. But it's really nice to have a development environment without any build step. We can just import style sheets during development, and then when the time comes to make a production build, our bundler can include the CSS and JavaScript into a single file.
Reply