viewportwidth.js

A small JavaScipt utility to accurately report the viewport width.

Results

Notes

The shape above will change colors at the following media query breakpoints:
480, 640, 1024.

The shape will be maroon from 0px to 479px.

At 480px, the shape changes to purple.

At 640px, the shape changes to orange.

At 1024px and up, the shape changes to blue.

Styles