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 20:44:02 -0500
Message-ID: <3B47BAE2.9BD1FB5E@escape.com>
To: www-style@w3.org
Tim Bagot wrote:
> At 2001-07-07T16:55-0500, fantasai wrote:-
> > I suggest adding a second value to the text-indent
> > property that indents every line.
> > The above could be defined as shorthand for two new
> > properties
> >  text-first-indent: <length> | <percentage> | inherit
> >  text-block-indent: <length> | <percentage> | inherit
> Isn't text-block-indent going to be essentially equivalent to
> padding-left and/or margin-left? How should it interact with
> these properties? Is it really worth losing backwards
> compatibility for no gain in functionality and relatively
> little in convenience?

text-block-indent is inside the border, so it can't be
equivalent to margin-left. It is not equivalent to
padding-left because

  a) As I said, "Indentation is always on the starting
     side of the text. (left for ltr, right for rtl)"
     whereas padding is given an absolute side. Using
     padding-left for indentation causes problems with
     rtl scripts.
  b) Indentation is *in addition to* padding. You can
     specify the padding in whatever units you like,
     appropriate to the visual formatting of the block.
     The indentation is separate, and can be suited to
     the visual formatting of the text.
  c) Indentation is inherited. Using padding-left and
     text-indent to create a hanging indent causes
     problems when one inherits and the other does not.
  d) Indentation only applies to lines of inline content.
     It is not applied to a block without inline content,
     so nesting multiple blocks with text-block-indent
     will not increase the indent.

As for backwards compatibility, if you need to create
a hanging indent rule that will be overlooked by
older browsers, you can do that because CSS2 text-indent
only takes one length/percentage, and if you need to
keep the text-first-indent part intact, you can specify
the text-block-indent separately.

p.ignore {
	text-indent: -2em 2em;
p.keep {
	text-indent: -2em;
	text-block-indent: 2em;
Received on Saturday, 7 July 2001 20:51:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:58 UTC