- From: Simon Sapin <simon.sapin@kozea.fr>
- Date: Thu, 15 Nov 2012 14:20:13 +0100
- To: "L. David Baron" <dbaron@dbaron.org>
- CC: www-style@w3.org
Le 11/11/2012 22:14, L. David Baron a écrit :
> 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')?
A concrete proposal for 2:
Viewport units (vw/vh/vmin/vmax) are not allowed in the following
properties:
- size
- margin-*
- border-*-width
- padding-*
- width
- height
when used directly inside @page. (They are allowed in page-margin boxes
or future at-rules inside @page.) If used anyway, the declaration is
invalid and ignored with the usual cascading rules.
This covers the most obvious cases, but is not enough. Consider:
@page { font-size: 1vw; width: 50em }
This one can be fixed by adding font-size to the list of properties
above, or adding font-based units to the list of forbidden units.
Also, the page context inherits from the root element:
:root { width: 50vw }
@page { width: inherit }
:root { width: auto; margin: 10vw }
@page { width: inherit }
:root { font-size: 1vw }
@page { width: 50em }
I don’t know what to do about these, short of having the page context
*not* inherit from anything.
Ideas?
--
Simon Sapin
Received on Thursday, 15 November 2012 13:20:41 UTC