API Reference

This section documents all exports from the cssxjs package.

Imports

import {
  styl,
  css,
  pug,
  variables,
  setDefaultVariables,
  defaultVariables,
  dimensions,
  matcher
} from 'cssxjs'

Sections

Templates:

  • styl Template — Stylus syntax, variables, mixins, u unit
  • css Template — Plain CSS syntax
  • pug Template — JSX alternative with Pug syntax, TypeScript expressions, and embedded style blocks

Styling:

Configuration:

Quick Reference

ExportTypeDescription
stylTemplate literal / FunctionWrite styles in Stylus syntax, or apply styles via spread
cssTemplate literalWrite styles in plain CSS syntax
pugTemplate literalWrite JSX in Pug syntax, with TypeScript expressions and embedded style blocks
variablesObservable objectSet CSS variable values at runtime
setDefaultVariablesFunctionSet default CSS variable values
defaultVariablesObjectRead-only default variable values
dimensionsObservable objectCurrent screen width for media queries
matcherFunctionInternal style matching (advanced)