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
  7cecf5b5_1806_696f_2da0_f581e79d92cb["isAtRuleVariant()"]
  e3144eb9_0666_0bdb_e31d_1094b50abdd7["migrate-variant-order.ts"]
  7cecf5b5_1806_696f_2da0_f581e79d92cb -->|defined in| e3144eb9_0666_0bdb_e31d_1094b50abdd7
  4b9b4a6d_0786_22dc_60cb_a53dc01dd582["migrateVariantOrder()"]
  4b9b4a6d_0786_22dc_60cb_a53dc01dd582 -->|calls| 7cecf5b5_1806_696f_2da0_f581e79d92cb
  2af942fd_2eae_beac_fd40_b974cc7ed770["getAppliedNodeStack()"]
  7cecf5b5_1806_696f_2da0_f581e79d92cb -->|calls| 2af942fd_2eae_beac_fd40_b974cc7ed770
  style 7cecf5b5_1806_696f_2da0_f581e79d92cb 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, defined in packages/@tailwindcss-upgrade/src/codemods/template/migrate-variant-order.ts.
Where is isAtRuleVariant() defined?
isAtRuleVariant() is defined in packages/@tailwindcss-upgrade/src/codemods/template/migrate-variant-order.ts at line 64.
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