Re: Behavior of transform: rotate on <body> element.

On Sat, Nov 23, 2013 at 9:00 PM, Vivek Galatage <vivekg@chromium.org> wrote:
> I have come across the below situation in which we use "transform: rotate(180deg);" on the "<body>" element. http://jsbin.com/EQabAnE/2
>
> The first half of the image shows the behavior of Chrome, Safari and IE with respect to the transformation. The other half depicts the behavior of FF and Opera(12) with the same transformation.

This has nothing to do with Transforms; rather, it's a quirks mode
behavior.  In quirks mode, IE and webkit/blink make the body element
fill the viewport by default.  FF and old Opera apparently don't.  I
don't think this quirk has been documented, and it's unclear that it's
needed, since they act differently.

> The other scenario is just the div being transformed with rotate. http://jsbin.com/evAMiZaF/2. In this all browsers behave more or less the same way in which the scrollbar is also transformed to appear on the left hand side.
> The same is not applicable to the body element. i.e. if the body content is scrollable, the scrollbar still remains at the right hand side. http://jsbin.com/IVIvEXa/1

The body's scrollbar is owned by the viewport, not the body element.
This is not well-specified, I'll grant you, but it's interoperable in
every browser.  It wont' be affected by anything you do to the <body>.

~TJ

Received on Sunday, 24 November 2013 18:14:15 UTC