Invalidate candidates with bad variants up front
This commit is contained in:
parent
92d1664d2f
commit
7db4c3a403
6 changed files with 10 additions and 5 deletions
|
|
@ -201,6 +201,11 @@ function splitWithSeparator(input, separator) {
|
|||
function* resolveMatches(candidate, context) {
|
||||
let separator = context.tailwindConfig.separator
|
||||
let [classCandidate, ...variants] = splitWithSeparator(candidate, separator).reverse()
|
||||
|
||||
if (!variants.every((variant) => context.variantMap.has(variant))) {
|
||||
return []
|
||||
}
|
||||
|
||||
let important = false
|
||||
|
||||
if (classCandidate.startsWith('!')) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue