steal-css

  • module
{Object}  

steal-css is a plugin for Steal that helps with loading CSS.

Object

Properties

  1. CSSModule {CSSModule(load, loader)}

    The CSSModule property is a constructor function that facilitates most of what steal-css provides. End users never need to use this functionality, it is provided for plugin authors that seek to extend steal-css' core behavior.

  2. getDocument {function()}

    Retrieves the document of the page, or the server-side rendering document.

Use

Install steal-css with npm and save it as a development dependency:

> npm install steal-css --save-dev

In your package.json add steal-css as a plugin under your steal (or system) configuration:

...

"steal": {
  "plugins": [
    "steal-css"
  ]
}

To load a CSS module in your JavaScript code, just import it just as you would any other module:

import "./styles.css";
Help us improve StealJS by taking our community survey