W3C home > Mailing lists > Public > www-style@w3.org > July 2001

Re: text-indent/exdent (was "suggestion")

From: fantasai <fantasai@escape.com>
Date: Sat, 07 Jul 2001 16:55:45 -0500
Message-ID: <3B478560.C8272B5C@escape.com>
To: www-style@w3.org
Mjumbe Ukweli wrote:
> 
> Benjamin Rossen wrote:
> > 
> > There is no simple way to make a hanging edge (or exdent)
> > on the introduction of a paragraph, although a negative
> > indent with margin shift does accomplish this. <snip/>
> >
> >What about:
> >
> >p {exdent: 10px;}
> >
> 
> that might confuse things a bit.  what happens when 
> 'indent' and 'exdent' are both set on the same paragraph?
> i think that negative values for 'indent' should rather
> be interpreted as an exdent:
> 
>     p {text-indent: -10px; /* exdented 10px */}
> 
> either that or there should be a property added to tell
> the user agent how to interpret the 'indent' property:
> 
>     p.indent {
>         text-indent: 10px;
>         text-indent-style: first-line;
>     }
>     p.exdent {
>         text-indent: 10px;
>         text-indent-style: hanging;
>     }
> 
> with the default set to 'first-line'.  i think that's the most
> backward-compatible solution.


I suggest adding a second value to the text-indent property
that indents every line.

p.indent {
  text-indent: 2em; /* same as "text-indent: 2em 0;" */
}

p.sub {
  text-indent: 0 2em; /* indents the whole paragraph 2em */
}

p.hanging {
  text-indent: -2em 2em; /* hanging indent of 2em */
}

The above could be defined as shorthand for two new properties
 text-first-indent: <length> | <percentage> | inherit
 text-block-indent: <length> | <percentage> | inherit

 text-indent: <'text-first-indent'> <'text-block-indent'>? | inherit

Indentation is always on the starting side of the text.
(left for ltr, right for rtl)

~fantasai
Received on Saturday, 7 July 2001 17:03:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:10 GMT