UMD Web Utilities Library
    Preparing search index...

    Function isScreenZoomed

    • Detects if the browser window is zoomed beyond 100%

      Checks the device pixel ratio to determine if the user has zoomed in. Accounts for high DPI displays (Retina screens) by using different thresholds.

      Returns boolean

      True if zoomed beyond 100% (or 200% on high DPI displays)

      if (isScreenZoomed()) {
      // Adjust layout for zoomed view
      element.classList.add('zoomed-layout');
      }