[css3-values] viewport units (vw/vh/vmin/vmax) and @page rules

http://dev.w3.org/csswg/css3-values/Overview.html#viewport-relative-lengths
defines the viewport-relative units 'vw', 'vh', 'vmin', and 'vmax'
as relative to the size of the initial containing block.

http://www.w3.org/TR/2011/REC-CSS2-20110607/visudet.html#containing-block-details
in turn says:
  # The containing block in which the root element lives is a
  # rectangle called the initial containing block. For continuous
  # media, it has the dimensions of the viewport and is anchored at
  # the canvas origin; it is the page area for paged media.

http://www.w3.org/TR/2011/REC-CSS2-20110607/page.html#page-area
in turn describes the page area as the area inside the page margins.
In particular:
  # The page box is a rectangular region that contains two areas:
  #
  # * The page area. The page area includes the boxes laid out on
  #   that page. The edges of the first page area establish the
  #   rectangle that is the initial containing block of the
  #   document. The canvas background is painted within and covers
  #   the page area.
  # * The margin area, which surrounds the page area. The page
  #   margin area is transparent. 
(While I'm here, shouldn't the first quote above also mention that
it's the first page?)


So, if we have:

  @page {
    margin-left: 10vw;
  }

should:
  (1) the user-agent try to solve the relevant equations to find a
  valid size for the page box given the margins?  (This seems like
  it might be doable in a few of the simple cases, but certainly
  isn't solvable in general.)

  (2) the declaration be ignored?

  (3) the declaration be treated as some other particular value
  (e.g., '0', 'auto')?

With css3-page, this problem becomes worse as the presence of the
'size' property defined in
http://dev.w3.org/csswg/css3-page/Overview.html#page-size-prop
means that we also have to describe how to handle either of:

  @page { size: 50vw 50vh; }
  @page { size: 50vh 50vw; }

which I think means that option (1) isn't realistic.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Sunday, 11 November 2012 22:58:27 UTC