deprecatedUtilities() — tailwindcss Function Reference
Architecture documentation for the deprecatedUtilities() function in canonicalize-candidates.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 01e4e3ab_c239_9968_db7d_75f3fe76fa96["deprecatedUtilities()"] 4ecd38ab_ffd3_a327_598e_f401f4635827["printUnprefixedCandidate()"] 01e4e3ab_c239_9968_db7d_75f3fe76fa96 -->|calls| 4ecd38ab_ffd3_a327_598e_f401f4635827 c98bf5b0_e31e_f92d_3810_96d1e1308d34["parseCandidate()"] 01e4e3ab_c239_9968_db7d_75f3fe76fa96 -->|calls| c98bf5b0_e31e_f92d_3810_96d1e1308d34 0aa64a1c_efd8_a69d_48ed_649b7a86c854["get()"] 01e4e3ab_c239_9968_db7d_75f3fe76fa96 -->|calls| 0aa64a1c_efd8_a69d_48ed_649b7a86c854 style 01e4e3ab_c239_9968_db7d_75f3fe76fa96 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/canonicalize-candidates.ts lines 1282–1305
function deprecatedUtilities(
candidate: Candidate,
options: InternalCanonicalizeOptions,
): Candidate {
let designSystem = options.designSystem
let signatures = designSystem.storage[UTILITY_SIGNATURE_KEY].get(options.signatureOptions)
let targetCandidateString = printUnprefixedCandidate(designSystem, candidate)
let replacementString = DEPRECATION_MAP.get(targetCandidateString) ?? null
if (replacementString === null) return candidate
let legacySignature = signatures.get(targetCandidateString)
if (typeof legacySignature !== 'string') return candidate
let replacementSignature = signatures.get(replacementString)
if (typeof replacementSignature !== 'string') return candidate
// Not the same signature, not safe to migrate
if (legacySignature !== replacementSignature) return candidate
let [replacement] = parseCandidate(designSystem, replacementString)
return replacement
}
Domain
Subdomains
Source
Frequently Asked Questions
What does deprecatedUtilities() do?
deprecatedUtilities() is a function in the tailwindcss codebase.
What does deprecatedUtilities() call?
deprecatedUtilities() calls 3 function(s): get, parseCandidate, printUnprefixedCandidate.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free