[mediaqueries][css-page] MQs should respond to page size

Hi,

(This is listed as Issue 1 in css-page.)

The fact that the width, height, aspect-ratio, and orientation media queries do not respond to page sizes set in @page makes it really hard to do responsive design properly.

If you've designed your page using media queries to work well across a whole range of sizes, and you want to use the size property of @page to pick a size when printing, you're out of luck.

The page will be sized to what you asked, but the size that the query will respond to will not be that, but instead the size that the page would have had, had you not specified anything. Which is totally useless.

We've handled this for @viewport, and we should do it here as well.

The good news is that Chrome (which I believe is the only browser to honor @page's size property) already does it, as shown in this quick and dirty TC: http://jsbin.com/nabufum

 - Florian

Received on Thursday, 21 April 2016 04:28:35 UTC