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.

Related talks at this congress

Open session

World Congress 2026 Europe

July 9, 2026 · 12:10–12:20

Airstream 1

Code Style in Practice: Balancing Preferences and Consistency

Angelika Shvets

Senior Software Engineer at Global-e

Angelika Shvets
Open session

World Congress 2026 Europe

July 9, 2026 · 16:10–16:40

Stage 11

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

Erasmo Hernandez

Senior Web UI Developer and Tech Lead at Globant

Erasmo Hernandez
Open session

World Congress 2026 Europe

July 10, 2026 · 11:40–12:10

Stage 2

Colorful quantum randomness

Jakub Gaj

Cloud Solution Architect at Danske Bank

Jakub Gaj
Open session

World Congress 2026 Europe

July 9, 2026 · 13:30–14:00

Stage 2

Type Systems You Might Not Know (But Will Love)

Veit Heller

Technologist at Large

Veit Heller
All sessions at this congress