bokand.github.io icon indicating copy to clipboard operation
bokand.github.io copied to clipboard

Firefox >= 67 implements "minimum scale size" fixed viewport sizing

Open theres-waldo opened this issue 6 years ago • 2 comments

Firefox, as of version 67, now implements Chromium's "minimum scale size" model for sizing the fixed viewport. That is to say:

  • It computes a "minimum scale" as the largest of the "intrinsic minimum" (the scale where the page content fits the screen *), any minimum-scale from the meta viewport tag, and 0.25.
  • It computes a "minimum scale size" as the size of the visual viewport when zoomed out to the minimum scale, and sizes the "fixed viewport" to that.
  • The "fixed viewport" thusly sized determines the attachment of position: fixed elements, the extents to which you can scroll if the page is overflow: hidden, and the scroll port that governs window.scrollX/Y movements.

These changes have been landing incrementally since Firefox 65, but it should all be in place as of Firefox 67 (which is in beta as of the time of this writing).

(*) There is a remaining known inconsistency with Chromium regarding the "intrinsic minimum" scale: Firefox computes it as the larger of the scale where the content height fits the visual viewport height, and the scale where the content width fits the visual viewport width. Chromium seems to consider the width only. This is tracked in bug 1508177 and we plan to align with the Chromium behaviour here too.

theres-waldo avatar Apr 08 '19 19:04 theres-waldo

That's great news, thanks for your work here! I'll try to play around and see if I can spot any issues and update the documentation.

BTW, is Firefox implementing the VisualViewport API? I believe Safari is turning it on soon.

With all three of us aligning on the major pieces around viewports it'd be great to start smoothing out some of the details and finally reach interop in this space. I'm currently tied up with other things but once I finish that I'd love to get back to this and start formally specifying the behaviors we all agree on and fixing the few places we don't.

bokand avatar Apr 12 '19 16:04 bokand

I'll try to play around and see if I can spot any issues and update the documentation.

Thanks!

BTW, is Firefox implementing the VisualViewport API? I believe Safari is turning it on soon.

Yep. We already have an implementation behind a pref. Enabling it by default is one of the next viewport-related things I'm planning to look at :)

With all three of us aligning on the major pieces around viewports it'd be great to start smoothing out some of the details and finally reach interop in this space. I'm currently tied up with other things but once I finish that I'd love to get back to this and start formally specifying the behaviors we all agree on and fixing the few places we don't.

That sounds great!

theres-waldo avatar Apr 12 '19 16:04 theres-waldo