views:

248

answers:

4

I have a CSS file that uses CSS3 properties (opacity and -moz-* and -webkit-* ones). Of course, it doesn't validate as CSS 2.1. Not a big deal, but nevertheless is it possible to make it a valid CSS 2.1?

+6  A: 

Not without not using those selectors, no.

cletus
+1  A: 

Illegal values or unknown properties are being ignored. So unless you have a syntax error, you can use those values/properties.

Or do you want to have a valid CSS 2.1 stylesheet just to put a badge on your website?

Gumbo
+1  A: 

It is not possible to validate an invalid CSS.

A CSS with not standard selectors is not valid.

Developer Art
Validating is the process of testing the validity. And *valid* and *invalid* are the results you get when you validate something.
Gumbo
Since we know the requirements for a document to be accepted as valid, and since we know one of the requirements in not fulfilled, we can predict the result of the validation process in advance.
Developer Art
A: 

Use all CSS3 properties in another css sheet, and validate that without CSS3 :)

Rin