Last updated: November 20, 2026
Quick Answer: use 4 layers for theme layers for brand, mode, and platform overrides: base, brand, mode, and platform. That order keeps one source of truth for the same UI, helps reduce collisions between brand and mode values, and makes it clearer which layer wins when two rules point to the same token. For the underlying cascade model, the W3C CSS Custom Properties specification is the best anchor, and the W3C Design Tokens Community Group provides the token vocabulary.
Key takeaways
- Brand, mode, and platform should not live in one flat token file.
- The layer on top wins, so the override order needs to be fixed before anyone starts naming tokens.
- Platform overrides should stay narrow, or they will swallow brand intent.
- A theme layer model is often more useful than a long list of token names when a team has more than one brand or more than one platform.
- The W3C CSS custom properties spec and the W3C Design Tokens work are the right places to anchor the mental model.
What is a theme layer model?
A theme layer model is a rule set for which token values apply first, which ones can override them, and which ones must never cross into another layer. In plain terms, it tells a team how to stack brand, mode, and platform values so the same component can render differently without creating duplicate token maps.
This matters once a product has at least 2 dimensions of variation. Brand may change color and type, mode may change contrast or surface values, and platform may need a 1-off spacing or shadow fix. If those values sit in one bucket, the next change creates collisions that are hard to trace.
The cleanest model is a hierarchy, not a grid. Base tokens hold raw values or semantic roles, brand tokens adapt those roles to a brand, mode tokens adapt them for light, dark, or other viewing states, and platform tokens make the last-mile adjustment for web, iOS, Android, or another target. The W3C CSS custom properties spec is a useful reference for the cascade idea, and the W3C Design Tokens Community Group work gives the vocabulary for token-driven systems. For implementation guidance, see also design token naming and theme architecture.
A generic article often skips the real question: which layer is allowed to override which other layer? That is the whole job here. If the answer is fuzzy, the system becomes a pile of exceptions, and the first hard case lands in a branch named override-final-final-2.
How should the layers be ordered?
The layers should be ordered from least specific to most specific: base, brand, mode, then platform when platform must win last. That order gives you a predictable override path and keeps the meaning of each layer stable.
The reason for this order is simple. Brand is a product identity choice, mode is a user-facing presentation choice, and platform is an implementation constraint. If platform comes before brand, a brand value can accidentally undo a platform fix. If mode comes before brand without a clear rule, dark mode can break the brand palette instead of adapting it.
Use this rule when deciding where a token lives:
| Layer | What belongs here | What should not belong here |
|---|---|---|
| Base | Neutral primitives and shared roles | Brand-specific color names |
| Brand | Logo-driven palette, brand type, identity values | Dark-mode-only surface changes |
| Mode | Light, dark, high-contrast, or similar presentation shifts | Platform workarounds |
| Platform | Web, iOS, Android, or other target-specific adjustments | Identity choices that should work everywhere |

A common mistake is to put every special case into platform because it feels safe. That works for a 1-off fix, then fails when the same fix is needed in a second brand. Platform overrides should stay as thin as possible, or the design system starts to behave like 3 separate systems pretending to be one. For a practical cross-platform reference, see Apple Human Interface Guidelines and Material Design color guidance.
Generally, a token should move down the stack only when the lower layer truly needs it. Brand should not copy mode, and mode should not copy platform. Each layer should change only the values it owns.
How do I map brand, mode, and platform overrides?
Map them by writing the same token path at each layer, then letting the last matching layer win. Start with one semantic token path, such as color.surface.primary, and assign values in each layer only where the layer truly differs. That keeps the token hierarchy readable and makes collision checks possible before implementation.
Here is the core procedure for structuring the layers:
- List the token groups that can vary by identity, presentation, or target platform, such as color, type, spacing, and elevation. Keep the list to the groups the system actually uses, not every possible design detail.
- Assign each group to one owner layer first. Brand owns identity, mode owns presentation, and platform owns target-specific fixes. That gives every token a default home before any override is written.
- Write the base token once, then add only the differences in the next layer. If a value is identical across 2 layers, keep it in the lower layer and do not repeat it.
- Check the override order with one component from each platform. A button or card is enough to expose whether the brand layer is being masked by mode or whether platform is overriding too much.
- Mark exceptions explicitly. If a platform token must beat a brand token, name that relationship in the model so the next editor does not assume the opposite.
This method works because it keeps the hierarchy visible. A reader opening the token files should be able to trace a value from base to final output in under 1 minute. If that path takes longer, the model is too flat or the names are too vague. For a related implementation pattern, see semantic tokens.
The most useful habit is often to treat each override as a decision, not as a patch, especially in teams that maintain shared design systems. A 1-line override can be correct, but if it has no reason attached to it, the next person will copy it into the wrong place and the stack loses meaning. The W3C design tokens format is a useful source for how teams describe and exchange those decisions.
Where do brand overrides belong?
Brand overrides belong in a layer that changes identity without rewriting the product’s behavior. That usually means brand colors, brand type choices, brand radii, or other values that define the visual tone of a theme while leaving interaction logic alone.
Brand is the layer that should change when the company wants the product to feel like a different line, region, or tenant. It is not the place for dark mode, and it is not the place for a platform workaround. If a brand value changes on one platform only, that is usually a sign the model is mixing concerns.
A useful test is this: can the same brand token be used across 2 modes and 2 platforms? If yes, it belongs in brand. If no, it may belong lower in the stack, or it may need to be split into a base token plus a smaller override.
The trade-off is clear. A stronger brand layer gives you a cleaner identity system, but it can also hide real platform needs if everything is forced into one layer. A weaker brand layer leaves more room for platform fixes, but it makes the theme feel inconsistent faster. The right choice depends on whether your biggest risk is brand drift or platform drift.
For a team working through design tokens and theming, this is the layer that should stay easiest to read. Brand values should be obvious at a glance, not buried under conditional logic that only 1 person remembers. See also brand tokens and theme branding.
When should mode overrides win?
Mode overrides should win when the user-facing state changes the same semantic token in a different way, such as a light and dark surface or a high-contrast text color. That is the point of a mode: it changes presentation while keeping the same component roles intact.
Mode should sit above brand when the visual state is more specific than the identity. For example, if a brand has one accent color in light mode and a different accessible treatment in dark mode, the mode layer should hold the dark mode value. The brand layer still defines the identity, but mode decides how that identity behaves in a different visual context. In practice, this is where accessibility guidance matters; the WCAG contrast guidance gives the numerical threshold many teams use for text contrast.
Do not use mode to solve a platform bug. A platform bug fix in a mode file creates a hidden coupling that is hard to spot later. If the issue only exists on web, put the fix in platform, not in dark mode or light mode.
A practical rule is to keep mode changes about appearance and contrast, not about device behavior. If the token change is there because of screen size, browser rendering, or native component limits, it is not a mode rule. It is a platform rule wearing the wrong label.
This is where teams can get bitten by copy-paste if they duplicate an entire mode file. A dark mode file that repeats 40 tokens may look complete, but repetition can hide the 3 values that really changed. The better pattern is to override only the tokens that need a new value and leave the rest to inherit.
What belongs in platform overrides?
Platform overrides belong in the last layer, and they should only fix differences that exist because of the target platform. That includes web-specific rendering, native spacing behavior, or a platform’s limited support for a token value.
Platform is the most dangerous layer if it grows without rules. It starts as a small fix, then becomes the place where brand and mode both end up because it feels convenient. Once that happens, the override stack is no longer about theme structure; it is just a list of exceptions.
Use platform overrides for 3 kinds of changes. First, when a platform renders the same design token differently and needs a correction. Second, when a token value is impossible or poor on that platform. Third, when a platform-specific component needs a token variant that has no effect elsewhere.
The cost of overusing platform overrides is debt. A value placed here is easy to forget when brand or mode changes later, and that can create mismatched UI across targets. The remedy is narrow scope: keep platform tokens small in number, specific in naming, and easy to audit.
A good platform override is boring. If it reads like a special case that only exists because of one browser, one OS, or one native toolkit, that is usually correct. If it reads like a second brand system, the layer is too broad. For platform examples, compare iOS design guidance with Material Design.
How do I stop collisions before implementation?
I stop collisions before implementation by making every layer answer a different question: who are you, what state are you in, and where are you running? That simple split keeps brand, mode, and platform from fighting over the same token name.
The easiest collision to prevent is a same-name token with different intent. For example, a token called color.primary can mean brand identity in one file and dark mode accent in another, which is a recipe for confusion. Semantic paths should stay stable, and the layer should carry the meaning of the override.
Use a short review checklist before anyone ships a new layer:
- Does this value belong to identity, presentation, or platform?
- If a second brand were added, would this value still make sense?
- If dark mode changed tomorrow, would this value need to move?
- If this platform disappeared, would the token still be useful?
A review like this can take about 5 minutes and may save hours of cleanup later. It is also the right place to catch naming drift before it becomes a migration job.
A simple stack is easier to explain to a new teammate, but it can feel strict when a product needs unusual combinations. A flexible stack handles more cases, but it only works when the override order is fixed and the layer names are respected. For related guardrails, see token governance.
For that reason, the theme layer model is not for every project. It is a good fit for teams that expect brand, mode, and platform to vary independently. It is a poor fit for a tiny app with one brand and one theme, where a full override stack would be more ceremony than value.
What is the rule for override order?
The rule for override order is that the most specific layer should win last, and that order should never change by file convenience. In practice, that means base first, then brand, then mode, then platform when platform-specific fixes need the final say.
This rule is the backbone of the theme layer model. If one team writes platform before mode and another writes mode before platform, the system stops being predictable. A predictable order matters more than a clever token name because it tells every contributor where to put the next value.
The best way to preserve the order is to document it in 1 sentence and keep it visible in the token structure, while also keeping the note short enough that people actually read it. If a value in the top layer conflicts with a lower layer, the top layer wins, but only because that is the chosen rule, not because someone guessed.
The honest drawback is that a strict order can feel rigid. It does not solve every special case, and it cannot turn a bad token structure into a good one. What it does give you is a map that other people can read without asking who wrote the last override.
FAQ
What is the difference between a theme and a mode?
A theme is the full set of visual decisions for a product variation, while a mode is one state inside that theme system. A brand theme may include light and dark modes, and each mode can change only the tokens it needs. In a layered model, theme is the broader structure and mode is one of its moving parts.
How should token overrides be layered?
Token overrides should be layered from base to brand to mode to platform, with the last matching layer winning. That order keeps identity separate from presentation and target-specific fixes. If a value can live in a lower layer, keep it there instead of copying it upward.
Should platform overrides come before brand overrides?
Platform overrides should usually come after brand overrides, not before them. That lets platform-specific needs win only when they truly need to, instead of letting a device rule erase brand intent. If platform comes first, later brand changes can accidentally break target-specific fixes.
Drafted with AI; not yet reviewed by a person.
