Skip to content

Commit

Permalink
improve variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinMalfait committed Mar 25, 2024
1 parent 8ba5c78 commit 6488984
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/tailwindcss/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function compile(css: string): {

// Track `@apply` information
let containsAtApply = css.includes('@apply')
let applyables = new Map<string, AstNode[]>()
let userDefinedApplyables = new Map<string, AstNode[]>()

// Find all `@theme` declarations
let theme = new Theme()
Expand All @@ -39,7 +39,7 @@ export function compile(css: string): {

// It could be that multiple definitions exist for the same class, so we
// need to track all of them.
let nodes = applyables.get(candidate) ?? []
let nodes = userDefinedApplyables.get(candidate) ?? []

// Add all children of the current rule to the list of nodes for the
// current candidate.
Expand All @@ -48,7 +48,7 @@ export function compile(css: string): {
}

// Store the list of nodes for the current candidate
applyables.set(candidate, nodes)
userDefinedApplyables.set(candidate, nodes)
}

// Drop instances of `@media reference`
Expand Down Expand Up @@ -181,7 +181,7 @@ export function compile(css: string): {
// Collect all user-defined classes for the current candidates that we
// need to apply.
for (let candidate of candidates) {
let nodes = applyables.get(candidate)
let nodes = userDefinedApplyables.get(candidate)
if (!nodes) continue

for (let child of nodes) {
Expand Down Expand Up @@ -209,7 +209,7 @@ export function compile(css: string): {
//
// When the user then uses `@apply flex`, we want to both apply
// the user-defined class and the utility class.
if (applyables.has(candidate)) return
if (userDefinedApplyables.has(candidate)) return

throw new Error(`Cannot apply unknown utility class: ${candidate}`)
},
Expand Down

0 comments on commit 6488984

Please sign in to comment.