A UXDSL error names a UXD_* code, the file, line and column, and shows the line; the message says what exists instead (the configured breakpoints, the available keys, a close name). Nothing falls back silently: an unknown breakpoint, preset, role or reference stops the build. The runtime reports its codes on a result (applyTheme(...).error.code) instead of throwing.
Read from DIAGNOSTIC_CATALOG (uxdsl/language), the catalog the compiler itself throws from: a test fails when the compiler can produce a code the catalog does not list, or when a listed code is produced nowhere.
| Code | Meaning | Fix |
|---|---|---|
UXD_BREAKPOINT_BASE | In a multi-part value, a responsive group has no value at the base breakpoint, so the value would change shape between widths. | Give the group a base, e.g. xs(…), or make the whole value one responsive expression. |
UXD_BREAKPOINT_CONTEXT | A breakpoint function is nested inside another function or breakpoint, or a responsive value sits under @keyframes/@font-face/@page/@counter-style. | Write the breakpoint functions at the top level of the value, with the inner function in each group; outside those at-rules, set the responsive value on a custom property. |
UXD_BREAKPOINT_EMPTY | A breakpoint function has no value, e.g. xs(). | Write the value inside the parentheses, or remove the breakpoint. |
UXD_BREAKPOINT_IMPORTANT | `!important` appears inside a breakpoint group. | Put `!important` after the groups; it then applies at every breakpoint. |
UXD_BREAKPOINT_UNKNOWN example | A top-level function is neither a configured breakpoint nor a known CSS function, next to a real breakpoint or one edit away from one. | Use a breakpoint name the theme defines; the message lists them. |
UXD_BUTTON_ARGUMENT | @ds-button is not written as @ds-button(role [tone] [size] [radius(k)] [shadow(k)]). | Put the parentheses directly after the name, separate arguments with spaces, the role first, each override once. |
UXD_COLOR_ARGUMENT | color() was given no argument or more than a key and an alpha. | Write color(family[.shade][, alpha]). |
UXD_COLOR_REFERENCE | color() names a family or shade the theme does not define. | Use a defined family and shade; the message lists them. |
UXD_COLOR_SYNTAX | A color() argument uses the removed dashed spelling or is not family[.shade]. | Write color(family.shade), e.g. color(gray.300). |
UXD_DENSITY_ARGUMENT | density() was given no argument or more than one. | Write density(k). |
UXD_DENSITY_REFERENCE | density(k) names a Density key the theme does not define. | Use a defined key; the message lists them. |
UXD_DIRECTIVE_CONTEXT example | A directive is not a direct child of the rule it styles (at the root, or under @media/@supports). | Move the directive into the rule; put responsive expressions on individual properties instead. |
UXD_DIRECTIVE_DUPLICATE example | A second @ds-button or @ds-input in the same rule would emit competing states. | Keep one control directive per rule, or split the selectors. |
UXD_DIRECTIVE_UNKNOWN example | An at-rule in the reserved ds/ds-* namespace is not one of the four directives. | Use @ds-surface, @ds-button, @ds-input or @ds-typo; the message suggests the closest. |
UXD_EDGE_ARGUMENT example | radius() or border() was given more than one argument. | Write radius(k) / border(k); set border-color or border-style as declarations after border: border(k). |
UXD_EDGE_REFERENCE example | radius(k) or border(k) names a token the theme does not define. | Use a defined key or the keywords pill/circle; the message lists them. |
UXD_FUNCTION_UNKNOWN example | A function, in a declaration or a theme value, that is neither a CSS function the compiler knows nor a UXDSL one but is spelled close to one: a near-miss of a token function, tone() or a breakpoint (palete(), densty(), colr()), or a spelling people write for one (spacing(), colour(), pallete(), radii(), borders(), shadows()). | Write the function the message suggests; a real CSS function the compiler does not know is left untouched, and a vendor-prefixed one (-webkit-…) always is. |
UXD_INPUT_ARGUMENT | @ds-input is not written as @ds-input(role [tone] [size] [radius(k)] [shadow(k)]). | Put the parentheses directly after the name, separate arguments with spaces, the role first, each override once. |
UXD_OPTION_REMOVED | A plugin option that no longer exists was passed (a warning; the option is ignored). | Remove the option; breakpoints live in the theme and variable names are the --uxdsl__ contract. |
UXD_PALETTE_ARGUMENT | palette() was given no argument or more than a key and an alpha. | Write palette(family[.variant][, alpha]). |
UXD_PALETTE_REFERENCE example | palette() names a family or variant the theme does not define. | Use a defined family and variant; the message lists them and suggests a close one. |
UXD_PALETTE_SYNTAX example | A palette() argument uses the removed dashed spelling or is not family[.variant]. | Write palette(family.variant), e.g. palette(primary.main). |
UXD_REFERENCE_CONTEXT | A `references` option cannot apply where it was given: an external token that is not a `--custom-property` name, or compiled `css` handed to generateThemeCss/validateTheme, which have no CSS parser. | Name externals as `--name`; give compiled dependency CSS to the PostCSS plugin (compile(), uxdsl build and the adapters pass it there) and only `externalTokens` to the theme paths. |
UXD_REFERENCE_CYCLE | Theme tokens reference each other in a cycle. | Break the cycle; the message shows the chain. |
UXD_REFERENCE_MISSING example | An emitted var(--uxdsl__…) points at a custom property nothing defines. | Define the token in the theme, declare it in references.externalTokens, or fix the name; the message names the chain. |
UXD_SASS_CONTEXT example | Sass syntax reached the PostCSS plugin: a construct only Dart Sass evaluates ($variables, @use, @forward, @mixin/@include, @function, @extend, @if/@each/@for/@while and the other Sass at-rules, #{…} interpolation, &-suffix selectors, %placeholders, nested properties, namespaced calls, // comments) in a stylesheet the plugin compiles alone, or a $variable or namespaced call Sass kept as written (in a custom property, a plain-CSS at-rule prelude, a progid: value, a CSS @function body or the arguments of expression(), element(), type() or a vendor-prefixed calc(), a url() there included). | Name the file .uxdsl and compile it with uxdsl build, compile() or an adapter, or remove the Sass; where Sass keeps a $variable as written, write #{$variable}. |
UXD_SHADOW_ARGUMENT | shadow() was given more than one argument. | Write shadow(k). |
UXD_SHADOW_REFERENCE example | shadow(k) names a token the theme does not define. | Use a defined shadow key; the message lists them. |
UXD_SPACE_ARGUMENT | space() was given no argument or more than one. | Write space(k). |
UXD_SPACE_REFERENCE | space(k) names a Spacing key the theme does not define. | Use a defined key; the message lists them and suggests a close one. |
UXD_SURFACE_ARGUMENT | @ds-surface is not written as @ds-surface(role [tone] [size] [radius(k)] [shadow(k)]). | Put the parentheses directly after the name, separate arguments with spaces, the role first, each override once. |
UXD_SYNTAX_REMOVED example | A spelling the language removed: rounded(), elevation(), densities() or radius(full). | Write radius(k), shadow(k), density(k) or radius(pill); the message names the replacement. |
UXD_THEME_BLOCK_REMOVED example | A `@theme { … }` block: in-stylesheet token packs were removed. | Define the tokens in the theme JSON under densities, radii, borders, shadows, surfaces, buttons or inputs. |
UXD_THEME_MARKER | `@uxdsl theme;` is misspelled, written twice, or written inside a rule or an at-rule. | Write `@uxdsl theme;` once, as a top-level statement of the one global stylesheet that should carry the theme. |
UXD_TOKEN_ALPHA example | The alpha of palette() or color() is not a number between 0 and 1. | Write palette(primary, 0.5) with an alpha from 0 to 1. |
UXD_TOKEN_KEY example | A token function's key is quoted, contains a dot where none is allowed, or is not a bare word. | Write the key as a bare word: space(1), density(section). |
UXD_TYPO_ARGUMENT | @ds-typo is not written as @ds-typo(role). | Write exactly one bare role inside parentheses directly after the name. |
UXD_TYPO_REFERENCE example | @ds-typo names a typography role the theme does not define. | Use a defined role; the message lists them. |
| Code | Meaning | Fix |
|---|---|---|
UXD_BP_INVALID example | The breakpoint map is invalid: no zero-width base, a negative or non-finite width, or two breakpoints with the same width. | Give `breakpoints` one entry at 0 and distinct non-negative pixel widths. |
UXD_BUTTON_BASE | A responsive Button token has no value at the base breakpoint. | Add the base breakpoint's group, e.g. xs(…), so every width has a value. |
UXD_BUTTON_FIELD | A Button field is not one of the supported fields, or a role key is not surface, base or states. | Use the documented fields and the three role keys. |
UXD_BUTTON_FIELDS | A Button base or state is not an object of fields. | Write base and each state as { "field": "value" }. |
UXD_BUTTON_MAP | `buttons` is not an object of Button tokens. | Write `buttons` as { "key": "value" }. |
UXD_BUTTON_NAME_COLLISION | Two different Button keys compile to the same CSS custom property name. | Rename one of the two keys. |
UXD_BUTTON_ROLE | A Button role is not lowercase-with-hyphens, is not an object, or @ds-button names a role the theme does not define. | Name the role ^[a-z][a-z0-9-]*$ in `buttons`, and use a defined role in @ds-button. |
UXD_BUTTON_STATE | A Button state is not one of the supported states. | Use the documented state names (e.g. hover, focusvisible, disabled). |
UXD_BUTTON_STATES | A Button role's states is not an object. | Write states as { "hover": { … } }. |
UXD_BUTTON_SURFACE | A Button role names a Surface that does not exist. | Name a defined Surface role in `surface`. |
UXD_BUTTON_TONE | The tone named by @ds-button, or a tone() variant in a Button value, is not valid. | Name a Palette family with main, dark and contrast, and write tone(main|dark|contrast). |
UXD_BUTTON_VALUE | A Button token's value is empty, not a string, has unclosed parentheses or names a breakpoint the theme does not have. | Give the token a nonempty CSS value or responsive expression over the theme's breakpoints. |
UXD_BUTTON_VIEWPORT | inspect*Theme was given a width that is not a non-negative number. | Pass a viewport width in pixels, 0 or more. |
UXD_DENSITY_BASE | A Density token has no value at the base breakpoint. | Add the base group, e.g. xs(space(1)). |
UXD_DENSITY_KEY | A Density key is not a plain identifier. | Use letters, digits, hyphens and underscores. |
UXD_DENSITY_MAP | `densities` is not an object. | Write `densities` as { "key": "xs(space(1)) md(space(2))" }. |
UXD_DENSITY_VALUE | A Density token's value is empty, not a string or contains `;`/`{`/`}`. | Give the token a nonempty responsive expression over Spacing. |
UXD_EDGE_BASE | A responsive Border/Radius token has no value at the base breakpoint. | Add the base breakpoint's group, e.g. xs(…), so every width has a value. |
UXD_EDGE_MAP | `borders / radii` is not an object of Border/Radius tokens. | Write `borders / radii` as { "key": "value" }. |
UXD_EDGE_NAME_COLLISION | Two different Border/Radius keys compile to the same CSS custom property name. | Rename one of the two keys. |
UXD_EDGE_VALUE | A Border/Radius token's value is empty, not a string, has unclosed parentheses or names a breakpoint the theme does not have. | Give the token a nonempty CSS value or responsive expression over the theme's breakpoints. |
UXD_EDGE_VIEWPORT | inspect*Theme was given a width that is not a non-negative number. | Pass a viewport width in pixels, 0 or more. |
UXD_FOUNDATION_NAME_COLLISION | Two Palette, Color or Spacing entries compile to the same CSS custom property name. | Rename one of the two entries. |
UXD_INPUT_BASE | A responsive Input token has no value at the base breakpoint. | Add the base breakpoint's group, e.g. xs(…), so every width has a value. |
UXD_INPUT_FIELD | A Input field is not one of the supported fields, or a role key is not surface, base or states. | Use the documented fields and the three role keys. |
UXD_INPUT_FIELDS | A Input base or state is not an object of fields. | Write base and each state as { "field": "value" }. |
UXD_INPUT_MAP | `inputs` is not an object of Input tokens. | Write `inputs` as { "key": "value" }. |
UXD_INPUT_NAME_COLLISION | Two different Input keys compile to the same CSS custom property name. | Rename one of the two keys. |
UXD_INPUT_ROLE | A Input role is not lowercase-with-hyphens, is not an object, or @ds-input names a role the theme does not define. | Name the role ^[a-z][a-z0-9-]*$ in `inputs`, and use a defined role in @ds-input. |
UXD_INPUT_STATE | A Input state is not one of the supported states. | Use the documented state names (e.g. hover, focusvisible, disabled). |
UXD_INPUT_STATES | A Input role's states is not an object. | Write states as { "hover": { … } }. |
UXD_INPUT_SURFACE | A Input role names a Surface that does not exist. | Name a defined Surface role in `surface`. |
UXD_INPUT_TONE | The tone named by @ds-input, or a tone() variant in a Input value, is not valid. | Name a Palette family with main, dark and contrast, and write tone(main|dark|contrast). |
UXD_INPUT_VALUE | A Input token's value is empty, not a string, has unclosed parentheses or names a breakpoint the theme does not have. | Give the token a nonempty CSS value or responsive expression over the theme's breakpoints. |
UXD_INPUT_VIEWPORT | inspect*Theme was given a width that is not a non-negative number. | Pass a viewport width in pixels, 0 or more. |
UXD_SHADOW_BASE | A responsive Shadow token has no value at the base breakpoint. | Add the base breakpoint's group, e.g. xs(…), so every width has a value. |
UXD_SHADOW_MAP | `shadows` is not an object of Shadow tokens. | Write `shadows` as { "key": "value" }. |
UXD_SHADOW_NAME_COLLISION | Two different Shadow keys compile to the same CSS custom property name. | Rename one of the two keys. |
UXD_SHADOW_VALUE | A Shadow token's value is empty, not a string, has unclosed parentheses or names a breakpoint the theme does not have. | Give the token a nonempty CSS value or responsive expression over the theme's breakpoints. |
UXD_SHADOW_VIEWPORT | inspect*Theme was given a width that is not a non-negative number. | Pass a viewport width in pixels, 0 or more. |
UXD_SPACING_KEY | A `spacing` key uses the removed `space-` prefix. | Write the bare key: "1" instead of "space-1"; it is referenced as space(1). |
UXD_SURFACE_BASE | A responsive Surface token has no value at the base breakpoint. | Add the base breakpoint's group, e.g. xs(…), so every width has a value. |
UXD_SURFACE_FIELD | A Surface field is not one of padding, radius, bg, color, border, shadow. | Use one of the six fields. |
UXD_SURFACE_MAP | `surfaces` is not an object of Surface tokens. | Write `surfaces` as { "key": "value" }. |
UXD_SURFACE_NAME_COLLISION | Two different Surface keys compile to the same CSS custom property name. | Rename one of the two keys. |
UXD_SURFACE_REFERENCE example | @ds-surface or a Surface value names a role, radius, border or shadow that does not exist. | Use a defined role or token; the message lists what exists. |
UXD_SURFACE_ROLE | A Surface role name is not lowercase-with-hyphens or its value is not an object. | Name the role ^[a-z][a-z0-9-]*$ and give it an object of fields. |
UXD_SURFACE_SIZE | A directive's numeric size names a key that Density or Radius does not define. | Use a size both `densities` and `radii` define, or omit it. |
UXD_SURFACE_TONE example | The tone named by @ds-surface is not a Palette family with main, dark and contrast. | Name a tone family (the message lists them), or omit the tone. |
UXD_SURFACE_VALUE | A Surface token's value is empty, not a string, has unclosed parentheses or names a breakpoint the theme does not have. | Give the token a nonempty CSS value or responsive expression over the theme's breakpoints. |
UXD_SURFACE_VIEWPORT | inspect*Theme was given a width that is not a non-negative number. | Pass a viewport width in pixels, 0 or more. |
UXD_THEME_FAMILY | A top-level theme key is not a family the compiler reads (a warning: nothing compiles it). | Check the spelling against KNOWN_THEME_FAMILIES, or remove the key. |
UXD_THEME_INVALID | A theme leaf or key is structurally wrong: a value that is not a nonempty string, a closed key, a name outside ^[a-z][a-z0-9-]*$, a `;`/`{`/`}` or unbalanced parentheses in a value, or the removed flat `typography` family. | Fix the value at the key path the message names; strings only, lowercase names, text roles under `typography_details`. |
UXD_TONE_CONTEXT | tone() appears outside a Button or Input theme value. | Use tone(main|dark|contrast) only in `buttons`/`inputs` values; in a stylesheet name the tone through @ds-button(role tone). |
UXD_TYPO_BASE | A responsive typography field has no value at the base breakpoint. | Add the base group, e.g. xs(space(7)). |
UXD_TYPO_DETAILS | `typography_details` is not an object of roles. | Write `typography_details` as { "role": { "fontSize": "…" } }. |
UXD_TYPO_FIELD example | A typography field is not one of fontFamily, fontSize, lineHeight, fontWeight, letterSpacing, textTransform, textDecoration, fontStyle, marginBlockStart, marginBlockEnd, or its value is empty. | Use one of the ten fields with a nonempty string value. |
UXD_TYPO_ROLE | A typography role name is not lowercase-with-hyphens or its value is not an object. | Name the role ^[a-z][a-z0-9-]*$ and give it an object of fields. |
UXD_VALUE | A responsive expression is empty, unclosed, or uses a function that is neither a breakpoint nor a known CSS function. | Write `xs(…) md(…)` over the theme's breakpoint names around CSS values. |
| Code | Meaning | Fix |
|---|---|---|
UXD_THEME_ENVIRONMENT | applyTheme, loadPersistedTheme or resetTheme was called where there is no document. | Call them in the browser; use generateThemeCss on the server. |
UXD_THEME_NOT_INITIALIZED | loadPersistedTheme or resetTheme ran before the project theme was applied once. | Call applyTheme(projectOverride, { replace: true }) first. |
UXD_THEME_PERSIST | Browser storage could not be read, written or cleared. | Check storage availability; the theme was still applied. |
UXD_THEME_STRUCTURE | The patch changes what the compiler would emit (a field, state, surface or breakpoint), which custom properties cannot express. | Change the theme file and rebuild; apply values, not structure, at run time. |
UXD_THEME_STYLE_ELEMENT | The element with the requested id is not a <style>. | Use an id that is free or belongs to a <style> element. |
UXD_THEME_STYLE_ID | A second styleId was given after the runtime was initialized with another. | Keep one styleId per document. |
| Code | Meaning | Fix |
|---|---|---|
UXD_FUNCTION_SHADOWED example | A Sass @function is named like a UXDSL function — a token function, tone() or a breakpoint of the effective theme — so where Sass calls that bare name the author's function runs and UXDSL's is not available (a warning, located at the declaration; the author's SCSS wins). | Rename the function to use the UXDSL token; a function reached only through a namespace (helpers.space()) shadows nothing, and a @mixin never conflicts. |
UXD_SASS example | Dart Sass could not compile the stylesheet: a syntax error, an @error, an undefined variable or mixin, a stylesheet it cannot find or that is ambiguous, a loop of @use or @import, or text that is not valid UTF-8; the message is Sass's own, at the author's file, line and column. | Read Sass's message and the code frame below the location, and fix the source there. |
UXD_SASS_WARNING example | Dart Sass warned: a deprecation, with its id in brackets, an @warn, or Sass's notice about an id in the sass option's silenceDeprecations (an unknown, obsolete or user-authored one); Sass reports five warnings per deprecation type and then a summary, and the summary and the notices carry no location. | Follow Sass's suggestion, or silence that deprecation type with the sass option's silenceDeprecations (quietDeps for dependencies). |
Each source below was compiled by uxdsl build, and what is under it is what the build printed: an error, with a failing exit, or for UXD_FUNCTION_SHADOWED a warning, with exit 0. scripts/capture-capabilities.js records them and fails when a case stops producing its code or its exit, so this page cannot show a diagnostic the compiler no longer reports. UXD_THEME_NOT_INITIALIZED and UXD_THEME_STRUCTURE are produced live by the sandbox on Runtime.
UXD_BREAKPOINT_UNKNOWN — A breakpoint the theme does not configuresrc/example.uxdsl
.hero {
padding: xs(1rem) xxl(2rem);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_BREAKPOINT_UNKNOWN: xxl(...) is not a configured breakpoint or a known CSS function; configured breakpoints: xs, sm, md, lg, xl.
1 | .hero {
> 2 | padding: xs(1rem) xxl(2rem);
| ^
3 | }
4 |UXD_SHADOW_REFERENCE — A shadow preset that does not existsrc/example.uxdsl
.card {
box-shadow: shadow(9);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_SHADOW_REFERENCE: shadow(9) does not exist; available keys: 0–5. Did you mean "5"?
1 | .card {
> 2 | box-shadow: shadow(9);
| ^
3 | }
4 |UXD_EDGE_REFERENCE — A radius preset that does not existsrc/example.uxdsl
.card {
border-radius: radius(12);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_EDGE_REFERENCE: radius(12) does not exist; available keys: 0–5, circle, pill. Did you mean "5"?
1 | .card {
> 2 | border-radius: radius(12);
| ^
3 | }
4 |UXD_TOKEN_KEY — A fractional Density reference (a key is a reference, never a number to scale)src/example.uxdsl
.card {
padding: density(2.5);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_TOKEN_KEY: density(2.5) is not a token key: density(k). A key is a reference the theme defines, never a number to scale.
1 | .card {
> 2 | padding: density(2.5);
| ^
3 | }
4 |UXD_TYPO_REFERENCE — A typography role the theme does not definesrc/example.uxdsl
.title {
@ds-typo(hero);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_TYPO_REFERENCE: ds-typo(hero) does not exist; available keys: body, body-sm, caption, code, default, h1, h2, h3, h4, h5, h6, p, pre, small, span, subtitle2, tag.
1 | .title {
> 2 | @ds-typo(hero);
| ^
3 | }
4 |UXD_SURFACE_REFERENCE — A Surface role that does not existsrc/example.uxdsl
.panel {
@ds-surface(glass);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_SURFACE_REFERENCE: Undefined surface role "glass"; roles: contained, flat, outlined.
1 | .panel {
> 2 | @ds-surface(glass);
| ^
3 | }
4 |UXD_DIRECTIVE_CONTEXT — A directive outside the rule it stylessrc/example.uxdsl
@media (min-width: 768px) {
@ds-surface(contained);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_DIRECTIVE_CONTEXT: Directives apply to a whole rule and are not responsive; use responsive values on the properties instead, e.g. padding: xs(…) md(…).
1 | @media (min-width: 768px) {
> 2 | @ds-surface(contained);
| ^
3 | }
4 |UXD_DIRECTIVE_UNKNOWN — A directive UXDSL does not havesrc/example.uxdsl
.card {
@ds-card(contained);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_DIRECTIVE_UNKNOWN: Unknown directive @ds-card.
1 | .card {
> 2 | @ds-card(contained);
| ^
3 | }
4 |UXD_TOKEN_ALPHA — An alpha outside 0–1src/example.uxdsl
.overlay {
background: palette(primary.main, 2);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_TOKEN_ALPHA: palette(primary.main, 2): expected an alpha between 0 and 1, got "2".
1 | .overlay {
> 2 | background: palette(primary.main, 2);
| ^
3 | }
4 |UXD_BP_INVALID — A negative breakpoint in the theme (validated once, before any engine runs)uxdsl.theme.json
{
"breakpoints": {
"xs": 0,
"sm": 480,
"md": -1,
"lg": 1024,
"xl": 1280
}
}src/example.uxdsl
.a {
padding: space(3);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl.theme.json: UXD_BP_INVALID: Expected named, distinct non-negative widths and a zero-width base.UXD_TYPO_FIELD — A typography field the engine does not supportuxdsl.theme.json
{
"typography_details": {
"h1": {
"opacity": "0.8"
}
}
}src/example.uxdsl
.a {
padding: space(3);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl.theme.json: UXD_TYPO_FIELD: Invalid h1.opacity (at typography_details.h1.opacity).UXD_REFERENCE_MISSING — A theme value pointing at a token that does not existuxdsl.theme.json
{
"palette": {
"primary": {
"main": "var(--uxdsl__color__brand-500)"
}
}
}src/example.uxdsl
.a {
color: palette(primary.main);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: UXD_REFERENCE_MISSING: --uxdsl__color__brand-500 has no definition in the active theme/scope. Define it or declare its external provider. Referenced by 24 definitions: color (src/example.uxdsl:2:3), --uxdsl__palette__primary-main, --uxdsl__button__contained-focusvisible-outline, --uxdsl__button__contained-tone-primary-focusvisible-outline, --uxdsl__button__outlined-focusvisible-outline and 19 more.UXD_PALETTE_SYNTAX — The removed dashed spelling of a Palette entrysrc/example.uxdsl
.a {
color: palette(primary-main);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_PALETTE_SYNTAX: palette(primary-main) is not a dotted path; write palette(primary.main).
1 | .a {
> 2 | color: palette(primary-main);
| ^
3 | }
4 |UXD_PALETTE_REFERENCE — A Palette variant the family does not havesrc/example.uxdsl
.a {
color: palette(primary.mian);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_PALETTE_REFERENCE: palette(primary.mian) does not exist; primary has: main, light, dark, contrast. Did you mean "main"?
1 | .a {
> 2 | color: palette(primary.mian);
| ^
3 | }
4 |UXD_EDGE_ARGUMENT — A second argument on border()src/example.uxdsl
.card {
border: border(1, red, dashed);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_EDGE_ARGUMENT: border(1, red, dashed) takes exactly one argument: border(k); write border(1) and set border-color/border-style as declarations after it.
1 | .card {
> 2 | border: border(1, red, dashed);
| ^
3 | }
4 |UXD_SURFACE_TONE — A Palette family that is not a tonesrc/example.uxdsl
.card {
@ds-surface(contained text);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_SURFACE_TONE: "text" is not a tone; a tone is a Palette family with main, dark and contrast: dark, error, info, light, neutral, primary, secondary, success, surface, tertiary, warning.
1 | .card {
> 2 | @ds-surface(contained text);
| ^
3 | }
4 |UXD_DIRECTIVE_DUPLICATE — Two control directives in one rulesrc/example.uxdsl
.cta {
@ds-button(contained);
@ds-button(outlined);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:3:3: UXD_DIRECTIVE_DUPLICATE: @ds-button(outlined) repeats @ds-button(contained) in the same rule; a rule takes one @ds-button or @ds-input. Choose one role, or split the selectors into two rules.
1 | .cta {
2 | @ds-button(contained);
> 3 | @ds-button(outlined);
| ^
4 | }
5 |UXD_SYNTAX_REMOVED — A spelling the language no longer has (the former elevation() alias)src/example.uxdsl
.card {
box-shadow: elevation(2);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_SYNTAX_REMOVED: elevation() was removed; use shadow(2).
1 | .card {
> 2 | box-shadow: elevation(2);
| ^
3 | }
4 |UXD_FUNCTION_UNKNOWN — A near-miss of a UXDSL function (the spacing function is space())src/example.uxdsl
.card {
padding: spacing(2);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:2:3: UXD_FUNCTION_UNKNOWN: spacing() is not a function CSS or UXDSL knows; did you mean space()?
1 | .card {
> 2 | padding: spacing(2);
| ^
3 | }
4 |UXD_THEME_BLOCK_REMOVED — A @theme block: tokens are defined in the theme JSONsrc/example.uxdsl
@theme {
radius-2: 12px;
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:1:1: UXD_THEME_BLOCK_REMOVED: @theme blocks were removed; define these tokens in the theme JSON (uxdsl.theme.json): density-<k> under "densities", radius-<k> under "radii", border-<k> under "borders", shadow-<k> under "shadows", and surface-/button-/input-<role> packs under "surfaces", "buttons" and "inputs".
> 1 | @theme {
| ^
2 | radius-2: 12px;
3 | }UXD_SASS — A Sass error: an undefined variablesrc/example.uxdsl
.card {
padding: $gap;
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: src/example.uxdsl:2:12: UXD_SASS: Undefined variable.
╷
2 │ padding: $gap;
│ ^^^^
╵
src/example.uxdsl 2:12 root stylesheetUXD_SASS_CONTEXT — A $variable Sass keeps literally in a custom property (write #{$gap})src/example.uxdsl
$gap: 4px;
.card {
--gap: $gap;
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Error: uxdsl: src/example.uxdsl:3:3: UXD_SASS_CONTEXT: Sass keeps $gap literally in the custom property --gap; write #{$gap} (in a .uxdsl file compiled by uxdsl build, compile() or an adapter).
1 | $gap: 4px;
2 | .card {
> 3 | --gap: $gap;
| ^
4 | }
5 |UXD_FUNCTION_SHADOWED — A project @function named like a UXDSL function: the author's SCSS wins, with one warningsrc/example.uxdsl
@function space($n) {
@return $n * 4px;
}
.card {
padding: space(2);
}$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Warning: src/example.uxdsl:1:11: UXD_FUNCTION_SHADOWED: @function space (src/example.uxdsl:1) replaces UXDSL's space() in this build; rename it to use the tokenUXD_SASS_WARNING — A Dart Sass deprecation: @import of a partial (write @use; the build still succeeds)src/example.uxdsl
@import './card';$ uxdsl build --entry src/example.uxdsl --out dist/example.css
[uxdsl] Warning: src/example.uxdsl:1:9: UXD_SASS_WARNING: [import] Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.