AndyOGo / stylelint-declaration-strict-value

Specify properties for which a variable, function, keyword or value must be used.
MIT License
133 stars 10 forks source link

How to show stylelint warning for some specific color codes but not all #204

Closed jitendravyas closed 2 years ago

jitendravyas commented 2 years ago

for example, If I want to set like, if stylelint find the #000 in the CSS, it should warn that a variable should be used for this instead of color value directly. but it should show such warning only for the color variables I have defined for the project, for any color code which is not a part of color variable list, should be allowed to use without variable

AndyOGo commented 2 years ago

@jitendravyas IgnoreValues secondary option should help you.

You can find more info and examples on how to use it in the docs: https://github.com/AndyOGo/stylelint-declaration-strict-value#list-of-values