Home / Function/ isAtRuleVariant() — tailwindcss Function Reference

isAtRuleVariant() — tailwindcss Function Reference

Architecture documentation for the isAtRuleVariant() function in migrate-variant-order.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  b3948c6e_ed8b_00c4_5c29_df98ab2469d3["isAtRuleVariant()"]
  0b5eaab6_9345_179e_f96e_cde6155e1ac1["migrateVariantOrder()"]
  0b5eaab6_9345_179e_f96e_cde6155e1ac1 -->|calls| b3948c6e_ed8b_00c4_5c29_df98ab2469d3
  b676c746_a7f5_6343_837c_c251627d3cd1["getAppliedNodeStack()"]
  b3948c6e_ed8b_00c4_5c29_df98ab2469d3 -->|calls| b676c746_a7f5_6343_837c_c251627d3cd1
  style b3948c6e_ed8b_00c4_5c29_df98ab2469d3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/@tailwindcss-upgrade/src/codemods/template/migrate-variant-order.ts lines 64–71

function isAtRuleVariant(designSystem: DesignSystem, variant: Variant) {
  // Handle the dark variant as an at-rule variant
  if (variant.kind === 'static' && variant.root === 'dark') {
    return true
  }
  let stack = getAppliedNodeStack(designSystem, variant)
  return stack.every((node) => node.kind === 'at-rule')
}

Subdomains

Frequently Asked Questions

What does isAtRuleVariant() do?
isAtRuleVariant() is a function in the tailwindcss codebase.
What does isAtRuleVariant() call?
isAtRuleVariant() calls 1 function(s): getAppliedNodeStack.
What calls isAtRuleVariant()?
isAtRuleVariant() is called by 1 function(s): migrateVariantOrder.

Analyze Your Own Codebase

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

Try Supermodel Free