W3C home > Mailing lists > Public > www-style@w3.org > March 2007

[css3-text] Word wrap confirmation

From: Daniel Beardsmore <public@telcontar.net>
Date: Tue, 06 Mar 2007 22:00:45 +0000
Message-ID: <45EDE48D.3000804@telcontar.net>
To: www-style@w3.org

Just want to be sure I understand this correctly.

If I write this:

  code.blockcode {
   display: block;
   white-space-collapse: preserve;
   text-wrap: normal;

   #define FOZZIE     1
   #define BEAR    1024

   if (foo) {
     // spaces for indentation woo
     bar ();

     // this line is really long
     baz (lots, of, variables, so, that, _this, line, is, really, long, ...

The source code would display correctly? I have two criteria pretty much for 
anything like this:

a) runs of white space be preserved correctly, but
b) the lines of text would wrap at the container edge

If I use CSS2's white-space: pre, the lines don't wrap, which is a real pain. 
Generally, it's really useful, whether displaying source code or IRC chat 
transcripts, to have runs of spaces preserved (tabs and spaces in fact) but to 
have the text wrap at the container edge instead of going off the side of the 
window (or in print, the page).

I am guessing, and hoping, that the extended control offered in CSS3 will 
provide for this, but I am not 100% confident that the new draft makes this clear.
Received on Tuesday, 6 March 2007 22:01:57 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:28 UTC