←back to thread

391 points OuterVale | 2 comments | | HN request time: 0.001s | source
1. 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 #
2. paulirish ◴[] No.42068232[source]
Wow, your use of `with` is both terrifying and super fresh. I love/hate it.