# Reference

The language and tool reference for writing, understanding and reviewing Master CSS.

- Canonical: /reference
- Language: en

<a id="rules"></a>

## Syntax

How a class names its declarations, selectors, conditions and layer.

- [Declarations and values](/reference/rules/declarations): Accepted class forms, native value parsing, units, importance and fixed utilities.
- [Selectors](/reference/rules/selectors): Selector attachment, related elements, lists, literal encoding and specificity.
- [Conditions](/reference/rules/conditions): Accepted query suffixes, named conditions, nested wrappers and queries that belong in CSS.
- [Variables and modes](/reference/rules/modes): Token lookup, dependency delivery, inline substitution, inheritance and mode activation.
- [Cascade layers](/reference/rules/layers): Generated layer selection, native rule ownership, importance and rule ordering.
- [Extraction](/reference/rules/extraction): Static candidate extraction, source boundaries, classification and shared source ownership.
- [Named conditions](/reference/rules/named-conditions): Every preset media and container condition, its expanded query and the scope it measures.

<a id="tokens"></a>

## Tokens

Every preset value, the classes that read it and how to change it.

- [Token families](/reference/tokens/families): Every preset token family: its class prefix, token namespace and native properties.
- [Color palette](/reference/tokens/color): Every numbered palette step, fixed hue alias and other preset color token.
- [Color roles](/reference/tokens/color-roles): Text, surface and line roles with one value for light and one for dark.
- [Spacing](/reference/tokens/spacing): One spacing scale for padding, margin, gaps, insets and offsets.
- [Container sizes](/reference/tokens/container): Preset lengths for width, height, minimum and maximum sizes.
- [Radius](/reference/tokens/radius): The preset corner radius scale, for whole elements or single corners.
- [Shadow](/reference/tokens/shadow): Layered elevation shadows, tuned for light and dark.
- [Font](/reference/tokens/font): Font families, sizes and weights, all written as font-*.
- [Text](/reference/tokens/text): Text treatments that set font size, line height and letter spacing together.
- [Leading](/reference/tokens/leading): Unitless line heights that scale with the font size.
- [Tracking](/reference/tokens/tracking): The preset letter-spacing scale.
- [Motion](/reference/tokens/motion): Animation shorthands, duration values and easing curves.

<a id="utilities"></a>

## Utilities

Preset recipes and numeric functions, with their declarations and constraints.

- [Grid tracks](/reference/grid-tracks): Equal grid tracks and spans in one class.
- [Truncation](/reference/truncation): Clip text to one line or a number of lines and end it with an ellipsis.
- [Screen reader text](/reference/sr-only): Hide text visually while keeping it in the accessibility tree.
- [Direct values](/reference/direct-values): Pass one static number to a length or numeric property.

<a id="directives"></a>

## Directives

Stylesheet at-rules for imports, tokens, query definitions, reuse, scanning and pruning.

- [Imports](/reference/directives/imports): Load the preset and other stylesheets, or reference their tokens and definitions without their CSS.
- [Theme](/reference/directives/theme): Register theme tokens and control their retention and substitution with static and inline.
- [Query definitions](/reference/directives/queries): Define reusable media and container conditions, with shared expansion in stylesheets and class suffixes.
- [Utilities and mixins](/reference/directives/definitions): Define on-demand utilities, reusable mixins and layered native styles.
- [Scanning](/reference/directives/scanning): Include or exclude source files and specific class names.
- [Native CSS pruning](/reference/directives/pruning): Control native class pruning and on-demand keyframes within each stylesheet.

<a id="tools"></a>

## Tools

The CLI, the MCP server and the public packages.

- [MCP tools](/reference/tools/mcp): Choose a tool, understand its file effects, and find the current protocol contract.
- [CLI commands](/reference/tools/cli): Choose a command, check its file effects, and find complete options in CLI help and source.
- [Packages](/reference/packages): Choose a public package, find its import paths, and open its API source on GitHub.

[Start with the Guide](/guide) to learn concepts and build with step-by-step examples.
