Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub

Theming & 4-Tier Styling Contract

Methane styles never fight Shadow DOM. Every component exposes four explicit, SemVer-governed customization tiers:

TierMechanismContract
1. Design Tokens--mth-* custom propertiesCompiled from W3C DTCG JSON using light-dark() and relative oklch(). Covered by SemVer.
2. Parts & States::part(), exportparts, :state()Stable semantic parts (base, control, label, popup) and CustomStateSet. Covered by SemVer.
3. Sheet Escape HatchregisterStyles(tagOrGlobal, css)Appends Constructable CSSStyleSheet into @layer override via @methane-ui/runtime. Unparted internal selectors are SemVer-exempt.
4. Unstyled / PrimitivesMinimal structural sheet + @methane-ui/primitivesSwap the default theme or attach behavioral controllers to custom elements directly.

Logical Properties & Density

100% of Methane stylesheets enforce CSS Logical Properties (padding-inline,inset-block-start, border-inline-start) via@methane-ui/lint-plugin and scale spacing automatically with[data-mth-density='compact' | 'default' | 'comfortable'].

Try customizing live OKLCH seeds and density in theInteractive OKLCH Theme Builder.