A practical guide to replacing Sass color functions with native CSS equivalents. Covers lighten(), darken(), tint(), shade(), adjust-hue(), grayscale(), saturate(), and desaturate() using color-mix() and relative color syntax (hsl(from var(--color) ...)). Includes a button component example using a single source color token,
Table of contents
TL;DR The Short VersionWhy This Works Better NowOne Source ColourReplacing Common Sass Colour FunctionsA Practical Component ExampleProgressive Enhancement and FallbacksFin1 Comment
Sort: