Prevent CSS Validation for just 1 line
I have a problem practically identical to this question, but I'm looking for a different solution. Instead of turning it off globally, I'd like to just disable it for a single line. I know I have seen many examples where various techniques are used to suppress different warnings, and I am looking for one that I can put in my CSS to suppress this one.
Examples of ways to suppress warnings and such #pragma warning disable 659
or [SuppressMessage("Microsoft.Usage开发者_C百科", "CA2214:DoNotCallOverridableMethodsInConstructors",
Justification = "I have a good reason.")]
.
The CSS I want it to be quiet about has some CSS3 stuff in it which is why it's understandably complaining:
.round
{
border-radius: 5px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
}
So any idea how to make my Error 1 Validation (CSS 2.1): 'border-radius' is not a known CSS property name
error go away? I'd rather not lose all of my CSS validations but I do want it to ignore this one "problem".
I don't think that its possible. But you could separate the nice effect from the basic ones. http://www.smashingmagazine.com/2009/04/22/progressive-enhancement-what-it-is-and-how-to-use-it/ Make a style sheet for all the cool css3.0 stuff. Add-it to browser that can use it. For those that cant (ie, who else), you give the only the basic styleSheet. So real browser got basic + css3.0. IE get basic only.
精彩评论