Re: [CSS3 Text] request: line-padding

On Wed, Jan 20, 2010 at 5:56 AM, Kenneth Kufluk <kenneth@kufluk.com> wrote:
> I'm not entirely sure it's clear what will happen to first-letter
> items.  Will each line get it's own first letter?  That wouldn't be
> desirable.

It shouldn't - ::first-letter is still a structural pseudoclass, and
we're not changing the structure.

> Also, in the application I am currently building, we're using
> background images as bullets.  So the text should render as:
> [img]  One two three--
> --four five six--
> --seven eight--
> --nine ten.--
>
> I think that using the clone technique will repeat that image:
> [img]  One two three--
> [img]  four five six--
> [img]  seven eight--
> [img]  nine ten.--

Yes, it will.

> While I'm sure I could "fix" this by wrapping another span around the
> element, I would rather not do so, if there's another workaround
> available.

Alternately, switch the box to display:line-item and supply the image
as a real bullet via list-style-type.

> Finally, if each line is 'cloned', I think there should be a
> CSS-selector for each line.  This would potentially allow for
> zebra-style colouring.  Admittedly I don't have a use-case in mind for
> this, but it's an idea.

The main problem with this is that ::first-line is already pretty
screwed up and crazy, and we're somewhat reluctant to multiply this
craziness by introducing an ::nth-line() pseudoclass.  On the other
hand, formatted code often uses a light zebra striping, so there is an
existing use-case.

~TJ

Received on Wednesday, 20 January 2010 13:57:42 UTC