Page 1 of 1

Is it possible to skip errors for -linear-gradient syntax

PostPosted: Tue Aug 30, 2011 3:50 am
by sitestepper
Hi,

Is it possible to turn the errors produced when using one of the following lines into a message (like you do with 'Found the unknown proprietary Safari/WebKit property "-webkit-box-shadow". Unknown proprietary Safari/WebKit properties that begin with a dash are ignored and their values are not checked. Proprietary Safari/WebKit properties may only work in Safari and WebKit based browsers and will probably not work in other browsers like Firefox, Internet Explorer, and Opera. There may be other proprietary Safari/WebKit properties. This message is displayed only once.') ?

background: -moz-linear-gradient(top, top, white, #d5eaff 95%);
background: -webkit-gradient(linear, top, white, #d5eaff 95%);
background: -webkit-linear-gradient( top, white, #d5eaff 95%);
background: -o-linear-gradient(top, top, white, #d5eaff 95%);
background: linear-gradient(top, top, white, #d5eaff 95%);

I am using this syntax to produce gradients and need the various syntax lines for different browsers (maybe I don't need all of them, but you get the picture).

Thanks

Re: Is it possible to skip errors for -linear-gradient synta

PostPosted: Tue Aug 30, 2011 9:06 am
by Albert Wiersch
Hello,

You could disable messages like these using "Exact Text Match" disable option:
The value "-moz-linear-gradient(top, top, white, #d5eaff 95%)" is invalid.
The value "-webkit-gradient(linear, top, white, #d5eaff 95%)" is invalid.

But disabling the other errors (like below) would disable all the checking for the "background" property:
The value for the shorthand "background" property is invalid. CSS2.1 allows this value to be "['background-color' || 'background-image' || 'background-repeat' || 'background-attachment' || 'background-position']". CSS3 allows this value to be "[ <bg-layer> , ]* <final-bg-layer>", where <bg-layer> is "<bg-image> || <bg-position> || / <bg-size> || <repeat-style> || <attachment> || <bg-origin>" and <final-bg-layer> is "<bg-image> || <bg-position> || / <bg-size> || <repeat-style> || <attachment> || <bg-origin> || <'background-color'>". This shorthand property can set most background properties.

For the next major release (v11), I'm targeting improved HTML5 & CSS3 checking & better customization ability. If you'd like to test this out using a BETA build, then please email me at support at htmlvalidator dot com. I have some ideas for v11 that can better help with this problem and I'd be happy to test/try them with you.

Re: Is it possible to skip errors for -linear-gradient synta

PostPosted: Wed Oct 05, 2011 11:06 am
by Albert Wiersch
Hello,

I'd like to work on this for V11 now. Could you email me some of your CSS stylesheets that use gradient values? It would be helpful. Thanks!

UPDATE: I'd still like to test those style sheets, but the public v11 BETA should now accept these as images - though the gradient parameters (what's in the parenthesis) are not currently checked. It looks like the "CSS Image Values and Replaced Content Module Level 3" is only in the "Editor's Draft" status/stage.

Re: Is it possible to skip errors for -linear-gradient synta

PostPosted: Thu Oct 06, 2011 2:32 am
by sitestepper
Albert, the CSS file has been emailed.

Erik

Re: Is it possible to skip errors for -linear-gradient synta

PostPosted: Sat Oct 08, 2011 8:34 am
by Albert Wiersch
sitestepper wrote:Albert, the CSS file has been emailed.


Thanks!

Please try the public BETA here and let me know how it works:
http://www.htmlvalidator.com/freebeta/