Repository layout
text
skin.json skin registration, ResourceLoader, hooks
includes/
SkinChroma.php extends SkinMustache; injects site name/logo/search/edit data
Hooks.php Preferences fields, body data-* attributes
templates/skin.mustache body-only Mustache template
resources/
styles/tokens.css generated MD3 tokens (light/dark/auto)
styles/tokens-presets.css
styles/base.css layout and components
styles/extensions.css extension / special-page overrides
styles/codex-bridge.css
scripts/chroma.js drawer, theme, layout, reading mode, scroll-spy, snackbar
i18n/ en / qqq / zh-hans / zh-hant
tools/ token and preset generatorsRendering flow
- MediaWiki calls
SkinChroma::getTemplateData(); SkinChromaaddssitename,link-search,has-logo,is-editableandlink-edit;templates/skin.mustacheoutputs body content only;<head>belongs to MediaWiki core;Hooks::onOutputPageBodyAttributes()writes user preferences asdata-chroma-*;resources/scripts/chroma.jsonly provides progressive enhancement.
Do not
- output
<html>,<head>or<body>from the template; - put modules with
dependenciesin the skinstylesoption (ClientHtml drops them); - hard-code colors instead of
--md-sys-*; - merge
requires/menusacross branches.