Display Viewport Dimensions in Page

This Javascript snippet has proven to be one of my most useful helper scripts I embed at the bottom of a page while designing and developing pages. I found it somewhere long ago and hacked it up to be more useful to me. The script will output viewport dimensions in px and rem units.

This helper script is very helpful to determine where to use a breakpoint. The source is easy to read and easy to hack further. Enjoy it…

Leave a Reply