zurb/foundation — pull request #2616 by rvinay88 (2013-06-21 07:39:17+00:00)
Title: Pimping up emCalc

Fixes https://github.com/zurb/foundation/issues/2615

call emCalc with just values (10)

.body{
margin: emCalc(10 20 30 40);
}

or values with units (10px)

.body{
margin: emCalc(10px 20px 30px 40px);
}

returns

.body {
margin: 0.625em 1.25em 1.875em 2.5em;
}

use any number of parameters

.body{margin: emCalc(10px)}
.body{margin: emCalc(10px 20px)}
.body{margin: emCalc(10px 20px 30px)}
.body{margin: emCalc(10px 20px 30px 40px)}

Use multiple paremeters without units

.body{margin: emCalc(10)}
.body{margin: emCalc(10 20)}
.body{margin: emCalc(10 20 30)}
.body{margin: emCalc(10 20 30 40)}

Mix and match

.body{
margin: emCalc(10px 30 40px);
}