Customization

Customizing Syntax Rules

A guide to adding custom syntax rules.

Overview

NametypeUnitVariables
accent-color--
align-content--
align-items--
align-self--
animation--
animation-delayms-
animation-direction--
animation-durationms-
animation-fill-mode--
animation-iteration-count--
animation-name--
animation-play-state--
animation-timing-function--
appearance--
aspect-ratio--
backdrop-filter--
background--
background-attachment--
background-blend-mode--
background-clip--
background-color--
background-image--
background-origin--
background-positionpx-
background-repeat--
background-sizerem-
borderrem["frame"]
border-bottomrem["frame"]
border-bottom-color-["frame"]
border-bottom-left-radiusrem-
border-bottom-radiusrem-
border-bottom-right-radiusrem-
border-bottom-style--
border-bottom-widthrem-
border-collapse--
border-color-["frame"]
border-image--
border-image-outsetrem-
border-image-repeat--
border-image-slice--
border-image-source--
border-image-widthrem-
border-leftrem["frame"]
border-left-color-["frame"]
border-left-radiusrem-
border-left-style--
border-left-widthrem-
border-radiusrem-
border-rightrem["frame"]
border-right-color-["frame"]
border-right-radiusrem-
border-right-style--
border-right-widthrem-
border-spacingrem["spacing"]
border-style--
border-toprem["frame"]
border-top-color-["frame"]
border-top-left-radiusrem-
border-top-radiusrem-
border-top-right-radiusrem-
border-top-style--
border-top-widthrem-
border-widthrem-
border-xrem["frame"]
border-x-color-["frame"]
border-x-style--
border-x-widthrem-
border-yrem["frame"]
border-y-color-["frame"]
border-y-style--
border-y-widthrem-
bottomrem["spacing"]
box-decoration-break--
box-shadowrem-
box-sizing--
break-after--
break-before--
break-inside--
caret-color-["text"]
clear--
clip-path--
color-["text"]
column-gaprem["spacing"]
column-span--
columns--
contain--
container--
container-name--
container-type--
content--
counter-increment--
counter-reset--
cursor--
cx-["spacing"]
cy-["spacing"]
direction--
display--
fill--
filter--
flex--
flex-basisrem-
flex-direction--
flex-grow--
flex-shrink--
flex-wrap--
float--
font-["font-family", "font-variant", "font-weight", "font-size", "font-style", "line-height"]
font-family--
font-feature-settings--
font-sizerem-
font-smoothing--
font-styledeg-
font-variant--
font-variant-numeric--
font-weight--
gaprem["spacing"]
gradient--
grid--
grid-area--
grid-auto-columns--
grid-auto-flow--
grid-auto-rows--
grid-column--
grid-column-end--
grid-column-span--
grid-column-start--
grid-columns--
grid-row--
grid-row-end--
grid-row-span--
grid-row-start--
grid-rows--
grid-template--
grid-template-areas--
grid-template-columnsrem-
grid-template-rowsrem-
group--
heightrem-
hyphens--
insetrem["spacing"]
isolation--
justify-content--
justify-items--
justify-self--
leftrem["spacing"]
letter-spacingem-
line-height--
list-style--
list-style-image--
list-style-position--
list-style-type--
marginrem["spacing"]
margin-bottomrem["spacing"]
margin-inlinerem["spacing"]
margin-inline-endrem["spacing"]
margin-inline-startrem["spacing"]
margin-leftrem["spacing"]
margin-rightrem["spacing"]
margin-toprem["spacing"]
margin-xrem["spacing"]
margin-yrem["spacing"]
mask-image--
max-heightrem-
max-sizerem-
max-widthrem-
min-heightrem-
min-sizerem-
min-widthrem-
mix-blend-mode--
object-fit--
object-position--
opacity--
order--
outlinerem["outline-width", "outline-style", "outline-offset", "outline-color", "frame"]
outline-color-["frame"]
outline-offsetrem["spacing"]
outline-style--
outline-widthrem-
overflow--
overflow-x--
overflow-y--
overscroll-behavior--
overscroll-behavior-x--
overscroll-behavior-y--
paddingrem["spacing"]
padding-bottomrem["spacing"]
padding-inlinerem["spacing"]
padding-inline-endrem["spacing"]
padding-inline-startrem["spacing"]
padding-leftrem["spacing"]
padding-rightrem["spacing"]
padding-toprem["spacing"]
padding-xrem["spacing"]
padding-yrem["spacing"]
place-content--
place-items--
place-self--
pointer-events--
position--
quotes--
resize--
rightrem["spacing"]
row-gaprem["spacing"]
rx--
ry--
scroll-behavior--
scroll-marginrem["spacing"]
scroll-margin-bottomrem["spacing"]
scroll-margin-leftrem["spacing"]
scroll-margin-rightrem["spacing"]
scroll-margin-toprem["spacing"]
scroll-margin-xrem["spacing"]
scroll-margin-yrem["spacing"]
scroll-paddingrem["spacing"]
scroll-padding-bottomrem["spacing"]
scroll-padding-leftrem["spacing"]
scroll-padding-rightrem["spacing"]
scroll-padding-toprem["spacing"]
scroll-padding-xrem["spacing"]
scroll-padding-yrem["spacing"]
scroll-snap-align--
scroll-snap-stop--
scroll-snap-type--
shape-image-threshold--
shape-marginrem["spacing"]
shape-outside--
sizerem-
stroke--
stroke-dasharray--
stroke-dashoffset-["spacing"]
stroke-width--
table-layout--
text-align--
text-decorationrem["text"]
text-decoration-color-["text"]
text-decoration-line--
text-decoration-style--
text-decoration-thicknessem-
text-fill-color-["text"]
text-indentrem-
text-orientation--
text-overflow--
text-rendering--
text-shadowrem-
text-sizerem-
text-strokerem-
text-stroke-color--
text-stroke-widthrem-
text-transform--
text-truncate--
text-underline-offsetrem["spacing"]
text-underline-position--
text-wrap--
toprem["spacing"]
touch-action--
transformpx["spacing"]
transform-box--
transform-originpx-
transform-style--
transition--
transition-delayms-
transition-durationms-
transition-property--
transition-timing-function--
user-drag--
user-select--
variable--
vertical-align--
visibility--
white-space--
widthrem-
will-change--
word-break--
word-spacingem-
writing-mode--
x-["spacing"]
y-["spacing"]
z-index--

In Master CSS, most syntax rules are defined and implemented through the config.rules. You can create your own custom syntax rules and use them directly within the class="" attribute.

These custom rules are fully compatible with Master CSS’s advanced features, including selectors, at-rules, functions, and variables—offering a powerful and flexible styling experience.

Use this as a last resort when implementing your design system or styling conventions. Avoid creating custom syntax rules unless absolutely necessary, as overuse can lead to reduced maintainability and consistency across your codebase.


Basic usage

Add a syntax rule

Create your own syntax rule.

export default {    rules: {        foo: {             unit: 'rem',             declare(value, unit) {                 return {                     width: value + unit                 }             }         }     }}

Use it in your markup:

<div class="foo:32"></div>

Generated CSS:

.foo\:32 {    width: 2rem;}
Customization
Customizing Selectors

A guide to adding custom selector tokens and aliases.

Customization
Creating Utilities

A guide to adding custom utility classes.

© Aoyue Design LLC.