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

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 22 Sep 2010 02:58:44 -0700
Message-ID: <4C99D354.5010904@inkedblade.net>
To: David Chambers <david.chambers.05@gmail.com>
CC: www-style@w3.org
On 09/21/2010 05:16 AM, David Chambers wrote:
> I recently wondered whether it's possible to style a block of text
> *contained within a single element* such that wrapped lines are
> indented.

Good question. A :line pseudo-element is a bit overkill for solving
this problem (and unlikely to get much traction, given how difficult
:first-line is to spec and implement). But, I'm pretty sure we could
solve your problem with better options for the text-indent property!

e.g.

   pre {
     text-indent: 2em hanging each-line;
   }

We already have "text-indent: 2em hanging" proposed in CSS3 Text.
   http://www.w3.org/TR/css3-text/#text-indent

~fantasai
Received on Wednesday, 22 September 2010 09:59:20 GMT

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