simplifyArbitraryVariantCache() — tailwindcss Function Reference
Architecture documentation for the simplifyArbitraryVariantCache() function in candidate.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 38287293_0aa0_94c9_7fb7_8a8a4fa1e9c2["simplifyArbitraryVariantCache()"] 0638028e_f2f7_8e77_2f19_1bd2ce4b2d6a["parse()"] 38287293_0aa0_94c9_7fb7_8a8a4fa1e9c2 -->|calls| 0638028e_f2f7_8e77_2f19_1bd2ce4b2d6a f66dddcc_be1c_d082_4eb0_ec82ce3bf380["toCss()"] 38287293_0aa0_94c9_7fb7_8a8a4fa1e9c2 -->|calls| f66dddcc_be1c_d082_4eb0_ec82ce3bf380 style 38287293_0aa0_94c9_7fb7_8a8a4fa1e9c2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/candidate.ts lines 1093–1113
const simplifyArbitraryVariantCache = new DefaultMap<string, string>((input) => {
let ast = ValueParser.parse(input)
// &:is(…)
if (
ast.length === 3 &&
// &
ast[0].kind === 'word' &&
ast[0].value === '&' &&
// :
ast[1].kind === 'separator' &&
ast[1].value === ':' &&
// is(…)
ast[2].kind === 'function' &&
ast[2].value === 'is'
) {
return ValueParser.toCss(ast[2].nodes)
}
return input
})
Domain
Subdomains
Source
Frequently Asked Questions
What does simplifyArbitraryVariantCache() do?
simplifyArbitraryVariantCache() is a function in the tailwindcss codebase.
What does simplifyArbitraryVariantCache() call?
simplifyArbitraryVariantCache() calls 2 function(s): parse, toCss.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free