Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regex in resolve-value.js to allow nested CSS functions #97

Merged
merged 17 commits into from
Nov 25, 2019
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/resolve-value.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ var cloneSpliceParentOntoNodeWhen = require('./clone-splice-parent-onto-node-whe
// var() = var( <custom-property-name> [, <any-value> ]? )
// matches `name[, fallback]`, captures "name" and "fallback"
// See: http://dev.w3.org/csswg/css-variables/#funcdef-var
var RE_VAR_FUNC = (/var\(\s*(--[^,\s]+?)(?:\s*,\s*(.+))?\s*\)/);
//var RE_VAR_FUNC = (/var\(\s*(--[^,\s]+?)(?:\s*,\s*(.+))?\s*\)/);
var RE_VAR_FUNC = (/var\(\s*(--[^,\s]+?)(?:\s*,\s*([^)]+))?\s*\)/);
MadLittleMods marked this conversation as resolved.
Show resolved Hide resolved

function toString(value) {
return String(value);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-css-variables",
"version": "0.12.0",
"version": "0.12.1",
MadLittleMods marked this conversation as resolved.
Show resolved Hide resolved
"description": "PostCSS plugin to transform CSS Custom Properties(CSS variables) syntax into a static representation",
"keywords": [
"postcss",
Expand Down