Home Forums General XMetaL Discussion "Left indent" extension property in CSS Reply To: "Left indent" extension property in CSS

Derek Read

Reply to: "Left indent" extension property in CSS

Perhaps to understand this it would help to compare it to margin-left, which is standard CSS.

Try adding the following to the end of the journalist.css and creating a new Journalist “Article” using the template provided for that demo:

Sect1 {left-indent: 4em;}
Para {left-indent: 4em;}

Both Sect1 and Para should appear 4em from the left edge of the document.

Now, for comparison purposes use some standard CSS:

Sect1 {margin-left: 4em;}
Para {margin-left: 4em;}

Sect1 appears 4em from the left edge of it's parent element Article, which by default is not indented so in effect Sect1 is moved over 4em to the right. Para in turn appears 4em from the left edge of its parent, which in this case is Sect1, so to total effect on Para in this case is to move it 8em to the right.

History:
The reason this proprietary CSS property was added was primarily to support some of our government clients (US House of Reps, Congress, etc). They produce legal documents (including Federal Bills and other similar legislation) where indentation from the left margin has specific legal significance. It was difficult to track all the cumulative effects produced using padding or margin properties on selectors. This property was added so they could be sure when they specify a value it was always relative to the left edge of the document (which I believe is the same way their printing systems probably specify these things).

This was a very special case and we do not normally stray from the W3C CSS recommendations unless there is a very compelling argument to do so.

Reply

Products
Downloads
Support