8000 Fallback to non variant matches when no matching variant exists by thecrypticace · Pull Request #178 · tailwindlabs/tailwindcss-jit · GitHub
Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refactor
  • Loading branch information
thecrypticace committed Mar 28, 2021
commit b2e084062b6750afc69bfc6545639cba3171b685
6 changes: 3 additions & 3 deletions src/lib/generateRules.js
83E4
Original file line numberDiff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ function generateRules(candidates, context) {
}

if (context.classCache.has(candidate)) {
allRules.push(context.classCache.get(candidate))
allRules.push(...context.classCache.get(candidate))
continue
}

Expand All @@ -286,10 +286,10 @@ function generateRules(candidates, context) {
}

context.classCache.set(candidate, matches)
allRules.push(matches)
allRules.push(...matches)
}

return allRules.flat(1).map(([{ sort, layer, options }, rule]) => {
return allRules.map(([{ sort, layer, options }, rule]) => {
if (options.respectImportant) {
if (context.tailwindConfig.important === true) {
rule.walkDecls((d) => {
Expand Down