Home / Function/ rule() — tailwindcss Function Reference

rule() — tailwindcss Function Reference

Architecture documentation for the rule() function in variants.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  2afd4bc8_8773_552f_8cfb_323403b7f9a3["rule()"]
  b638ddb2_c057_1f3c_8a1a_4993ad80cd58["variants.ts"]
  2afd4bc8_8773_552f_8cfb_323403b7f9a3 -->|defined in| b638ddb2_c057_1f3c_8a1a_4993ad80cd58
  876035d0_94a8_cf2f_314a_d520aaae6e4b["createVariants()"]
  876035d0_94a8_cf2f_314a_d520aaae6e4b -->|calls| 2afd4bc8_8773_552f_8cfb_323403b7f9a3
  style 2afd4bc8_8773_552f_8cfb_323403b7f9a3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/tailwindcss/src/variants.ts lines 26–29

type VariantFn<T extends Variant['kind']> = (
  rule: Rule,
  variant: Extract<Variant, { kind: T }>,
) => null | void

Domain

Subdomains

Called By

Frequently Asked Questions

What does rule() do?
rule() is a function in the tailwindcss codebase, defined in packages/tailwindcss/src/variants.ts.
Where is rule() defined?
rule() is defined in packages/tailwindcss/src/variants.ts at line 26.
What calls rule()?
rule() is called by 1 function(s): createVariants.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free