- Clone or download this repo
- Read instructions inside viewportPolyfill.js (I promise, it's easy!)
- Run node viewportPolyfill.js
When you run node viewPolyfill.js it reads your target css file. After it has done that it exports a function that sets all the appropriate styles using javascript.
You'll get a function that you can run in your JavaScript. Reason for this is so that you can bind it in any events and so that it is easy to use!
I love building websites as much as you do and quite usually old internet browsers have to be supported. Yes, this is annoying. But, with all these polyfills on the internet it makes your life as well as mine a lot easier. This is one of those polyfills. It works a little different (you don't import it in your HTML) but the result is the same :)