ByteFE
May 24, 2021 · Frontend Development
Automating Dark‑Mode Color Variable Replacement with Stylelint and PostCSS in Semi Design
This article explains how to automatically replace literal color values with Semi Design CSS variables for dark‑mode support by parsing style files with PostCSS, calculating color similarity with chroma‑js, and applying a custom Stylelint rule that can lint and autofix the code.
AutomationCSSPostCSS
0 likes · 10 min read