API Reference

Master CSS Core

The core syntax parsing of Master CSS.


Create a Master CSS instance with your custom configuration:

import MasterCSS from '@master/css'
const css = new MasterCSS(config)

.config

The .config property is the result of extending the default config with the custom config you passed by the constructor.

Default
{}
Type
css.config

.text

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

Default
''
Type
string
css.text

.add()

Add a new syntax class.

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

.delete()

Remove an existing syntax class.

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

.refresh()

Refresh the Master CSS with the configuration.

ArgumentTypeDefault
config?
this.customConfig
return
this
-
css.refresh(config)

.reset()

Clear all rules and reset to initial.

ArgumentTypeDefault
return
this
-
css.reset()

.destroy()

Destroy and remove the current instance from globalThis.masterCSSs.

ArgumentTypeDefault
return
this
-
css.destroy()

MasterCSS.config

The default Master CSS configuration.

Default
{}
Type
MasterCSS.config

Global

globalThis.masterCSSs

All objects instantiated via new MasterCSS().

Default
[]
Type
MasterCSS[]

globalThis.MasterCSS

Default
MasterCSS
Type
typeof RuntimeCSS
API Reference
Master CSS CLI

Command line interface for Master CSS.

API Reference
Master CSS ESLint

The ESLint configuration and plugin reference for Master CSS.

© Aoyue Design LLC.