6

I've got a number of CSS styles in my site's stylesheet that use the following, or variations of:

background: -webkit-gradient(
    linear,
    left bottom,
    left top,
    color-stop(0.0, #585858),
    color-stop(1.0, #ACACAC)
);
background: -moz-linear-gradient(
    center bottom,
    #585858 0%,
    #ACACAC 100%
);

My problem is that when it comes to validating the CSS using the W3C Validator, I get the following error:

Value Error : background -webkit-gradient(linear,left bottom,left top,color-stop(0.0,#585858),color-stop(1.0,#acacac)) is not a background value : -webkit-gradient(linear,left bottom,left top,color-stop(0.0,#585858),color-stop(1.0,#acacac)) -webkit-gradient(linear,left bottom,left top,color-stop(0.0,#585858),color-stop(1.0,#acacac))

As far as I'm aware, the CSS is fine...is this a problem with the validator I should make the testing team I work with aware of?

1 Answer 1

4

You are using vendor specific experimental implementations of CSS properties. They aren't valid CSS.

One of the options for the validator will allow you to downgrade vendor extensions from errors to warnings in the reports (so if you are choosing to use them on a production site you can find any errors that aren't related to using non-standard extensions).

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

3 Comments

Ah, yes...forgot to add. I've turned off the vendor specific warnings and it still throws the error.
Validation has become pointless for CSS now that there are so many draft standards flying around. It's useful for catching obvious errors (i.e. missing colons) but for anything else it's useless.
@Rich Bradshaw W3C CSS3 Validator is not even good for catching obvious errors because it's filled with bugs and outputs a lot of garbage in reports.

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.