W3C home > Mailing lists > Public > www-style@w3.org > February 2004

RE: [css3-page] LCWD issue 22 -- [22] Section 3.3.2 <length>

From: Ernest Cline <ernestcline@mindspring.com>
Date: Tue, 17 Feb 2004 16:32:43 -0500
Message-ID: <410-220042217213243687@mindspring.com>
To: "BIGELOW,JIM (HP-Boise,ex1)" <jim.bigelow@hp.com>
Cc: "W3C CSS List" <www-style@w3.org>


> [Original Message]
> From: BIGELOW,JIM (HP-Boise,ex1) <jim.bigelow@hp.com>
> To: <ernestcline@mindspring.com>
> Cc: W3C CSS List <www-style@w3.org>
> Date: 2/17/2004 3:23:01 PM
> Subject: RE: [css3-page] LCWD issue 22 --  [22] Section 3.3.2 <length>
>
>
> Ernest wrote [1]:
> > ... what the size property is describing is not the size 
> > of a page sheet which is physical, but the size of a page 
> > box.  Granted, the usual intent will be to specify a page box 
> > that will occupy a page sheet exactly, but that is not the 
> > only use for specifying the size of a page box.  Therefore, 
> > an author might wish to specify an abstract page box which 
> > the UA will then fit if his intent is to insure that a 
> > certain number of lines will be printed per page  The 
> > mechanism would in essence be no different from having 
> > specified "size:A4" and the UA having to decide how to print 
> > the A4-sized page box on a letter-sized page sheet. Thus the 
> > physicality of the page sheet is not a relevant point. The 
> > only relevant point is "Is there a reasonable interpretation 
> > for the relative  units "em", and "ex" with respect to the page box?"
>
> After reading the line of reasoning in [1], I disagree.  
>
> The Chicago Manual of Style defines em as, "The unit of linear measure
> equal to the point size of the type in question." The CSS 2.0 and 2.1
> specifications define em and ex as relative units. Reference to the width
> variability fonts is missing from the reasoning in [1]. The units ex and
em
> are defined in terms of a font, and so can be different for Serif and
> Sans-Serif.

What variability are you referring to?  The context that would be used would
have exactly one font.  While that font could differ based on what fonts the
UA has available, it would be easily and uniquely determined for a given
UA and set of stylesheets.  So yes, different UA's might size the page box
differently in terms  of absolute units, but where you see that as a 
disadvantage, I see that as an advantage.  In any case, given that the
relative unit "px" is already acceptable for page boxes, that page boxes
can have different absolute sizes is already present in CSS.   While this
would be a problem for the page sheet. This module doesn't specify page
sheets, but page boxes.

> Use of em and ex makes sense in the context of text where the font-family,
> font-size, font-weight, font-style, font-stretch, font-variant,
line-height
> and letter-spacing properties apply to an abstract character sequence [2].
> However, both the document (content of body element) and page box can
> contain many abstract character sequences with different values of em and
> ex.  Requiring the UA to determine the values of em and ex before
> determining the size of the page could require multiple passes through the
> document.

What multiple passes?  I'm not talking about resizing the page box for every
page based on the fonts used on it.  I am talking about using a size based
upon ONE SPECIFIC FONT DEFINITION.  My initial thinking was that it would be
should be the same as that used by the root element of the document. 
Thinking further on this has caused me to come to the conclusion that it 
should be a  font defined by the page box, a definition that would also be
inherited by the margin boxes it contains.  Even if my old premise of using
the font definition used by the root element was followed (or if the page
box
were to inherit its font definition from the root element), I showed in my
previous
post [1] that it WOULD NOT REQUIRE MULTIPLE PASSES.  The only thing that
would be added was one specific change in the normal order of
calculating "computed values".

> On another note, I don't see that the document author gains much in
clarity
> of style sheets or usability of CSS properties by allowing the use of em
>and ex. 

The main benefit is actually to an implementer of a UA, in that
the definition of <length> will not need to be special cased for
properties that occur in the page box.  The side benefit of being
able to define the page in terms of a font is agreeably a minor benefit.

> Points and picas are units of absolute length rather than relative units.
> The other relative unit, px (pixel) is device dependent.  Images printed
in
> a  300 dot per inch device may not be the same size as one rendered on
> a 600 dpi device. The same pitfall of device dependence holds for
> specifying the page size in pixels.

And yet "px" is allowed and has been since CSS 2. The exclusion of "em"
and "ex" could be justified for CSS 2,  in that it would require supporting
a font context for the page box, solely for the point of supporting the use
of "em" and "ex".  As I showed in my previous post in this thread, with
the introduction of margin-boxes that can have text content, there is now
a reasonable use case for a font context in the page box, which the 
margin boxes would inherit from.

> [1] http://lists.w3.org/Archives/Public/www-style/2004Feb/0296.html
> [2] http://www.unicode.org/versions/Unicode4.0.0/ch03.pdf, D4, Page 64.
Received on Tuesday, 17 February 2004 16:32:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:26 GMT