Packages

@master/css

NPM package ( download / month )NPM package ( download / month )NPM package size (gzipped size)NPM package size (gzipped size)Source codeSource code

The CSS language and framework for rapidly building modern and high-performance websites

Installation

npm i @master/css

API Reference

Stylesheet entries

@master/css exports the default stylesheet and the split stylesheet entries used by integrations.

@import '@master/css';

The default stylesheet contains:

@import "./base.css";@import "./theme.css";

Use @import '@master/css/base.css'; when a runtime-only page only needs the base layer declaration and normalization rules. Use the default @master/css import from app stylesheets that should receive generated Master CSS and native CSS pruning in static mode.

MasterCSS

The main body of this package is the class MasterCSS, which encapsulates the core business of Master CSS.

import { MasterCSS, createCSS } from '@master/css'const css = createCSS(plan)const customCSS = new MasterCSS(plan)
ArgumentTypeDefault
plan
MasterCSSPlan
-

css.plan

The css.plan property is the compiled MasterCSSPlan executed by the engine. new MasterCSS(plan) and createCSS(plan) require a complete plan.

Type
MasterCSSPlan

css.settings

The css.settings property is the resolved settings section from the active plan.

Type
MasterCSSPlanSettings

css.text

This css.text getter returns the result of joining the text of all CSS rules.

Type
string
Default
''

css.add()

Add a new syntax class.

ArgumentTypeDefault
...classNames
string[]
-
return
boolean
-
css.add('text:center', ...)

css.delete()

Remove an existing syntax class.

ArgumentTypeDefault
...classNames
string[]
-
return
boolean
-
css.delete('text:center', ...)

css.refresh()

Refresh the Master CSS with a compiled plan.

ArgumentTypeDefault
plan?
MasterCSSPlan
this.plan
return
this
-
css.refresh(plan)

css.reset()

Clear all rules and reset to initial.

ArgumentTypeDefault
return
this
-
css.reset()

css.destroy()

Destroy and remove the current instance.

ArgumentTypeDefault
return
this
-
css.destroy()

globalThis.MasterCSS

Type
typeof MasterCSS
Default
MasterCSS

  • Master UI


© 2026 Aoyue Design LLC.MIT License
Trademark Policy