Re: [csswg-drafts] [css-page-3] Add orientation descriptor (#4491)

OK. I'm not hugely invested in this one way or another so I will say my piece and go away.

I'm struggling because I can't imagine a general use-case that demonstrates how to get content onto the page that isn't already upright, according to its "most important direction", in the first place.

* extra wide table? Make the page landscape.
* landscape format image? Make the page landscape.

In both cases you would have to work much harder to display this content sideways on a portrait page. For a large image, for example, you'd have to override `image-orientation`, or apply a rotation `transform` to it. Making a large table come out sideways? Well I suppose you could try with `writing-mode` and `transform`.

I can see that there might be some value in rotating the _margin content_ in this case - for example, in Amelia's example above, if I were tasked with laying this table out in CSS I'd make it a landscape page. But if I knew it was being destined for a printed book, I might want to rotate the margin content by 90°, so when it's printed and bound, in portrait, the margin content is the right way up.

I think that's the opposite of your suggested purpose, but I suppose it's literally a question of perspective so perhaps it will do as a use-case.

---

For background: underlying my concerns is that the "Rotate" parameter in PDF is not great. It's not a simple Affine transformation - it rotates the page content, yes, and the coordinates of any annotations on the page. But the internal contents of those annotations are further rotated to try to keep them up the right way up. This doesn't matter if all you're doing is putting out static content, but if you're creating a PDF with form fields on it then creating the page with the correct orientation in the first place is a lot cleaner than creating the page sideways and setting "Rotate" to 90 or (worse) 180.

Clearly your intent is _not_ to replace `size: A4 landscape` with `size: A4; orientation: rotate-right`. That's good, but I am slightly concerned that if this property enters the spec, that's precisely what people will use it for. For that reason, I'd lean towards something like Tab's suggestion of `margin-orientation` myself.





-- 
GitHub Notification of comment by faceless2
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4491#issuecomment-590989830 using your GitHub account

Received on Tuesday, 25 February 2020 18:07:25 UTC