csstree / stylelint-validator

Stylelint plugin to validate CSS syntax
MIT License
93 stars 11 forks source link

Ignoring value containing colon #43

Closed AndreasNasman closed 2 years ago

AndreasNasman commented 2 years ago

Hi!

I'm trying to use ignoreValue to suppress a parsing error:

Can't parse value "alpha( opacity: 0 )"

The CSS property looks like this:

.class {
    filter: alpha( opacity: 0 );
}

I've tried combinations like

'ignoreValue': 'alpha'
'ignoreValue': 'alpha.*'
'ignoreValue': 'alpha\\(.*\\)'

to ignore the value, but can't seem to get the syntax right. Any advice on the correct syntax to ignore the filter: alpha( opacity: 0 ); property?

Thanks – Andreas

AndreasNasman commented 2 years ago

Another similar one is

.class {
    filter: progid:dximagetransform.microsoft.gradient( startColorstr='#e80008', endColorstr='#a6002c', GradientType=0 ); 
}

It seems to be the colons in the properties that cause trouble. 🤔

lahmatiy commented 2 years ago

Looks like ignoreValue applies for matching errors only, not for parse errors. That's a bug, going to fix it.

AndreasNasman commented 2 years ago

Thanks for the fix, works perfectly! 👍