simplifyArbitraryVariantCache() — tailwindcss Function Reference
Architecture documentation for the simplifyArbitraryVariantCache() function in candidate.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 1292c198_0f78_7986_6bab_1db0d75c2a12["simplifyArbitraryVariantCache()"] 669e6a28_c71f_3c5e_9c53_915cede7da78["candidate.ts"] 1292c198_0f78_7986_6bab_1db0d75c2a12 -->|defined in| 669e6a28_c71f_3c5e_9c53_915cede7da78 2d6c8361_96d8_df0d_ca51_c62f179fdc73["parse()"] 1292c198_0f78_7986_6bab_1db0d75c2a12 -->|calls| 2d6c8361_96d8_df0d_ca51_c62f179fdc73 e79308d2_473f_b6d6_3b04_e4e55c2708d3["toCss()"] 1292c198_0f78_7986_6bab_1db0d75c2a12 -->|calls| e79308d2_473f_b6d6_3b04_e4e55c2708d3 style 1292c198_0f78_7986_6bab_1db0d75c2a12 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
Defined In
Source
Frequently Asked Questions
What does simplifyArbitraryVariantCache() do?
simplifyArbitraryVariantCache() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/candidate.ts.
Where is simplifyArbitraryVariantCache() defined?
simplifyArbitraryVariantCache() is defined in packages/tailwindcss/src/candidate.ts at line 1093.
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