Re: [css3-values][css3-page] Viewport-percentage length units in the page context.

On Fri, Oct 19, 2012 at 1:26 PM, Simon Sapin <simon.sapin@kozea.fr> wrote:
> Le 19/10/2012 21:46, Tab Atkins Jr. a écrit :
>> On Fri, Oct 19, 2012 at 9:00 AM, Simon Sapin<simon.sapin@kozea.fr>  wrote:
>>> >I think that the only sane way to handle viewport-percentage units in
>>> > paged
>>> >media is to treat them like other layout-based percentages: keep the
>>> >percentage in the computed value and only convert it to an absolute unit
>>> > in
>>> >used values.
>>> >
>>> >This should not change the layout, even if these computed values end up
>>> >being inherited: the initial containing block is still the same. It
>>> > might be
>>> >visible in the CSSOM, but I’m not sure.
>>> >
>>> >Spec-wise however, this is in contradiction with the "Computed value"
>>> > line
>>> >of every property that accept <length>.
>>
>> No, this doesn't work.  It*will*  change the layout, because the page
>> size*is*  the initial containing block for the contents on that page.
>>
>>
>> It seems clear that this is a trivial circular dependency, and we
>> should resolve it in the standard way, which is just having them
>> compute to 'auto' or similar.
>
>
> Sorry, I should have made two separate threads. There are two separate
> issues:
>
> First, cycles: viewport units in <length> are based on the initial
> containing block which is based on the page size which is defined by
> properties that use length. We need one way or another to resolve those.

Yes - this is the "resolve to 'auto' or similar" bit.

> Second issue: if an element is fragmented over multiple pages, the page size
> may vary. However the computed value for eg. 'margin-left: 3vw' is supposed
> to be absolute. Does that mean that the element has *multiple* sets of
> computed values, one for each page?

Ah, good point.  They definitely have multiple sets of layout values -
one per fragment.  Computed values are meant to be attached to
elements, though.  This is a more interesting question.  Dunno!

~TJ

Received on Friday, 19 October 2012 20:37:34 UTC