~/talk

Practical Refactors With Modern CSS Colors

Talkat CascadiaJS 2026 · 2026-06-01..06-02· [css, design-collaboration]
slides:none on file

Shows how light-dark() replaces three blocks of duplicated theme variables and cuts thousands of lines of CSS by returning light or dark values in place, with global support around 87% and 100% on many Electron builds. Demonstrates per‑component relative colors using the from() syntax to tweak channels and replace Sass mixins so one variable change updates 20–30 lines worth of CSS, uses color-mix() for palettes, and highlights contrast-color() as a pending accessibility win with growing support.

AI-written summary · about

  1. 0:00Introduction: Modern CSS Colors
  2. 0:59The Problem with Traditional Light/Dark Mode Theming
  3. 3:50Simplifying Themes with light-dark()
  4. 6:05Cutting Thousands of Lines of CSS
  5. 7:12Tailwind CSS and Modern Theming
  6. 7:47Relative Colors: Dynamic Color Manipulation in CSS
  7. 10:37Understanding the "from" Syntax
  8. 12:12Real-World Uses: Tinting, Alpha, and Color Palettes
  9. 15:29Replacing Sass Mixins with Native CSS
  10. 18:01color-mix(): Mixing Colors in the Browser
  11. 19:12Accessibility Win: contrast-color()
  12. 20:13Advanced Contrast and Color Combinations
  13. 21:03Browser Support, Resources, and Wrap-Up
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.