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

Typo on sidebar.tsx breaking team icon placement when collapsed #8

Closed
moatorres opened this issue Jan 30, 2025 · 1 comment
Closed

Comments

@moatorres
Copy link

There's a small typo on const sidebarMenuButtonVariants = cva(...) that's affecting the rendering of the Sidebar when collapsed. That's unrelated to TailwindCSS v4 itself. It causes the top left button/icon to be decentralized.

const sidebarMenuButtonVariants = cva(
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",

This group-data-[collapsible=icon]:p-2! syntax is invalid and requires a small fix:

- group-data-[collapsible=icon]:p-2!
+ group-data-[collapsible=icon]:!p-2

Happy to open a PR with the fix if needed.

@moatorres
Copy link
Author

Fixed by PR #7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant