Skip to content

Commit f396bea

Browse files
committed
Accept whitespace in var( --var ) expression
1 parent 62f2c85 commit f396bea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/resolve-value.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var cloneSpliceParentOntoNodeWhen = require('./clone-splice-parent-onto-node-whe
1010
// var() = var( <custom-property-name> [, <any-value> ]? )
1111
// matches `name[, fallback]`, captures "name" and "fallback"
1212
// See: http://dev.w3.org/csswg/css-variables/#funcdef-var
13-
var RE_VAR_FUNC = (/var\((--[^,\s]+?)(?:\s*,\s*(.+))?\)/);
13+
var RE_VAR_FUNC = (/var\(\s*(--[^,\s]+?)(?:\s*,\s*(.+))?\s*\)/);
1414

1515
function toString(value) {
1616
return String(value);

0 commit comments

Comments
 (0)