W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: "Line" pseudo-element required to control indentation of pre-formatted text?

From: Rob Crowther <robertc@boogdesign.com>
Date: Tue, 21 Sep 2010 19:44:24 +0100
Message-ID: <4C98FD08.2030807@boogdesign.com>
To: www-style@w3.org
On 21/09/10 16:09, Brad Kemper wrote:
>
> Since the usefulness seems to be pretty much limited to code wrapping,

Not just code wrapping, here's another SO question:

http://stackoverflow.com/questions/3096916/

The poster wanted to add padding to extend the background at each 
wrapped line end, yet keeping the ragged edge, something like:

span:each-line { padding-right: 1em; }

I also have a picture in my head of a movie poster where there's a 
paragraph of text like it's written on a ribbon which is then cut up and 
pasted onto the poster.  Though I have no idea where I've seen it so I 
can't find an image, but something like this:

p:each-line { background: url(ribbon.png) repeat-x; }
p:nth-line(odd) { transform: rotate(-3deg);  }
p:nth-line(even) { transform: rotate(3deg); }

Rob
Received on Tuesday, 21 September 2010 18:44:54 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:31 GMT