substituteAtSlot() — tailwindcss Function Reference
Architecture documentation for the substituteAtSlot() function in variants.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 7d413960_20c6_4d5d_15db_b8648bd65a79["substituteAtSlot()"] b638ddb2_c057_1f3c_8a1a_4993ad80cd58["variants.ts"] 7d413960_20c6_4d5d_15db_b8648bd65a79 -->|defined in| b638ddb2_c057_1f3c_8a1a_4993ad80cd58 18e3ad78_ceaa_f1dc_df00_cefc3e549b9c["parseVariantValue()"] 18e3ad78_ceaa_f1dc_df00_cefc3e549b9c -->|calls| 7d413960_20c6_4d5d_15db_b8648bd65a79 63907b21_884d_e864_81c9_68f20a13c40b["fromAst()"] 63907b21_884d_e864_81c9_68f20a13c40b -->|calls| 7d413960_20c6_4d5d_15db_b8648bd65a79 4982d9ce_98d4_85d9_44af_7cc47b93c482["walk()"] 7d413960_20c6_4d5d_15db_b8648bd65a79 -->|calls| 4982d9ce_98d4_85d9_44af_7cc47b93c482 d09294cc_b29f_8605_b873_6cdc178ea33d["atRoot()"] 7d413960_20c6_4d5d_15db_b8648bd65a79 -->|calls| d09294cc_b29f_8605_b873_6cdc178ea33d 2f6881be_62d9_4b96_7331_a962ced095f7["atRule()"] 7d413960_20c6_4d5d_15db_b8648bd65a79 -->|calls| 2f6881be_62d9_4b96_7331_a962ced095f7 style 7d413960_20c6_4d5d_15db_b8648bd65a79 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/variants.ts lines 1195–1208
export function substituteAtSlot(ast: AstNode[], nodes: AstNode[]) {
walk(ast, (node) => {
// Replace `@slot` with rule nodes
if (node.kind === 'at-rule' && node.name === '@slot') {
return WalkAction.ReplaceSkip(nodes)
}
// Wrap `@keyframes` and `@property` in `AtRoot` nodes
else if (node.kind === 'at-rule' && (node.name === '@keyframes' || node.name === '@property')) {
Object.assign(node, atRoot([atRule(node.name, node.params, node.nodes)]))
return WalkAction.Skip
}
})
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does substituteAtSlot() do?
substituteAtSlot() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/variants.ts.
Where is substituteAtSlot() defined?
substituteAtSlot() is defined in packages/tailwindcss/src/variants.ts at line 1195.
What does substituteAtSlot() call?
substituteAtSlot() calls 3 function(s): atRoot, atRule, walk.
What calls substituteAtSlot()?
substituteAtSlot() is called by 2 function(s): fromAst, parseVariantValue.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free