[css3-page] 'fit' unclear in various ways

The definition of the 'fit' property in [1] is unclear in the
following ways:

 1. It should be clearer that it is describing the scaling of the
    *contents* of the replaced element rather than changing the
    replaced element's box (i.e., the used width and used height).

 2. It should avoid the use of the term "containing box" when it
    means the element's box.  (It could easily be confused with
    "containing block".)

 3. It should avoid the use of "replaced object" where the standard
    term is "replaced element".

This would be addressed by using the following text (which is a subset
of the text in [2], which also covers other issues raised by others on
the member-confidential list): 

=====

The contents of a replaced element with an intrinsic aspect ratio
(which may be derived from intrinsic dimensions) are scaled as
follows, according to the values of the 'fit' property, to fit the
used height and used width of the replaced element's box.  Not all
replaced elements can be scaled, but images typically can.

fill
  Scale the height and width of the contents independently so that
  the edges of the content touch the edges of the box.

hidden
  If the element has intrinsic dimensions, do not scale the
  contents.  If it has no intrinsic dimensions but does have an
  intrinsic aspect ratio, do the same as 'meet'.  (ISSUE:  We could
  really pick any of the three values here; I picked 'meet'.)

meet
  Scale the contents of the element, preserving their aspect ratio,
  to the largest size such that the width of the contents is less
  than or equal to the used width of the box and the height of the
  contents is less than or equal to the height of the box.  (This is
  the smaller of (a) the size that scales the width of the contents
  to match the width of the box or (b) the size that scales the
  height of the contents to match the height of the box.)

slice
  Scale the contents of the element, preserving their aspect ratio,
  to the smallest size such that the width of the contents is
  greater than or equal to the used width of the box and the height
  of the contents is greater than or equal to the height of the box.
  (This is the larger of (a) the size that scales the width of the
  contents to match the width of the box or (b) the size that scales
  the height of the contents to match the height of the box.)

[ Continue with text after current definition list. ]

=====

This text also addresses two other issues that I'll raise shortly.

-David

[1] http://www.w3.org/TR/2006/WD-css3-page-20061010/#the-fit
[2] http://lists.w3.org/Archives/Member/w3c-css-wg/2006OctDec/0030

-- 
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

Received on Friday, 13 October 2006 03:43:02 UTC