Precise meaning of 'en'?

Hakon Lie (
Thu, 1 Feb 1996 11:01:05 +0100

Michael Seaton posted some good questions that have not yet been

> How should an 'en' be interpreted? Does it inherit its point
> size from current element, or the parent element, or HTML?
> I.E. if one had
> html {font-size: 8pt}
> p {font-size: 12pt}
> p {text-indent: 3en}
> p.initial {font-size: 24pt}
> Then how much would the first line of p.initial be indented?

First, the all declaration that apply to the element are found. The
element in question is 'p.initial', so declarations with 'p' and
'p.initial' apply. 'p.initial' has a higher specificity than 'p', so
'font-size: 12pt' will be discarded. The text indent ('3en') will
therefore be based on a font size of 24pt. 'en' is then 12pt, and
'p.initial' will be indented 3 * 12pt = 36pt.

> If instead the second line were p {margin-left: 3en} then what would
> be the size of p.initial's margin?

Assuming you mean:

> html {font-size: 8pt}
> p {margin-left: 3en}
> p {text-indent: 3en}
> p.initial {font-size: 24pt}

The same rules apply here: 'margin-left' will be based on a font-size
of 24pt and will end up being 36pt.

> How does :first-line fit into this?

:first-line should not be used to set indentation on the first line,
'text-indent' is meant for this. This will more explicit in the next
version of the specification.



Hakon W Lie, W3C/INRIA, Sophia-Antipolis, France