diff --git a/src/gridstack.js b/src/gridstack.js index 73bdd28..1a7967e 100644 --- a/src/gridstack.js +++ b/src/gridstack.js @@ -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'); }