containsRule() — tailwindcss Function Reference
Architecture documentation for the containsRule() function in stylesheet.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD f4a0c827_2157_3b45_341e_8e95b4006a27["containsRule()"] b9897393_3e36_7806_d172_b9debcd215f6["Stylesheet"] f4a0c827_2157_3b45_341e_8e95b4006a27 -->|defined in| b9897393_3e36_7806_d172_b9debcd215f6 817bb61a_7ad0_1186_790a_6a40126eed80["run()"] 817bb61a_7ad0_1186_790a_6a40126eed80 -->|calls| f4a0c827_2157_3b45_341e_8e95b4006a27 style f4a0c827_2157_3b45_341e_8e95b4006a27 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/@tailwindcss-upgrade/src/stylesheet.ts lines 245–266
containsRule(cb: (rule: postcss.AnyNode) => boolean) {
let contains = false
this.root.walk((rule) => {
if (cb(rule)) {
contains = true
return false
}
})
if (contains) {
return true
}
for (let child of this.children) {
if (child.item.containsRule(cb)) {
return true
}
}
return false
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does containsRule() do?
containsRule() is a function in the tailwindcss codebase, defined in packages/@tailwindcss-upgrade/src/stylesheet.ts.
Where is containsRule() defined?
containsRule() is defined in packages/@tailwindcss-upgrade/src/stylesheet.ts at line 245.
What calls containsRule()?
containsRule() is called by 1 function(s): run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free