shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
64.49k stars 3.66k forks source link

[bug]: "New" label gets underline during hover in sidebar #3481

Open imMatheus opened 3 months ago

imMatheus commented 3 months ago

Describe the bug

Small UI issue in the sidebar, when hovering over an option with the "new" label, it gets an underline, and looking at the code there seems to be a group-hover:no-underline class on the label, so it should not get an underline. The issue lies with the order of CSS specificity, and this can very easily be solved by just swapping the logic to only add the hover effect to the text and not the entire li and then removing the underline for the label only. I am more than willing to make a small PR fixing this 🙏

Screenshot 2024-04-14 at 16 08 44

Affected component/components

apps/www/components/sidebar-nav.tsx

How to reproduce

  1. Go to https://ui.shadcn.com/docs
  2. Hover over any option in the right sidebar that has the green "New" label (either Breadcrump or Input OTP)

Codesandbox/StackBlitz link

No codesandbox

Logs

No logs

System Info

Macbook pro m2 chip, google chrome

Before submitting

pratikwaware commented 3 months ago

Raised a PR for this fix.