applyImportant() — tailwindcss Function Reference
Architecture documentation for the applyImportant() function in compile.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 56a8f250_915d_aea4_3d75_5c379bef9a8a["applyImportant()"] eea0ec96_6369_abc2_64b3_490868392e31["compile.ts"] 56a8f250_915d_aea4_3d75_5c379bef9a8a -->|defined in| eea0ec96_6369_abc2_64b3_490868392e31 8b088e47_7f37_81e9_fe8a_5da6d3f5e245["compileAstNodes()"] 8b088e47_7f37_81e9_fe8a_5da6d3f5e245 -->|calls| 56a8f250_915d_aea4_3d75_5c379bef9a8a style 56a8f250_915d_aea4_3d75_5c379bef9a8a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/compile.ts lines 309–323
function applyImportant(ast: AstNode[]): void {
for (let node of ast) {
// Skip any `AtRoot` nodes — we don't want to make the contents of things
// like `@keyframes` or `@property` important.
if (node.kind === 'at-root') {
continue
}
if (node.kind === 'declaration') {
node.important = true
} else if (node.kind === 'rule' || node.kind === 'at-rule') {
applyImportant(node.nodes)
}
}
}
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does applyImportant() do?
applyImportant() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/compile.ts.
Where is applyImportant() defined?
applyImportant() is defined in packages/tailwindcss/src/compile.ts at line 309.
What calls applyImportant()?
applyImportant() is called by 1 function(s): compileAstNodes.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free