←back to thread

391 points OuterVale | 1 comments | | HN request time: 1.087s | source
Show context
myfonj ◴[] No.42059426[source]
NB, that style does not play well with non-native DPI (e.g. when you have monitor set to 150% scale); to see it mapped to physical pixels, try running this in the browser's console:

    with(document.documentElement.style){
      transform = `scale(${ 1 / devicePixelRatio })`;
      transformOrigin = 'top left';
    }
(multiply the scale by whole number to get it "crisply zoomed").

Still not 100% perfect, but much closer to intended rendering, I guess.

replies(1): >>42068232 #
1. paulirish ◴[] No.42068232[source]
Wow, your use of `with` is both terrifying and super fresh. I love/hate it.