Import CSS from JavaScript

Person in labcoat walking left


CSS is a core part of the Web Platform. It's often the second largest part of an application by language type, next to JavaScript. While there are a myriad of differing approaches to CSS authorship, the end result is generally represented as a StyleSheet to be loaded and applied by the browser.

Since there's no standard that defines how CSS should be handled when imported from JavaScript, build tools have had to innovate. Most tools make it possible to import CSS, however the semantics differ between each and are often configured specifically for a project. Here we test the most common approaches for importing stylesheets into application code.

Use the (+) card below & tell us if we missed a capability!

Plant with tall leafs and vines in a pot

Questions or Concerns?

We want to hear from you, let us know how to make this better. Open up a GitHub issue and we’ll track it there. Thanks!

Open a GitHub Issue