-
Notifications
You must be signed in to change notification settings - Fork 746
Description
Related to #5259.
I recently caused a compat issue in Firefox for making the layout viewport size more often a subpixel size. Here are the gory details, which amount basically to people making layout decisions based on window.innerWidth
, window.innerHeight
and so on. That seems a totally reasonable thing to do.
But turns out you can't do it in a sound way (the original page has issues in all browsers, just a different zoom levels / resolutions / etc). Well, I guess technically you can call getBoundingClientRect()
on a position: fixed; top: 0; left: 0; right: 0; bottom: 0
element, but that seems rather hackish.
So, I think we should either:
- Make these APIs return
double
s. - If that's not possible because of compat (which would be a bit sad, but plausible), introduce a new API for this?
Is there any context I'm missing? If not and people agree that this is better than the status quo, I'd be happy to experiment with this in Firefox and see what the compat impact might be.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status