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

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:

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); }


Received on Tuesday, 21 September 2010 18:44:54 UTC