Custom Syntax
Variables
Customizing variables for your design tokens.
š§This page is still under construction and some content may not be complete.
Overview [sr-only]
import { variables } from '@master/css' export default { variables: { 'font-family': { sans: 'Inter' }, sizing: { md: 1024 }, spacing: { x1: 2 }, primary: '#000000' }}
Apply custom variables using ambiguous shorthand:
<div class="font:sans max-w:md m:x1 bg:primary">ā¦</div>
Master CSS provides useful variable groups for various inheritance behaviors such as colors, spacings, fonts, and box sizes by default. You can start implementing your design tokens from these topics.
This guide primarily explains the functionality of variables.