W3C home > Mailing lists > Public > www-style@w3.org > April 2016

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

From: Florian Rivoal <florian@rivoal.net>
Date: Thu, 21 Apr 2016 13:28:09 +0900
Message-Id: <9FC04A65-9836-4F87-8C0D-8AA0E5ADE44A@rivoal.net>
To: CSS WG <www-style@w3.org>

(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

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:02 UTC