Skip to content

jordyvandomselaar/ViewportPolyfill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Viewport Polyfill

Polyfill for all of your viewport units in css! VH, VW, VMIN, VMAX.

How to use it

  • Clone or download this repo
  • Read instructions inside viewportPolyfill.js (I promise, it's easy!)
  • Run node viewportPolyfill.js

How it works

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.

What you'll get

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!

Why I built it

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 :)

About

Polyfill for all of your viewport units in css! VH, VW, VMIN, VMAX.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published