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

> 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