The code in question is this:
/*fix ie transform offset*/
.adAffiliate.adDeclarationPosition-Right .adAffiliate-header
{
*left: -20px !important; /* IE 7 (IE6 also uses this, so put it first) */
_left: -20px !important; /* IE 6 */
left: -20px\0/ !important; /* IE 8-9 */
}
As you can see, the first two lines get recognized as CSS hacks. They do not appear in the solution error list. I just want to get rid of the 3rd line appearing in the solution error list. Unfortunately, "ignore error" does not work across VS restarts. Is there a way to suppress this particular error? Maybe a special "ignore comment"?
This is the only CSS hack I have in 1000s of LOC. I just did not find a way out this time. And I am ok with this hack being there.
Just change severity for this type of error by pressing Alt+Enter at the error highlighting, selecting Inspection options... and setting severity to Warning or lower.
This would force the issue to disappear from the Errors in Solution tool window which, obviously, shows only error-level issues. Mind you, inspection severity changes persist across VS restarts.
Of course, this solution implies that whenever your code happens to have a similar issue somewhere else, you won't be able to observe it through Errors in Solution: you'll either have to keep your eye on ReSharper issue highlighting in the code editor (a useful habit anyway) or inspect your code with ReSharper > Inspect > Code Issues in scope
You call it CSS hacks, I call it invalid CSS (and the validator does it too). I recommend to use different css files included by i.e. conditional comments. This is more work, but it is much cleaner.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With