ui
ui copied to clipboard
Remove class in child that forces left-0 on a centered menu
Subject: We should not force the dropdown window of navigation-menu.tsx to position: absolute and left: 0 when the menu itself is center.
Type: Bug
Current behaviour:

Desired behaviour:

@leabs is attempting to deploy a commit to the shadcn-pro Team on Vercel.
A member of the Team first needs to authorize it.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated |
|---|---|---|---|---|
| example-playground | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Feb 22, 2023 at 7:37AM (UTC) |
| ui | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Feb 22, 2023 at 7:37AM (UTC) |
@shadcn This might be better to set up this change as a component variant for a centered navigation-menu and leave the default classes as is. The left-0 makes things nice and aligned left for navigations that are left aligned (like https://ui.shadcn.com/) but breaks if the navigation menu is centered like the screenshots in the original post.
@leabs Looking into it. Thanks for the heads up.
This has been fixed. I'm closing this but feel free to re-open if not. Thanks for your help fixing this issue. Appreciate it.
more bugs...
Making the changes suggested to the NavigationMenuViewport this PR works for me