Re: Why the "word-wrap:break-word" CSS can't pass on the W3C CSS validator ?

2012-06-06 5:20, cqing wrote:

> there are some CSS properties can't pass on the W3C CSS validator
> (Profile: CSS level 3).
> As follows:
> 1. word-wrap: break-word;

The error message says “Property word-wrap doesn’t exist”, and that’s 
how things are—at present. The word-wrap property existed in some CSS3 
drafts but was removed, or rather renamed to overflow-wrap. The current 
CSS3 Text draft says:
“For legacy reasons, UAs may also accept ‘word-wrap’ as an alternate 
name for the ‘overflow-wrap’ property. However this syntax 
non-conforming in author style sheets.”
http://www.w3.org/TR/css3-text/#overflow-wrap

I think they should not have changed the name, but they did, and the W3C 
CSS Validator must follow suit.

> 2. zoom : 1;

The property zoom was never part of any CSS specification (or any draft, 
as far as I know). It is a browser-specific (IE) property. It is most 
widely used for reasons related to the hasLayout bug in IE, see
http://reference.sitepoint.com/css/haslayout
(As the document explains, zoom: 1 is a simple way, but not the only 
way, to deal with the bug.)

> 3. -webkit-appearance : none ;
> 4. -webkit-border-radius : 0 ;

These are vendor extensions, as the format of the names (a vendor prefix 
starting with “-”) indicates. They are by default reported as errors, 
since they do not comply with specifications and drafts.

To make them reported as warnings, click on “More Options” in the W3C 
CSS Validator user interface, set “Vendor Extensions” to “Warnings”. The 
warnings will then appear after the error messages or after the “No 
errors found” message.

You can additionally set “Warnings” to “No warnings” and have these 
messages entirely suppressed. But then you may miss some useful warnings 
about completely different issues.

Yucca

Received on Wednesday, 6 June 2012 10:23:11 UTC