World Congress 2026 Europe

One Color to Rule Them All: Relative CSS Colors in Practice

July 9, 2026 10:25 – 10:35 · 10 min Airstream 2

What this session covers

Choosing separate colors for text, borders, hover states, active states, and backgrounds is one of the most repetitive—and unnecessary—parts of frontend work. Every new component means another round of “What should the hover color be?” or “Can design give us a darker shade?” Modern CSS gives us a better way.

In this talk, we’ll explore how relative CSS colors let you generate an entire color system from a single base value. Using color-mix(), OKLCH, and custom properties, you can derive hover, active, border, and subtle background colors automatically.

I’ll walk through an example of building a fully interactive button with just one color token, then generating all its states directly in CSS. You’ll see how this approach improves consistency, simplifies theming, and dramatically speeds up collaboration between design and engineering.

You’ll leave with practical patterns you can drop into your design system today—and a new way of thinking about color on the web.

World Congress 2026 Europe

Related talks

Open session

Code Style in Practice: Balancing Preferences and Consistency

  • Angelika Shvets

    Global-e

    Senior Software Engineer

Open session

Microfrontends: Lessons Learned from Growing a Design System and Shared Libraries Across 20+ teams

  • Erasmo Hernandez

    Globant

    Senior Web UI Developer and Tech Lead

Open session

Colorful quantum randomness

  • Jakub Gaj

    Danske Bank

    Cloud Solution Architect

Open session

Type Systems You Might Not Know (But Will Love)

  • Veit Heller

    Technologist at Large

All sessions at this congress