Precise meaning of 'en'?

Michael Seaton posted some good questions that have not yet been
answered:

 > 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.

Regards,

-h&kon

Hakon W Lie, W3C/INRIA, Sophia-Antipolis, France
http://www.w3.org/People/howcome  howcome@w3.org

Received on Thursday, 1 February 1996 05:02:15 UTC