Skip to content

Commit

Permalink
feat: Also check for CSS custom properties
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaetan Flament committed Dec 5, 2023
1 parent 8c37970 commit 8a8cfaf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/parse-variable.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ const findVars = (node, result, ignoreList) => {
return;
}

if (node instanceof Declaration && node.prop.startsWith('$') && !ignoreList.includes(node.prop) && fusvEnabled) {
if (
node instanceof Declaration &&
(node.prop.startsWith("$") || node.prop.startsWith("--")) &&
!ignoreList.includes(node.prop) &&
fusvEnabled
) {
result.push(new UnusedInfo(node));
return;
}
Expand Down

0 comments on commit 8a8cfaf

Please sign in to comment.