Files
ComfyUI_frontend/packages/tailwind-utils
dante01yoon 2870a8730f feat(dialog): migrate inline-style dialog callers to Reka renderer
The Reka DialogContent only accepts size/maximized/class — PrimeVue
inline `style` strings and `pt` section classes are dropped. Translate
the seven remaining style-string callers (mask editor, 3D viewers x4,
subscription dialogs x2) to renderer:'reka' + size/contentClass.

Infra to reach parity:
- dialogStore: add headerClass/bodyClass/footerClass (Reka-path
  replacements for pt.header/pt.content/pt.footer section styling)
- GlobalDialog: forward the section classes to DialogHeader/DialogFooter
  and merge bodyClass into the body wrapper
- DialogContent: maximized re-asserts its dimension classes after the
  caller's contentClass so maximize wins over fixed w/h, mirroring
  PrimeVue's .p-dialog-maximized !important behavior
- tailwind-utils: teach tailwind-merge the max-h-none class — without it
  'max-h-[80vh] max-h-none' keeps both and maximize cannot release the
  caller's max-height

The mask-editor-dialog hook class moves from pt.root to contentClass so
browser_tests selectors keep working unchanged.
2026-06-02 22:46:20 +09:00
..

@comfyorg/tailwind-utils

Shared Tailwind CSS utility functions for the ComfyUI Frontend monorepo.

Usage

The cn function combines clsx and tailwind-merge to handle conditional classes and resolve Tailwind conflicts.

import { cn } from '@comfyorg/tailwind-utils'

// Use with conditional classes (object)
<div :class="cn('transition-opacity', { 'opacity-75': !isHovered })" />

// Use with conditional classes (ternary)
<button
  :class="cn('px-4 py-2', isActive ? 'bg-blue-500' : 'bg-smoke-500')"
/>

Installation

This package is part of the ComfyUI Frontend monorepo and is automatically available to all workspace packages.

{
  "dependencies": {
    "@comfyorg/tailwind-utils": "workspace:*"
  }
}