CSS Custom Property Inspection Problem

Can someone tell me why this inspection is failing?


Capture.PNG

There were 2 failing inspections, and I've already added mso-hide to the Custom Properties:

Capture.PNG

10 comments
Comment actions Permalink

I saw it's a bug, but before I file one, I'd like some input.

0
Comment actions Permalink

Not a bug; adding the property to custom CSS properties suppresses the 'Unknown CSS property' inspection; but in your screenshot the warning
comes from W3C validator. W3C Validator Inspection is based on external tool provided by W3C (online version available at http://jigsaw.w3.org/css-validator/#validate_by_input), so we can do nothing to fix such warnings.
You can only disable this inspection if you don't like these errors being displayed: hit Alt+Enter and choose 'Disable W3C CSS validation'

0
Comment actions Permalink

But I don't want to get rid of it - why are those mutually exclusive?

0
Comment actions Permalink

See above - I've updated my comment


0
Comment actions Permalink

But that defeats the purpose of having Custom CSS Properties.

0
Comment actions Permalink

Why? It's a different inspection. See above: "adding the property to custom CSS properties suppresses the 'Unknown CSS property' inspection"

Do you mean that suppressing one inspection should affect all others? What's the reason for having multiple inspections then? One would be more than enough - especially when it's disabled

0
Comment actions Permalink

No, becasuse these are conflicting. Basically what that says is "You can only use Custom Properties if you don't want to use the W3C Inspection." Where else in the Inspection process does that type of conflict occur? I've not see it. At least give us the option to supress the W3C and not have to disable it. So, if I want to use a Custom Property once in my entire code-base (200k+ lines of code), I can't use the W3C Inspection anywhere.

Also, it's not consistent.  In this example, I don't get a W3C inspection warning:

Capture.PNG

0
Comment actions Permalink

W3c validator reports different problems, not just unknown CSS properties. Most of its validation options are already covered by other inspections, plus w3C validator is not always up-to-date and reports errors for valid CSS, but some users still like to have it enabled. If you think that it conflicts with other inspections, you can disable either of them.

>So, if I want to use a Custom  Property once in my entire code-base (200k+ lines of code), I can't use  the W3C Inspection anywhere

W3C validator knows nothing of custom properties, and we can't modify it to fix this

>Also, it's not consistent.  In this example, I don't get a W3C inspection warning

can't recreate for similar code

0
Comment actions Permalink

lena_spb wrote:


>Also, it's not consistent.  In this example, I don't get a W3C inspection warning

can't recreate for similar code

You can't cause the Inspection warning in that scenario or you can't cause it not to throw the warning?

Why is there no option to supress the W3C warning?

0
Comment actions Permalink

The latter - the warning is shown for me


>Why is there no option to supress the W3C warning?

Not sure. feel free to file a request for this feature to youtrack

0

Please sign in to leave a comment.