denoland / dotland

[Archived] deno.land website
https://deno.land
MIT License
957 stars 626 forks source link

Goofy header behavior #2591

Closed lino-levan closed 1 year ago

lino-levan commented 1 year ago

If you click on a section on the header, it will keep that section open even if the user's mouse leaves the hover area. This results in some goofy looking behavior in specific circumstances.

Reproc steps:

  1. Click "Modules" text
  2. Hover over "Docs"

Fix:

Screenshot 2022-11-15 at 2 43 59 PM
WittySmirk commented 1 year ago

We can't disable onclick behavior because it is essential for mobile.

Not quite sure how to disable on hover for the other nav elements once one is clicked because each nav element is seperated by 2 layers (you would have to disable the hover css for the parent of the parent's children).

I tried to do this but it doesnt seem to work

<input
     type="checkbox"
     id={entry.content}
     class="hidden checked:(siblings:last-child:block sibling:children:last-child:children:(odd:hidden even:block) parent:parent:children:hover:children(hidden))"
     autoComplete="off"
 />