Having a weird issue, on Windows 10 in the screen settings on some laptops the default value (the recommended) is 125% so when opening a web page everything is to big because the page was build for 100%
How this can be handled? css? JS? honestly don't know how to approach this
Details:
Lenevo yoga 730 15inch
Thanks
To work around scaling issues, try the following methods: Log out and in Log out and log back in to the system. This improves how applications and elements are displayed when the monitor configuration changes. Select Display > Change the size of text, apps, and other items, and then adjust the slider for each monitor.
No, it doesn't affect video, that's the point of scaling rather than just changing the resolution.
In CSS you can use (not standard yet):
// refers to 125%
@media (-webkit-min-device-pixel-ratio: 1.25) { ... }
and
@media (-webkit-max-device-pixel-ratio: 1.25) { ... }
In Javascript you can use:
window.devicePixelRatio > 1.25 ? doA() : doB()
Reference:
-webkit-device-pixel-ratio - CSS: Cascading Style Sheets | MDN
Window.devicePixelRatio - Web API インターフェイス | MDN
You might try to add a viewport meta tag in the head section of your index.html:
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With