rule() — tailwindcss Function Reference
Architecture documentation for the rule() function in ast.ts from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD f4f92a3d_c13e_a751_8402_451ffa4c772f["rule()"] 81a639ec_bc2c_cf5e_48e3_3ae33426ae0a["cssAstToPostCssAst()"] 81a639ec_bc2c_cf5e_48e3_3ae33426ae0a -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f 3b7b5721_2ad8_b95c_e5b3_704c1dbf9939["postCssAstToCssAst()"] 3b7b5721_2ad8_b95c_e5b3_704c1dbf9939 -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f 556f6ab2_af7d_ed90_84f0_6b49e632571a["substituteAtApply()"] 556f6ab2_af7d_ed90_84f0_6b49e632571a -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f a6e11c3d_c962_0a65_d91f_6fbe955cf4f0["optimizeAst()"] a6e11c3d_c962_0a65_d91f_6fbe955cf4f0 -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f 3b6a2079_7f12_42cd_ba9f_a57ecec4366d["buildPluginApi()"] 3b6a2079_7f12_42cd_ba9f_a57ecec4366d -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f 11c177f7_f682_15b6_46e0_5cff60c4a5a6["objectToAst()"] 11c177f7_f682_15b6_46e0_5cff60c4a5a6 -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f c0d9b918_4b8c_8efd_d0a2_c73e574b0ebc["parseVariantValue()"] c0d9b918_4b8c_8efd_d0a2_c73e574b0ebc -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f 666b100e_8313_09d0_334c_b0fc7e6b9d54["applyVariant()"] 666b100e_8313_09d0_334c_b0fc7e6b9d54 -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f 957946b3_94ca_8f71_30eb_76a6281c51df["theme()"] 957946b3_94ca_8f71_30eb_76a6281c51df -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f 253418a1_4f08_cf0e_5b8e_c6392b9959eb["parse()"] 253418a1_4f08_cf0e_5b8e_c6392b9959eb -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f 95cb326e_6b59_0903_0c96_d221fca5c2b1["parseCss()"] 95cb326e_6b59_0903_0c96_d221fca5c2b1 -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f 537db6f9_ffa5_12bf_0cec_283e545c7822["alphaReplacedShadowProperties()"] 537db6f9_ffa5_12bf_0cec_283e545c7822 -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f f82aa221_959b_12a7_fef5_44d13694b11e["alphaReplacedDropShadowProperties()"] f82aa221_959b_12a7_fef5_44d13694b11e -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f c067616f_e276_458d_2166_c9f10e6fcc93["createVariants()"] c067616f_e276_458d_2166_c9f10e6fcc93 -->|calls| f4f92a3d_c13e_a751_8402_451ffa4c772f style f4f92a3d_c13e_a751_8402_451ffa4c772f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/tailwindcss/src/ast.ts lines 87–93
export function rule(selector: string, nodes: AstNode[] = []): StyleRule | AtRule {
if (selector.charCodeAt(0) === AT_SIGN) {
return parseAtRule(selector, nodes)
}
return styleRule(selector, nodes)
}
Domain
Subdomains
Calls
Called By
Source
Frequently Asked Questions
What does rule() do?
rule() is a function in the tailwindcss codebase.
What does rule() call?
rule() calls 2 function(s): parseAtRule, styleRule.
What calls rule()?
rule() is called by 14 function(s): alphaReplacedDropShadowProperties, alphaReplacedShadowProperties, applyVariant, buildPluginApi, createVariants, cssAstToPostCssAst, objectToAst, optimizeAst, and 6 more.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free