Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Zalando Engineering 20 min read Case study mediumAdept

Theming the Zalando Design System

Zalando built theming into its design system by extracting repeated values into semantic design tokens (e.g. `accent` instead of `orange`) and adding component-level tokens that reference global ones, so themes can change a button's padding without redefining global scales. Colour schemes (default, monochrome-dark, monochrome-light) are first-class within each theme to meet contrast requirements on image-derived banner backgrounds, which raises open questions about native dark mode. Tokens live in TOML files processed by Style Dictionary with custom transforms and formats that emit platform-specific artefacts for web, Android and iOS. Each theme is a partial dictionary deep-merged over the base theme. The tokenization process also simplified the design system and improved cross-platform parity.

Assumes: design tokensCSS custom properties

Related posts

  • Design Systems @ Replit: Better Tokens

    Replit mediumAdept

    Replit rebuilt the token layer of its RUI design system, the base of a hierarchy running tokens → utilities → components → patterns → design guidance. Numbered and vague names like `foreground-3` or `font-size-medium` were replaced: colors are named by intended use on a theme-independent "dimmest → strongest" contrast scale, backgrounds by elevation (root → highest), and pixel-based tokens by their measure (`font-size-14`). The set shrank from 83 to 72 tokens even after adding line-height and border-width categories. Raw CSS variables, which let 30–50 typos slip through, were swapped for a typed Emotion `vars` object that gives autocomplete and errors on misspelled tokens.

  • An Introduction to the Zalando Design System

    Zalando Engineering mediumAdept

    Zalando's web design system is layered on an extended atomic-design model: design tokens, "electrons" (a restricted CSS grammar like paddingTop_m), atoms (the only layer that touches CSS), molecules (generic React components) and team-owned organisms. Each layer changes at a different pace, and the architecture is shaped around that. The monorepo publishes one npm package per component plus a single shared CSS bundle, so adding organisms never grows the CSS and teams' JS bundles don't affect each other. GitHub code owners give feature teams ownership of their organisms. After two years and near-100% adoption, the remaining pain points are fragmented ownership of common components and keeping library releases in sync with the main app's separate deployment pipeline.

  • Illuminating dark mode

    Figma mediumAdept

    Figma built dark mode by replacing roughly 5,100 build-time PostCSS color variables with runtime CSS custom properties based on a semantic token schema (Type | UI Element | Color role | Prominence | Interaction), so new themes only require reassigning token values. Tokens are exported in the Design Tokens Format Module spec and compiled to CSS, Swift and XML. To spread the mostly manual refactor, forty engineers covered about 80% of in-scope surfaces in a single 'Dark Mode Week'. Supporting tooling included CSS fallbacks to the legacy variables to prevent regressions, a debug theme with random saturated colors to reveal unconverted surfaces, and a CIELAB-based search tool for finding the closest matching token.

  • How Thumbtack structures their design system

    Figma mediumAdept

    Thumbtack's Thumbprint design system is organized in three layers: design tokens shared by web and native, an atomic CSS library built on the tokens, and accessible React components on top. Higher layers trade flexibility for productivity, accessibility and consistency. When a component doesn't fit, developers drop to a lower layer, such as the unstyled ModalCurtain under the styled Modal. That lets teams adopt the system incrementally and gives maintainers a way to spot popular workarounds without making one-off API changes. Publishing and documentation overhead is handled with a monorepo (Yarn Workspaces, Lerna), a GraphQL API over the tokens, and docs that make the happy path prominent and the escape hatches subtle.

  • Unlocking inclusive design: how Primer’s color system is making GitHub.com more inclusive

    GitHub Engineering mediumAdept

    GitHub's Primer design system fixed hundreds of color contrast violations across light and dark modes and all themes by changing its foundational color tokens (Primer Primitives) rather than individual components. The team audited 100+ text/background color pairs against WCAG ratios (4.5:1 and 3:1) and wrote a script that checks every pair across every theme. The script handles semi-transparent colors by first blending the background onto the page background, then blending the text onto that result. The check now runs as a GitHub Action on every Primer pull request, and the changes were rolled out to staff behind a feature flag before going live.

The quest for software engineering knowledge.

Look:
Layout: