Skip to content

Theme cookbook and troubleshooting ​

Locate a theme problem in manifest admission, option validation, rule matching or resource loading. Change one layer at a time so the observed result identifies the cause.

Version scope: these source-level examples target v2.0.0.alpha.14. Use the Plugin SDK for current Wasm plugin authoring.

Accessible heading recipe ​

Goal: size 20–32, readable light/dark, keyboard-operable controls. Use Color/Range and finite title/focus styling; no Sidecar or page reconstruction is necessary.

Start with twilight, test size/fallback, then add:

css
Button.capsule:focus-visible { Border: #315b92; BorderWidth: 2; }
@when mode = dark {
  Button.capsule:focus-visible { Border: #b5d2ff; }
}

Verify Tab, touch, palette switching, and retained input. Do not mutate enabled/visible semantics merely to make controls more prominent.

User background and music ​

Use workshop File/Files/Directory options. Import with empty paths and disabled music, then grant through pickers. Verify Image authority cannot read Audio and revocation retires use.

The outcome is explicit user choice with bounded fallback and cleanup, not just successful playback on your workstation. Ship a packaged background, not private music paths, and include licenses/instructions.

Responsive cards ​

Use the grid recipe, testing two columns before remapping explicit placement for one column. If Host keys change, document compatibility or adjust selectors rather than guessing.

Virtual catalogs require registered Item metrics, not generic row Height overrides. Preserving logical identity and anchors is part of acceptance.

Diagnose by phase ​

SymptomPhaseChecks
Immediate import rejectionContainer/manifestmimetype, roots, duplicates/unknown fields, JSON types/defaults
Missing capabilityNegotiationExact name, actual provider, optional fallback
NSS rejectionCompilationSelectors, types, IDs, protected declarations including inactive branches
Existing file rejectedAuthority/resourceCanonical path, real package bytes, source/kind grant, links/budgets
Font wrapping mismatchNative measurementGlyphs/fallback/DPI/shared metrics
No effect, no errorMatching/cascadeKind/Key/Class, later rules, protected virtual geometry
Directory edits ignoredSource/watchDirectory versus installed snapshot, watcher enablement
Slider release failsValue/transactionLast valid step, revision, grants; retain draft and retry
Only some icons changeCarrierNative window/tray/Splash distinction, not installer metadata
Stale media after switchingLifetimeRecord source/generation and minimal reproduction; do not disable protection

Actionable report ​

Include launcher tag, theme version, OS/architecture, source kind, minimal manifest/styles, clean-start steps, expected/actual result, and failure phase. Remove private paths/media; use redistributable small resources.

Separate compilation, native execution, and installation evidence. Say “Linux tested” when only Linux was tested. Keep a minimal package without external paths for reproduction.

Implementation references ​

Check your result ​

Start with the unchanged example, introduce one failing rule, then restore it and confirm recovery.

Site documentation: CC BY-SA 4.0. Imported SDK documents: Apache-2.0 as marked.