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,

4m read timeFrom alwaystwisted.com
Post cover image
Table of contents
TL;DR The Short VersionWhy This Works Better NowOne Source ColourReplacing Common Sass Colour FunctionsA Practical Component ExampleProgressive Enhancement and FallbacksFin
1 Comment

Sort: