Viewport Size
Allow viewport height units. Allow to use float as size. example: 1.5em; 33vh;
This commit is contained in:
parent
a4540dc118
commit
331eef1f57
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue