Skip to content

Commit

Permalink
feat: accept commas between transformations
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomura committed Nov 17, 2024
1 parent fb848a7 commit 9b237e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/stylesheet/src/transform/transform.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const parse = (transformString) => {
const transforms = transformString.trim().split(/\) |\)/);
const transforms = transformString.trim().split(/\)[ ,]|\)/);

// Handle "initial", "inherit", "unset".
if (transforms.length === 1) {
Expand All @@ -15,7 +15,7 @@ const parse = (transformString) => {
const [name, rawValue] = transform.split('(');
const splitChar = rawValue.indexOf(',') >= 0 ? ',' : ' ';
const value = rawValue.split(splitChar).map((val) => val.trim());
parsed.push({ operation: name, value });
parsed.push({ operation: name.trim(), value });
}
}

Expand Down

0 comments on commit 9b237e4

Please sign in to comment.