flex-direction: xs(column) md(row);rowfrom md()gap: xs(space(2)) md(space(4));space(4)from md()width: xs(100%) lg(50%) xl(33%);100%from xs()The thresholds above are the active theme's breakpoints. They are compiled into every component's media queries, so applyTheme({ breakpoints: { md: 900 } }) is refused with UXD_THEME_STRUCTURE: to move one, change the theme file and rebuild.
Resize the browser to see the active token change; move the slider to inspect any width without resizing.
Theme uxdsl.theme.json, merged over the base theme
{
"breakpoints": {
"xs": 0,
"sm": 480,
"md": 800,
"lg": 1024,
"xl": 1280
}
}UXDSL you write example.uxdsl
.layout {
display: flex;
flex-direction: xs(column) md(row);
gap: density(3);
}CSS you get compiled by uxdsl; :root shows only this token
:root { --uxdsl__density__3: var(--uxdsl__space__3); }
@media (min-width: 800px) { :root { --uxdsl__density__3: var(--uxdsl__space__4); } }
@media (min-width: 1280px) { :root { --uxdsl__density__3: var(--uxdsl__space__5); } }
.layout {
display: flex;
flex-direction: column;
gap: var(--uxdsl__density__3);
}
@media (min-width: 800px) { .layout { flex-direction: row; } }| Name | From |
|---|---|
xs() | 0px |
sm() | 480px |
md() | 768px |
lg() | 1024px |
xl() | 1280px |
breakpoints in the theme file. The base (xs) is 0; widths are distinct, non-negative numbers (UXD_BP_INVALID). A new name adds its function.min-width media queries; for a component that responds to its container, write native @container next to UXDSL.xs(column) md(row), lg and xl are still row. It steps; it does not interpolate.applyTheme refuses it with UXD_THEME_STRUCTURE. inspectResponsiveValue (uxdsl/language) tells an editor what a value resolves to at a width, without a document — that is what the demo above does..layout { display: flex; flex-direction: xs(column) md(row); gap: density(3); }
.sidebar { display: xs(none) lg(block); }The guide for coding agents is on For AI agents.