Twm.Types (Twm v0.1.0)

View Source

Common types used throughout the Twm library.

Summary

Types

Represents a parsed class name with its components.

Types

parsed_class_name()

@type parsed_class_name() :: %{
  modifiers: [String.t()],
  has_important_modifier: boolean(),
  base_class_name: String.t(),
  maybe_postfix_modifier_position: non_neg_integer() | nil,
  is_external: boolean() | nil
}

Represents a parsed class name with its components.

  • :modifiers - List of modifiers applied to the class (e.g., "hover", "focus", "dark")
  • :has_important_modifier - Boolean indicating if the class has the important modifier
  • :base_class_name - The core class name without modifiers
  • :maybe_postfix_modifier_position - Position of a postfix modifier if present
  • :is_external - Whether the class is external to Tailwind (when prefix doesn't match)