UNPKG

j2c

Version:

A tiny CSS in JS solution.

24 lines (18 loc) 495 B
## Namespaces `namedJ2c = j2c.ns(name)` returns a namespaced instance equipped with the same plugins and backend that `j2c`. Useful for defining per component styles. ```JS // styler.js import J2c from 'j2c' export const j2c = new J2c() ``` ```JS // menu.js import {j2c} from './styler.js' menuStyles = j2c.ns('menu') var sheet = menuStyles.sheet({ '.entry': {color: 'rgb(50, 100, 150)'} }) menuStyles.names.entry // => __menu_entry_sfd867k // define the rest of your component here. ```