-moz-calc crossbrowser (polyfills? hooks?)

868 Views Asked by At

I'm working on some project currently in which I'm using LESS, CSS3 and some other "fancy" technologies. I have some piece of code which calculate height for me:

height: -moz-calc(100% - 40px);

I also use -moz-calc in couple other places to calculate some stuff. The problem is to make it working crossbrowser (O, Safari, Chrome, IE8+). It's kinda tricky even when I try to do it via JS (jquery), but some cases are really tricky unfortunately. So I'm looking for some kind of bullet proof solution with automatic updates, just like it was CSS' calc().

2

There are 2 best solutions below

3
On

http://caniuse.com/calc

https://developer.mozilla.org/en/CSS/calc

-webkit-calc (Available in the Chrome 19 Dev build, Should be available in the next Safari)

calc (IE9)

--- (Opera does not support it yet)

0
On

Webkit just landed prefixed calc() support. -webkit-calc() currently works in the Chrome dev build and should be included in the next release of Chrome and Safari.