tilescript uses a tilescript-specific CSS subset for layout selection and layout geometry.
The language source of truth lives in crates/css (tilescript-css).
Unsupported selectors and properties fail clearly. They are not silently ignored.
tilescript-css owns:
- supported selector metadata
- supported property metadata
- parsing and compilation
- structured analysis and diagnostics
tilescript-scene consumes compiled stylesheet data for layout matching and geometry.
tilescript compositor adapters consume the resulting resolved layout tree.
- A selected config or layout app provides CSS.
tilescript-cssparses and compiles the stylesheet.tilescript-sceneand related runtime code match selectors against the resolved layout tree.- Layout properties determine geometry.
- The compositor adapter consumes the resulting layout output.
Supported selector targets:
workspacegroupwindow
Invalid selector targets:
slot
slot is not a valid CSS selector target and produces an error.
Supported selectors:
workspacegroupwindow#id.class- exact-match window metadata selectors, including:
window[app_id="..."]window[title="..."]window[class="..."]window[instance="..."]window[role="..."]window[shell="..."]window[window_type="..."]
Supported pseudo-classes:
:focused:floating:fullscreen:urgent:closing:enter-from-left:enter-from-right:exit-to-left:exit-to-right
Notes:
- runtime window state class aliases like
.focused,.floating,.fullscreen, and.urgentare still supported as runtime state classes - selector matching is structural and metadata-based
- CSS nesting is supported for nested style rules inside a qualified rule block
- nesting uses the same Tilescript selector front-end, including Tilescript-specific pseudo-classes
- nested selectors currently serialize canonically through the
selectorscrate, so flattened internal forms may include:is(...)
The canonical supported property list lives in crates/css/src/language.rs.
The groups below summarize the supported surface.
displaybox-sizingaspect-ratiopositioninsettoprightbottomleftoverflowoverflow-xoverflow-ywidthinline-sizeheightblock-sizemin-widthmin-inline-sizemin-heightmin-block-sizemax-widthmax-inline-sizemax-heightmax-block-size
flex-directionflex-wrapflex-flowflexflex-growflex-shrinkflex-basisalign-itemsplace-itemsalign-selfplace-selfjustify-itemsjustify-selfalign-contentplace-contentjustify-contentgaprow-gapcolumn-gap
grid-template-rowsgrid-template-columnsgrid-auto-rowsgrid-auto-columnsgrid-auto-flowgrid-templategrid-template-areasgridgrid-areagrid-rowgrid-columngrid-row-startgrid-row-endgrid-column-startgrid-column-end
Named grid lines, named spans, and repeat(...) are supported.
paddingpadding-inlinepadding-inline-startpadding-inline-endpadding-blockpadding-block-startpadding-block-endpadding-toppadding-rightpadding-bottompadding-leftmarginmargin-inlinemargin-inline-startmargin-inline-endmargin-blockmargin-block-startmargin-block-endmargin-topmargin-rightmargin-bottommargin-left
tilescript-css exposes structured analysis for project CSS.
That includes:
- structured diagnostics with ranges
- rule symbols
Current analysis diagnostics include:
- invalid syntax
- unsupported selectors
- unsupported properties
- unsupported values
- inapplicable properties
- unsupported selector attribute keys
workspace {
display: grid;
grid-template-columns: 2fr 1fr;
gap: 12px;
padding: 12px;
}
#main {
min-width: 0;
}
.stack {
display: flex;
flex-direction: column;
gap: 12px;
}
window {
min-width: 0;
overflow: hidden;
> .focused {
display: grid;
}
}If the CSS surface grows later, it should grow with more layout primitives such as additional grid, sizing, spacing, alignment, overflow, and placement controls rather than presentation styling.
Reference checked against taffy 0.9.2 from Cargo.lock, specifically the public taffy::style::Style fields and taffy::style::grid types.
| Property | Why we want it | Taffy 0.9.2 backing | Notes |
|---|---|---|---|
subgrid |
modern nested grid composition | no public Style support in taffy 0.9.2 |
not currently feasible without engine work or a Taffy upgrade that exposes it |
Priority order for future layout-only expansion:
subgridonly if the engine story becomes real
For editor and project-aware behavior, see docs/css-lsp.md.