8

Trying to use CSS variables for the first time. Doing it in a react (create-react-app) application, and works great. Only issue is that there's no warnings if I mistype a variable name or just simply forget to define it.

Is there a way to, for example, configure stylelint or scss to warn me when I have used a CSS variable that has not been set? Or a setting/extension in FireFox? Something?

1 Answer 1

0

It seems a suitable rule was added to stylelint (it might be behind an experimental flag, I have not tried to activate the rule yet).

The new rule is intended to supersede a stylelint plugin.

The interested reader can find a discussion of the feature from 2016 (and a dupe from 2017).

Not the answer you're looking for? Browse other questions tagged or ask your own question.