E472 [css-page-3] Add orientation descriptor · Issue #4491 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-page-3] Add orientation descriptor #4491

@chrishtr

Description

@chrishtr

TL;DR
Add the ability to rotate the rendered output of a page, for use in cases such as PDF output, and as a hint to printing code & devices.

Details
Currently, the level 3 paged media spec has a size property. This specifies the per-page constraints on layout.

It would be useful to also have an orientation descriptor, which could have values of portrait and landscape (*). This indicates the orientation of the final rendered page itself, without affecting layout. For example, if content had:

size: letter landscape
orientation: portrait

It would mean to layout the content in landscape layout mode, but then rotate the resulting rendered page sideways. If the print ended up in a PDF, then a user viewing the PDF would see the page visually rendered with height taller than width, and the content rotated 90 degrees.

This is useful in order to customize the visual display of a PDF, which is a very common way to "print" web pages.

(*) Alternatively, it could have three (four?) values: none, rotate-right, rotate-left (, upside-down?)

@xfq @fantasai

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0