1

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 valid CSS 2.1?

1
  • It's unclear what you're actually asking, because you include the answer to your stated question in the sentence before you ask said question. Commented Oct 17, 2022 at 13:51

4 Answers 4

6

Not without not using those selectors, no.

Sign up to request clarification or add additional context in comments.

Comments

1

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?

Comments

1

It is not possible to validate an invalid CSS.

A CSS with not standard selectors is not valid.

2 Comments

Validating is the process of testing the validity. And valid and invalid are the results you get when you validate something.
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.
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.