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

Re: [CSS3 Text] request: line-padding

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 20 Jan 2010 10:41:23 -0800
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Kenneth Kufluk <kenneth@kufluk.com>, www-style@w3.org
Message-Id: <55B68330-A16F-45CA-A99E-2ECD173EFBC1@gmail.com>
To: fantasai <fantasai.lists@inkedblade.net>

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 GMT

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