#6903·heroui

[BUG] - disclosure.css declares .accordion__heading instead of .disclosure__heading

Author: aosmcleodCreated Sep 24, 2026Updated Sep 24, 2026
Labelstype/bugP3pkg/styles

HeroUI Version

@heroui/styles 3.2.6 (current v3, fc433b027)

Describe the bug

packages/styles/components/disclosure.css has a rule for the Accordion block instead of the Disclosure block:

css
.accordion__heading {
  @apply flex;
}

Disclosure never outputs .accordion__heading. Its slot map (packages/styles/src/components/disclosure/disclosure.styles.ts) sets heading: "disclosure__heading", and Disclosure.Heading applies that class. As a result:

  • disclosure.css re-declares a rule that accordion.css already has (.accordion__heading { @apply flex; }), and
  • .disclosure__heading has no styles.

It looks like it was copied from accordion.css when Disclosure was first added (4f9122c61, "feat: disclosure completed").

Nothing looks broken today, because Accordion already gets display: flex from accordion.css. The problem is a stray rule in the wrong file, and it's confusing for anyone theming Disclosure: the file suggests the heading is a flex container when it isn't.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Open packages/styles/components/disclosure.css and note the .accordion__heading rule.
  2. Run git grep accordion__heading. The only markup that uses the class is Accordion (accordion.styles.ts).
  3. Render the Disclosure "Default" story and inspect [data-slot="disclosure-heading"]: it has class disclosure__heading and computed display: block. No rule in disclosure.css targets it.

Expected behavior

disclosure.css should only contain .disclosure* rules. The Accordion heading rule belongs in accordion.css only (it's already there).

Proposed fix: delete the stray rule from disclosure.css. I considered renaming it to .disclosure__heading, but that would be a visual change, not a cleanup:

  • The Disclosure "Basic" docs demo centres its Button slot="trigger" with text-center on an ancestor. A flex heading would ignore that and left-align the trigger.
  • The original demo from 4f9122c61 put className="text-center" directly on Disclosure.Heading, which only works if the heading is not a flex container. So the Disclosure heading was never meant to be flex.

Deleting the rule changes nothing visually. The compiled heroui.min.css stays the same size and still has exactly one .accordion__heading{display:flex} rule; the only difference is that the rule now appears in Accordion's section.

Screenshots or Videos

No response

Operating System Version

macOS (not OS-specific; this is in the CSS source)

Browser

Chrome