Re: [CSS3 Text] request: line-padding

On Jan 20, 2010, at 12:57 PM, "Tab Atkins Jr." <jackalmage@gmail.com>  
wrote:

> On Wed, Jan 20, 2010 at 12:41 PM, Brad Kemper  
> <brad.kemper@gmail.com> wrote:
>> On Jan 20, 2010, at 9:49 AM, fantasai wrote:
>>> 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.
>
> Given the pretty-printed code employing roughly that strategy I've
> seen on the web, and considering how often the striping becomes
> noticeably misaligned after 20 lines or less of code, I'd say it's not
> very rare at all.  Either line-height commonly varies by small,
> unpredictable amounts, or authors are just bad at predicting exactly
> how tall the line is.  Or both.

Probably the latter, and maybe rounding errors. I don't see why it  
should drift if the text is all the same size and the same measure is  
used for line-height and background-size, and for vertical padding and  
margins. Where is the lack of precision coming from otherwise?

The point is that there is a way to create a box with an evenly  
striped background in which the pattern is spaced the same as the  
lines of text. Or there are implementation bugs.

  
  

Received on Wednesday, 20 January 2010 22:30:23 UTC