W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2020

Re: [csswg-drafts] [css-viewport] Help me bikeshed "layout viewport" (#4819)

From: Simon Fraser via GitHub <sysbot+gh@w3.org>
Date: Mon, 02 Mar 2020 15:51:21 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-593470416-1583164280-sysbot+gh@w3.org>
> Since Florian called on me ...
> I do not understand the problem. Why isn't the layout viewport a viewport? Especially combined with pinch zoom, it is (you can zoom out until the entire layout viewport fits in the visual viewport, for instance).
> Also, why isn't the layout viewport used for layout? After all, it is the outermost containing block for your layout; the width: auto for the HTML element is relative to the layout viewport, and the HTML element is the basis for any CSS layout.

The initial containing block (which is "stuck" at the top of the document) is the one that's used for layout. The "layout viewport" moves when you scroll, and is only used for positioning fixed-position elements. It's also not really a viewport, because as soon as you zoom in, not all of the layout viewport is visible to the user.

If the page is not zoomed (zoom scale == 1) then the layout viewport is the same as the old and poorly named "client rect" used in getBoundingClientRect and friends.

GitHub Notification of comment by smfr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4819#issuecomment-593470416 using your GitHub account
Received on Monday, 2 March 2020 15:51:23 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:02 UTC