Skip to content

lnavarro/calc-polyfill

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A Polyfill for CSS3 calc()

This is a javascript poly fill for the CSS3 calc-function. Inspired by selectivizr and the original poly fill: CJKay/PolyCalc.

Usage

Simply drop the link like this after you included your CSS:

<script type="text/javascript" src="path/to/calc.js"></script> 

Unfortunatly there is no test for support of calc(). But you can use conditional loading of Modernizr like this:

Modernizr.load({
  test: Modernizr.csscalc,
  nope: 'path/to/calc.js'
});

Dependencies

  • support for document.querySelectorAll()

About

A Polyfill for CSS3 calc()

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published