CSS variables combined with Sass

CSS variables combined with Sass
0

#1

Hello,

I was doing some reading on CSS variables e.g., :root { --color: red }. Any of you using this with Sass? Seems like covering for fallbacks is sort of expensive (since not all browsers support it). Also, I really like the nesting feature of Sass, so going all in with CSS variables seems like a heavy price. Maybe I’m missing something?

Your thoughts? Are you using both?

Thanks,
D


#2

If you’re already using Sass (which has a lot of other useful features), I see no reason to use the more limited and less widely supported CSS version. The only drawback I can see is that it adds an extra step to the build process.