by kccqzy · 3mo ago · 0 comments
[0]: demo: https://mdn.github.io/dom-examples/screenleft-screentop/
(And yes, CSS can rotate around all three axes, so you could make a div that resists rotating your device in addition to resisting translation...)
Sometimes there is no size setting that will get the text lines on a page to fit horizontally without making the text too small to read. Making it large enough to read means lots of left and right scrolling which is annoying.
A mode where moving the phone sideways scrolls the text at a matching rate so that the experience is similar to reading a page with a magnifying glass might be handy.
That's an awfully big assumption. For starters, you're assuming that the browser window itself is centered on the screen, and that the device is centered in front of the user.
I don't think this is the point of centering an element horizontally at all, and the result you have created here is not at all what I as a user want.
Guess they think like the OP.
The same way the vertical centering counts the viewport height only, not the url bar and the tab bar.
Anyone got a Tampermonkey script or tiny extension to re-override this to make such sites actually center in the viewport, like I prefer?
PS: if you switch from the touchpad to a wireless mouse, we'll move the div accordingly
2. The demo doesn't even work, the div stays centered in the viewport, not the program window when I open a side bar (Firefox).
3. Rarely does my browser even cover the center of my workspace, so it would be impossible to center anything in the center of my view without forcibly moving the program window from within the website.