deprecatedUtilities() — tailwindcss Function Reference
Architecture documentation for the deprecatedUtilities() function in canonicalize-candidates.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD bb32b231_eeca_e30f_ed47_176639e2cf30["deprecatedUtilities()"] 2038620e_696f_2a0a_ba6b_40f989551872["printUnprefixedCandidate()"] bb32b231_eeca_e30f_ed47_176639e2cf30 -->|calls| 2038620e_696f_2a0a_ba6b_40f989551872 74157cfe_4a6c_d75a_a5ac_16fa6909752f["parseCandidate()"] bb32b231_eeca_e30f_ed47_176639e2cf30 -->|calls| 74157cfe_4a6c_d75a_a5ac_16fa6909752f 4cd99e59_ac1e_2a1f_0946_33cc1afd2532["get()"] bb32b231_eeca_e30f_ed47_176639e2cf30 -->|calls| 4cd99e59_ac1e_2a1f_0946_33cc1afd2532 style bb32b231_eeca_e30f_ed47_176639e2cf30 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