Style, Theme and Stylesheet Files¶
Note
Three files control how things look. A style file holds the values for one surface or module, like its inline Style: key. A stylesheet holds shared rules that apply across the shell by widget type or class. A theme holds design tokens (colour, type, shape, motion) that the others refer to. The split is the maintainer's (ADR-0007 Shell UI Layer > Theme, style and stylesheet (2026-10-25)). The Style format below comes from the maintainer's Label example; Theme and Stylesheet are proposed in Style Schema.
All three are shell files: each starts with a metadata block (TDL: and a required Name:, TDL Language > The Metadata Block) and holds one root block: Style { }, Theme { } or Stylesheet { } (TDL Language > The Root Block). Their suffixes are _Style.tdl, _Theme.tdl and _Stylesheet.tdl, the same suffixes as Tesserae's, with the extension .tdl (ADR-0014 Shell File Language). The root block is authoritative; a mismatch with the suffix is a load error naming both.
Style File¶
---
TDL: 0.2
Name: Label_Style
---
Style {
Classes {
text_style {
Kind: Text # the type the class applies to; see Classes below
Font_Size: 16
Font_Weight: 500
Foreground: "#ffffff"
}
}
Icon {
Foreground: "#ffffff"
Fill: "#00000000"
}
FlexBox {
Background: "#000000"
Border_Width: 2
Border_Color: "#ffffff"
Corner_Radius: 8
}
Text {
Font_Family: ["Hack Nerd Font Mono", "JetBrains Mono"]
}
}
| Key | Meaning | Status |
|---|---|---|
Classes |
Named groups of values a widget picks up with Class: |
Decided (the form) |
A widget name as a block (Icon { }, FlexBox { }, Text { }) |
Defaults for every widget of that type in the file that uses this style | Decided (the form) |
| Property names | Font_Size, Font_Weight, Foreground, Fill, Background, Border, Border_Width, Border_Color, Corner_Radius, Font_Family |
From the example; the full list is open |
- Colour forms: the quoted hex
"#RRGGBB"and"#RRGGBBAA", andrgba(r g b a)with spaces, red, green and blue 0 to 255 and alpha 0.0 to 1.0 (ADR-0014 Shell File Language > What TDL Is (Decided); the list in Common Keys and Conventions > Value forms uses the same spelling). - Four-sided values: a number, a list of four in the order left, top, right, bottom (D50), or a block of named sides such as
Margin { Top: 8, Left: 24 }(D7, ADR-0014 Shell File Language > Decisions on the Open Items (2026-10-30)).Paddingis transparent space inside an element that hasChildren;Marginis transparent space around the element (Style Schema > Style Keys). The example's{2, 2, 2, 2}becomes2or[2, 2, 2, 2];Corner_Radius: {8, 8, 8, 8}becomes8or[8, 8, 8, 8](top-left, top-right, bottom-right, bottom-left, clockwise from top-left). - Lists:
Font_Family: ["Hack Nerd Font Mono", "JetBrains Mono"], an ordered fallback list (the example's braces become square brackets). - The same values may be written inline under
Style:in a module or surface. Borderis always a block,Border { Width: 2, Color: "#ffffff" }; the flatBorder_Width: 2andBorder_Color: "#ffffff"write the same two values. There is noBorder: trueorBorder: false. A border takes layout space (Style Schema > Style Keys).
Classes¶
- A widget picks a class with
Class: text_style. Kind: Textinside a class names the type it applies to. This is the one meaning ofKind:, a reference to a type by its exact name (TDL Language > Names and the Registry, ADR-0014 Shell File Language > Layout Rules item 11). The earlier recommendationblock: Textis gone, because there is noBlock:key.- A class is a block named by the user inside
Classes { }, andKind: Textnames the type it applies to (D19, ADR-0014 Shell File Language > Decisions on the Open Items (2026-10-30)). The user's class name is not a registered type; it is a name, asName:values are. - A class applies to the type its
Kind:names.
Theme File (Not yet Designed)¶
A theme holds design tokens: colour roles, type scale, shape (radii), motion (durations, easing), spacing. Styles and stylesheets refer to tokens by name instead of repeating values, which is how light and dark, high contrast and reduced motion are followed from the desktop (Goals and Non-Goals G7). The token set and file shape belong to 50 Design System/; this reference records only the file's metadata block and root block (Theme { }).
---
TDL: 0.2
Name: Dark
---
Theme {
# token groups: colour, type, shape, motion, spacing -- not designed
}
Name: is required in the metadata, as in every file (D39); unknown metadata is kept (D19, ADR-0014 Shell File Language > Decisions on the Open Items (2026-10-30)). Style Schema > Theme Tokens shows the proposed token shape.
Stylesheet File (Not yet Designed)¶
Note
Default (decided 2026-11-21)
A shell that names no stylesheet gets the shipped Default one; Appearance.Stylesheets: [] turns it off (ADR-0022 Default Stylesheet).
A stylesheet holds shared rules that apply across the shell by widget type or class, so a shell author can restyle every Text or every .warning in one place. A rule is a Rule { Selector: ".warning", ... } block inside the root Stylesheet { }, repeated as needed, and the selector is a quoted string (D5, ADR-0014 Shell File Language > Decisions on the Open Items (2026-10-30); the forms are in Style Schema > Stylesheet Selectors).
---
TDL: 0.2
Name: Base_Stylesheet
---
Stylesheet {
# Rule blocks (Selector plus style values) -- see Style Schema
}
Note
As built at M2b (reported by tess-shell, 2026-11-04)
A module names its style with Style: <Name>_Style.tdl (relative to the module file) or an inline Style { } in Module { }; a block's own Style: file is not-built. A style file may hold Classes { name { Kind: Text, ... } } and per-type defaults; Class: on a block takes one name or a list. Priority, lowest to highest: the file's type default, its classes, the block's inline Style, then keys written on the block. A missing class, a class of another block type, or a missing or bad style file is an error at its own file and line. No theme or stylesheet yet (M3). Details in M2 Build Log.
Rules¶
Decided by the maintainer on 2026-10-26 (ADR-0007 Shell UI Layer > Blocks, modules and styling (2026-10-26)).
- Styling applies to building blocks and to everything else that can be styled (surfaces, modules). The forms are
<Name>_Theme.tdl,<Name>_Stylesheet.tdl,<Name>_Style.tdland inlineStyle:. - Customising a block is referencing another stylesheet or style, or writing inline
Style:. A custom style is not a full replacement; it changes only what it names. - Priority, lowest to highest: theme, then stylesheet, then style, then inline
Style:. It applies to all styling. - Imports go downwards:
| File | May import | May not import |
|---|---|---|
| Theme | Stylesheets, styles; or use inline styling | n/a |
| Stylesheet | Styles; or use inline styling | A theme |
| Style | Nothing beneath it; inline values only | A theme or a stylesheet (proposed, to avoid cycles) |
Inline Style: |
A theme, a stylesheet, a style; or inline values | n/a |
- Priority follows the type of each file, not the path it was imported by. A stylesheet that a theme imports still outranks the theme.
Proposed (to confirm): when two files of the same type set the same property, the later import wins; a style cannot import anything; an import cycle is a load error naming the chain (Common Keys and Conventions > Errors).
The maintainer's Edge Shell notes ordered it Theme, Frame, Panel, Widget with a widget's own property winning (Shadows on Layer Surfaces > The maintainer's earlier work, Shell_Specs); the new rule is the same idea over the file types.
Errors Specific to These Files¶
- A property name the widget does not have: error with the closest names.
- A value of the wrong form (a colour that is not one of the three): error with the forms.
- A class used and not defined: error naming the file searched.
- A token that does not exist in any theme: error with the nearest names.
- A partial theme is allowed (maintainer, 2026-11-05, D42): any token the chosen theme does not define falls back to the
Defaulttheme's value, token by token. An error is raised only when neither theme defines the token.
Open¶
- The full property list per widget, and which belong in style and which on the widget.
- The class key:
Kind: Textinside the class, the one meaning ofKind:(ADR-0014 Shell File Language > Layout Rules item 11). - The theme token set and file shape: proposed in Style Schema > Theme Tokens; the values belong to 50 Design System (not started).
- The stylesheet rule shape:
Rule { Selector: "...", ... }blocks, the selector a quoted string (D5; Style Schema > Stylesheet Selectors). - The precedence order: theme, stylesheet, style, inline (decided).
- Whether a style file may extend another.
- Light/dark and high-contrast switching: in the theme, or in several theme files.