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: Menu with title as a parent have active style #2125

Closed
maxscharwath opened this issue Jul 12, 2023 · 1 comment
Closed

bug: Menu with title as a parent have active style #2125

maxscharwath opened this issue Jul 12, 2023 · 1 comment
Assignees

Comments

@maxscharwath
Copy link

What version of daisyUI are you using?

v3.2.1

Describe your issue

<ul className="menu bg-base-200 w-56 rounded-box">
  <li>
    <h2 className="menu-title">Title</h2>
    <ul>
      <li><a>Item 1</a></li>
      <li><a>Item 2</a></li>
      <li><a>Item 3</a></li>
    </ul>
  </li>
</ul>

When clicking on <h2/> an active background is applied, i dont think it's supposed to be.

What browsers are you seeing the problem on?

Chrome

Reproduction URL

https://daisyui.com/components/menu/#menu-with-title-as-a-parent

@maxscharwath
Copy link
Author

maxscharwath commented Jul 12, 2023

There is a missing :not(.menu-title) here:

.menu li>*:not(ul):not(details):active,.menu li>*:not(ul):not(details).active,.menu li>details>summary:active {
    --tw-bg-opacity: 1;
    background-color: hsl(var(--n)/var(--tw-bg-opacity));
    --tw-text-opacity: 1;
    color: hsl(var(--nc)/var(--tw-text-opacity))
}

@saadeghi saadeghi self-assigned this Jul 12, 2023
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

2 participants