necolas/normalize.css — Issue #80: word-wrap: break-word /* comment please? */
Author: iDGS
Created: 2012-02-25 21:21:27+00:00
State: open

Silly me, I sometimes send perfectly good stuff through the [W3C CSS validator](http://jigsaw.w3.org/css-validator/#validate_by_input+with_options) as CSS3 just to see what happens. For instance, this snippet recently caught my interest:

/*
* Improves readability of pre-formatted text in all browsers
*/

pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}

(Uh-huh. But please don't roll your eyes just yet...)

As I'm sure you already know, the validator complained:

6	pre	Property word-wrap doesn't exist : break-word

Wha...? Says I, and so I go looking. (Time passes...)

AFAIK, word-wrap is not in the W3C Spec, although I did find: [overflow-wrap](http://www.w3.org/TR/css3-text/#overflow-wrap) along with this interesting quote:

> 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.

"Legacy? I don't want no stinkin' 'Legacy,'" I huff. And so, I scamper back to the validator to try it out the "Modern" way:

/*
* Improves readability of pre-formatted text in all browsers
*/

pre {
white-space: pre;
white-space: pre-wrap;
overflow-wrap: break-word;
}

which promptly results in

8	pre	Property overflow-wrap doesn't exist : break-word

Picture me having one of those hilariously-funny-if-it's-not-you "What the...?" [Yosemite Sam](http://www.youtube.com/watch?v=QnDxPG3KrtA) kind of moments: "Not in the... Why you... It's *YOUR OWN* validator!"

Since then, found a little more discussion both [hereabouts](https://github.com/h5bp/html5-boilerplate/issues/947), and [elsewhere](https://developer.mozilla.org/en/CSS/word-wrap).

After which point, to quote the inimitable [Jar-Jar Binks](http://www.youtube.com/watch?v=ZoaQYL8ylms), "My give up! My give up!"

So what's the deal here? Well, my point is *not* to say that I know what ought to go there in the code. Rather, it's to raise the possibility of inserting a handy-dandy comment--perhaps something along the lines of, "Danger, Pard'--Tar Pit Ahead!" It's too late for me. My bones are already bleaching in the sun. But, it would doubtless be much appreciated by some other cowpokes coming along later. After all, there are so many truly great and helpful other comments in there. Why not provide a little heads-up about this? ;-) (P.S. Hope you got a laugh.)