Re: [CSS3 Text] request: line-padding

On Jan 20, 2010, at 9:49 AM, fantasai wrote:

> On 01/20/2010 08:57 AM, Brad Kemper wrote:
>> 
>> It sounds to me like you are describing a background pattern.
>> Create an image 1px wide, and as tall as two lines of text. Make the
>> top half of the image one color and the bottom half a different color,
>> and repeat it across the whole multi-line block. Use 'background-size'
>> to keep it the height of 2 lines of text (3em in your example), maybe
>> starting with a larger-than-needed image so that it scales well.
> 
> That's a really hackish way of doing it,

Funny, I was thinking that adding a span element and a new pseudo-element in order to get a repeating stripe pattern was hackish.

> and it'll break if there's any
> content on any lines that's taller than the default line height.

True. But in many cases where striping is useful (code listings, for instance), that would be rare, or controllable.

Received on Wednesday, 20 January 2010 18:42:02 UTC