AndyOGo / stylelint-declaration-strict-value

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

Ignore functions regex #324

Open silverwind opened 1 year ago

silverwind commented 1 year ago

I would like to allow certain functions like color-mix, but it seems the current ignoreFunction option is not flexible enough.

This should be flagged:

color: rgb(255 0 0);

This should be allowed:

color: color-mix(in srgb, var(--color-red), var(--color-blue));

Maybe have an ignoreFunctionRegex: /^color-mix$/ option?

Zeeex commented 11 months ago

I would also like this option, and you could probably re-use the same keyword, like for "ignoreValues"

image Something like this:

"ignoreFunctions": {
    "": false,
    "/RegExp/[darken]": true,
    "/RegExp/[lighten]": true
},