Package

Core

The core syntax parsing of Master CSS.


Interfaces

MasterCSS

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

import MasterCSS from '@master/css'
const css = new MasterCSS(customConfig)
ArgumentTypeDefault
customConfig
Config?
undefined

css.config

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

Type

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 the configuration.

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

css.reset()

Clear all rules and reset to initial.

ArgumentTypeDefault
return
this
-
css.reset()

css.destroy()

Destroy and remove the current instance from globalThis.masterCSSs.

ArgumentTypeDefault
return
this
-
css.destroy()

globalThis.masterCSSs

All objects instantiated via new MasterCSS().

Type
MasterCSS[]
Default
[]

globalThis.MasterCSS

Type
typeof RuntimeCSS
Default
MasterCSS
Design Token
Colors

Customizing color variables or starting with the crafted palette.

© Aoyue Design LLC.