Question

I recently decided to run the Resharper 6.0 "Analyze Errors In Solution" option on our web application. After several valid problems it picked up on, it has me stumped on some CSS 'errors':

(disclaimer: I am not a CSS person in the slightest, only understand the principles, so may use the wrong terminology - please bear with me!)

In our web application, we have some CSS selectors which follow this general pattern:

    .someselector{
        property:inherit
    }

This 'inherit' value has been used against the properties of:

  • padding
  • border-width
  • overflow

I realise that the 'inherit' value is not necessarily cross browser compatible, but I'm not worried about that (for now). What I don't understand is why ReSharper is throwing its toys over its use as from what my research shows it is a valid CSS value (albeit not widely supported)? http://reference.sitepoint.com/css/inheritvalue and http://www.w3.org/TR/CSS2/cascade.html#value-def-inherit

I'm assuming there's something I don't know about the inherit value and its use and would appreciate any enlightenment someone can provide. I am equally happy if an experienced CSS developer can tell me the CSS is valid and ReSharper is wrong. Just looking for clarity of which is right!

Thanks in advance!

Was it helpful?

Solution 2

This has been confirmed as a bug (outside of Stack Overflow) and I have lodged a bug report with JetBrains to fix it. The CSS listed above is indeed valid.

OTHER TIPS

JetBrains have already identified this as an issue (and linked to this question!), and have targetted version 6.1 for a fix.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top