[css3-page] different @page size requirements under different orientations

Hi,

Can someone explain this section of the @Page specification, specifically,
_why_ the declaration must be ignored:

If a size <http://www.w3.org/TR/css3-page/#size> property declaration is
> qualified by a ‘width’, ‘height’, ‘device-width’, ‘device-height’, ‘
> aspect-ratio’, ‘device-aspect-ratio’ or ‘orientation’ media query [MEDIAQ]
> <http://www.w3.org/TR/css3-page/#MEDIAQ> (or other conditional on the
> size of the paper), then the declaration must be ignored
> <http://www.w3.org/TR/CSS21/conform.html#ignore>. Media queries do not
> honor ‘size <http://www.w3.org/TR/css3-page/#size>’: they assume the
> paper size that would be chosen if no @page rules were specified.


I searched the archive for an answer, but the latest I could find about
this is from Bert Bos in
http://lists.w3.org/Archives/Public/www-style/2013Apr/0049.html:

The author may have added media queries for different sizes of paper.
> The choice above applies to whatever size results from applying those
> media queries, given the user's chosen paper.


This perspective clearly suggests the possibility to specify two different
@page { size: W H; } values in combination with media queries. That goes
counter to what the spec currently stipulates, but I cannot find an
explanation as to why.

We have a circumstance where this is preventing us from being able to
provide the user the desired solutions to her problem. Our product,
Presentate, is a fully web-based presentation tool that allows users to
create slides and "narrative" -- purposefully public speaker notes,
basically -- and for the Print stylesheet, we want to offer an optimized
solution for each orientation:

1. slides + narrative when in Portrait mode, resembling our "smartphone"
(small screen) layout with the presentation basically becoming a long-form
article with the narrative interspersed by their respective slide;
2. slides-only in Landscape mode, simulating the big-screen presentation
mode experience where you have the slides maximized to the available space
(screen or paper).

Specifically, the second option -- Landscape mode -- would provide a great
Print-to-PDF solution that users may want to use as a backup in case of
issues. But for that to actually work, the page size for Landscape would
have to match the (fixed) aspect ratio of our slides.

However, this doesn't quite work because browsers seem to adhere to this
part of the spec. When a precise size is specified, Chrome no longer
supports switching between Portrait and Landscape because the size cannot
be changed per orientation; Safari has similar and other issues (which I
consider to be bugs, but that's neither here nor there); Firefox adheres to
the spec and ignores these instructions.

There doesn't seem to be a particularly clear reason why this instruction
is supposed to be ignored under such a perfectly reasonable condition (our
use case may be specific, but Bert Bos' pointed out long ago that this may
be a perfectly common author desire, and I agree).

Apologies if this has been explained in detail somewhere and my searching
was simply insufficient. If not, I'd love to hear why this is spec'd this
way.

Thanks!
Faruk Ates

Received on Tuesday, 21 October 2014 18:03:32 UTC