Re: [css3-page][css3-mediaqueries] Page size conflicts

Le 17/02/2012 23:48, fantasai a écrit :
> Done.
>     http://dev.w3.org/csswg/css3-page/#page-size-prop
>     # If a size property declaration is qualified by a ‘width’, ‘height’,
>     # ‘device-width’, ‘device-height’, or ‘aspect-ratio’ media query [MEDIAQ]
>     # (or other conditional on the size of the paper), then the declaration
>     # must be ignored.

Should orientation and device-aspect-ratio be added to the list?

> There remains the question of what's possible to do here:
>
>     @page {
>       size: 4in 6in;
>     }
>     @media (max-width: 4in) {
>       div { background: blue; }
>     }
>
> Assuming a default paper width>  4in, is the background blue?

Nice. What about this one?

    @page :left {
      size: 4in 6in;
    }
    @page :right {
      size: 6in 4in;
    }
    @media (min-width: 5in) {
      div { background: blue; }
    }
    @media (max-width: 5in) {
      div { background: red; }
    }


Assuming there is a div with a page break, what color is its background? 
(And what is the computed value of background-color?)

And even without page breaks, we only know which page a box is on when 
doing layout, but the cascade is done much earlier than that.

I think the only sensible thing to allow in such media query rules is 
@page, except for the 'size' property.

Regards,

-- 
Simon Sapin

Received on Monday, 20 February 2012 08:06:37 UTC