Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Collapsible's weird pixel shift #3601

Open
cyz1901 opened this issue Apr 25, 2024 · 0 comments
Open

[bug]: Collapsible's weird pixel shift #3601

cyz1901 opened this issue Apr 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cyz1901
Copy link

cyz1901 commented Apr 25, 2024

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
@cyz1901 cyz1901 added the bug Something isn't working label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant