Page 1 of 1

'background-clip' problem

Posted: Thu Oct 11, 2018 12:01 pm
by TomHTML
There's double jeopardy on 'background-clip' when the value is 'text' within the Validator.

If I use "-webkit-background-clip: text;" in my CSS, the validator reports:
The "-webkit-background-clip" vendor prefixed property is now considered obsolete and/or useless. Today, it is recommended that only the non-prefixed version of this property be used (vendor prefixes are not necessary). It is recommended that this property be removed.
If I then change it to "background-clip: text;", the validator reports:
The value for the CSS3 "background-clip" property is invalid. CSS3 allows this value to be <box>#, where <box> is "border-box", "padding-box", or "content-box". This property determines the background painting area. This property is not valid in CSS 2.1.
Mozilla claims "background-clip: text;" is a valid property:
https://developer.mozilla.org/en-US/doc ... round-clip

However, programmers on Stackoverflow complain that the non-prefixed version is useless, and caniuse.com claims in the notes section:
Firefox, Chrome and Safari support the unofficial -webkit-background-clip: text (only with prefix)
See: https://caniuse.com/#search=background-clip

So...perhaps only validate the -webkit- prefixed version, and issue a warning for the non-prefixed version with helpful notes?

Re: 'background-clip' problem

Posted: Thu Oct 11, 2018 1:26 pm
by Albert Wiersch
Thank you. I'm looking into this now. If you'd like to test a CSS HTML Validator 2019 beta version which addresses this then please send me a private message and I'll send you a link when it's ready to test.

UPDATE: Fixed in CSS HTML Validator 2019 with a smaller improvement backported to the next update of CSS HTML Validator 2018.