From c8be9204688dcc9161cc3402e3a386bf8cfaecfe Mon Sep 17 00:00:00 2001 From: Jordan Pittman Date: Mon, 9 May 2022 16:46:50 -0400 Subject: [PATCH] Use candidate object in applyImportant --- src/lib/generateRules.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib/generateRules.js b/src/lib/generateRules.js index b716f42c5..f55ef75fd 100644 --- a/src/lib/generateRules.js +++ b/src/lib/generateRules.js @@ -89,10 +89,13 @@ function applyPrefix(matches, context) { return matches } -function applyImportant(matches, classCandidate) { +function applyImportant(matches, parsed) { if (matches.length === 0) { return matches } + + let classCandidate = parsed.withoutVariants + let result = [] for (let [meta, rule] of matches) { @@ -482,7 +485,7 @@ function* resolveMatches(candidate, context) { matches = applyPrefix(matches, context) if (important) { - matches = applyImportant(matches, classCandidate) + matches = applyImportant(matches, parsed) } for (let variant of variants) {