- From: fantasai <fantasai@escape.com>
- Date: Sat, 07 Jul 2001 20:44:02 -0500
- 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