[BUG] - disclosure.css declares .accordion__heading instead of .disclosure__heading
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:
.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.cssre-declares a rule thataccordion.cssalready has (.accordion__heading { @apply flex; }), and.disclosure__headinghas 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
- Open
packages/styles/components/disclosure.cssand note the.accordion__headingrule. - Run
git grep accordion__heading. The only markup that uses the class is Accordion (accordion.styles.ts). - Render the Disclosure "Default" story and inspect
[data-slot="disclosure-heading"]: it has classdisclosure__headingand computeddisplay: block. No rule indisclosure.csstargets 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"withtext-centeron an ancestor. A flex heading would ignore that and left-align the trigger. - The original demo from 4f9122c61 put
className="text-center"directly onDisclosure.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
Source: heroui-inc/heroui