Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-pixel values for viewport in fixed layout #738

Closed
dauwhe opened this issue Jun 21, 2016 · 7 comments
Closed

Non-pixel values for viewport in fixed layout #738

dauwhe opened this issue Jun 21, 2016 · 7 comments
Labels
Status-Deferred The issue has been deferred to another revision Topic-ContentDocs The issue affects EPUB content documents

Comments

@dauwhe
Copy link
Contributor

dauwhe commented Jun 21, 2016

We create many fixed-layout cookbooks which are not print replica. We would like these books to "occupy as much of the available application screen area as possible," and set the viewport size to 100vw by 100vh, but the spec doesn't allow for non-pixel values.

Encouraging more responsive fixed-layout content might be good for both usability and accessibility.

@dauwhe dauwhe added Topic-ContentDocs The issue affects EPUB content documents Cat-FXL Grouping label for all fixed layout related issues labels Jun 21, 2016
@iherman
Copy link
Member

iherman commented Jun 22, 2016

+1

@GarthConboy GarthConboy added the Status-Deferred The issue has been deferred to another revision label Jun 30, 2016
@GarthConboy
Copy link

Should be too late for major new stuff in 3.1 -- but, not an insane idea! :-)

There is certainly content floating around now that uses "device-height" and "device-width" for viewport aspect ratio (though not currently spec-allowed), but as it's in production content, it may be widely supported. Though, "device width/height" is not as useful as really referring to the ViewPort dimensions as proposed above.

There are issues with this request that would need to be considered -- for example, in landscape, should the width really be half the width for two-up pages? Would this be controlled by the rendition:spread and the RS would need to tune appropriately? What in the "auto" case?

And, I'm not sure how well real content using this mode would respond to layout in both tall/thin and short/fat aspect ratios. Could really good results be achieved?

@iherman
Copy link
Member

iherman commented Jun 30, 2016

But... isn't the usage of vh & Co. already allowed in 3.1 based on our own decisions? We rely on CSS snapshot for the CSS facilities; that document also refers to CSS Values and Units Module Level 3 as one of the constituent specifications, and that document defined the usage of vh in the section "Viewport-percentage lengths".

I understand the questions of @GarthConboy, and they have to be addressed, but that is not a new request for 3.1. These features are already "in" imho...

@mattgarrish
Copy link
Member

They're valid in style sheets, but not in the viewport meta tag.[1] The Apple documentation also allows 'device-height' and 'device-width', but otherwise we'd be breaking from its definition if we were to allow anything other than pixels. We probably want to be mindful of that, too.

[1] http://www.idpf.org/epub/31/spec/epub-contentdocs.html#sec-fxl-icb-html

@iherman
Copy link
Member

iherman commented Jun 30, 2016

Ah. I did not realize that.

I must admit it is confusing if the meta element essentially disallows using a perfectly fine CSS. It is a source for confusion...

@mattgarrish mattgarrish removed the Cat-FXL Grouping label for all fixed layout related issues label Jul 5, 2016
@JayPanoz
Copy link

JayPanoz commented Sep 7, 2016

And, I'm not sure how well real content using this mode would respond to layout in both tall/thin and short/fat aspect ratios. Could really good results be achieved?

background-size: cover | contain (MDN) and object-fit: cover | contain (MDN) + background-position and object-position should probably be mandatory for full-bleed then.

As for font-size, well, there’s vw and vh.

Question is—at least this is a question which comes to my mind—, what would be the benefits of such an option versus a blank page with media-queries à la web? From experience and for the record, the latter is something publishers are asking for as soon as we’re starting to design digital-only projects…

@dauwhe
Copy link
Contributor Author

dauwhe commented Jan 27, 2021

Yeah, interestingly <meta name="viewport" content="width=900, height=600"/> is not part of any real spec. The closest we come is a non-normative section of CSS Device Adaptation Level 1, which is only a WD. It does appear there are plans to revive the spec with an actual definition (since the normative parts of the spec with @viewport have been abandoned.

@dauwhe dauwhe closed this as completed Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status-Deferred The issue has been deferred to another revision Topic-ContentDocs The issue affects EPUB content documents
Projects
None yet
Development

No branches or pull requests

5 participants