Skip to content

Commit adcc69c

Browse files
fixed regex in resolve-value.js
This fix will make work, when using nested CSS functions in the same declaration. See MadLittleMods#96
1 parent 4811ceb commit adcc69c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/resolve-value.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ 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*,\s*(.+))?\s*\)/);
13+
//var RE_VAR_FUNC = (/var\(\s*(--[^,\s]+?)(?:\s*,\s*(.+))?\s*\)/);
14+
var RE_VAR_FUNC = (/var\(\s*(--[^,\s]+?)(?:\s*,\s*([^)]+))?\s*\)/);
1415

1516
function toString(value) {
1617
return String(value);

0 commit comments

Comments
 (0)