Viewport Size

Allow viewport height units. Allow to use float as size.
example:  1.5em;  33vh;
This commit is contained in:
Stuardo -StR- Rodríguez 2016-02-18 11:15:58 -05:00
parent a4540dc118
commit 331eef1f57

View file

@ -1112,7 +1112,7 @@
var height = val;
var heightUnit = 'px';
if (height && _.isString(height)) {
var match = height.match(/^([0-9]+)(px|em|rem)?$/);
var match = height.match(/^([0-9]*\.[0-9]+|[0-9]+)(px|em|rem|vh|vw)?$/);
if (!match) {
throw new Error('Invalid height');
}