I have made a small JS fiddle to demonstrate my problem. When you zoom in and out of the page with your browser, the max-width value that is being logged to the console changes, but in the CSS it is always going to be 500px. How can I find the original CSS value, for instance max-width, regardless of if you’re zoomed in or not?
I have made a small JS fiddle to demonstrate my problem. When you zoom
Share
In the end I had to use (this JavaScript plugin)[https://github.com/yonran/detect-zoom/] which provides the zoom level. In order to calculate the original CSS value, I just multiplied by the zoom level:
For instance, if the browser was zoomed in at the level of 2:
Which of course would return the original pixel value of 500px.