shadcn-ui/ui

[bug]: Collapsible's weird pixel shift

cyz1901 opened this issue · 0 comments

Describe the bug

Hello team. When i use collapsible, Collapsible is a few pixels wider than CollapsibleTrigger. And CollapsibleTrigger is shifted down by a few pixels.
How can I make it so that the Collapsible is aligned with the top of the CollapsibleTrigger?

截屏2024-04-26 00 05 45 截屏2024-04-26 00 05 56

Affected component/components

Collapsible CollapsibleTrigger

How to reproduce

use test code

    <Collapsible className="w-full border-b border-[#dfe3e8]">
      <CollapsibleTrigger className="w-full h-12">
        <div className="w-full h-full flex flex-col justify-start items-start">
          <div className="w-auto bg-purple-700  rounded-bl rounded-br">
            <p className="text-sm text-white">ccc</p>
          </div>
        </div>
      </CollapsibleTrigger>
      <CollapsibleContent className="w-full">
        <a>aa</a>
      </CollapsibleContent>
    </Collapsible>

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

"react": "^18.2.0",
"react-dom": "^18.2.0",
"@radix-ui/react-collapsible": "^1.0.3",


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues