Skip to content

Avoid overlapping menus #71

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

Merged
merged 2 commits into from
Aug 2, 2023

Conversation

elchininet
Copy link
Contributor

This pull request uses progressive enhancement to fix an issue in the menus: if one menu is under focus, rollover in the next or previous menus provokes an overlaping. To fix this, the :has() peseudo class and the general sibling combinator have been used.

Notes

  1. :has() peseudo selector is supported by 87.03% of the global browsers usage and general sibling combinator is supported by 95.78% of the global browser usage.
  2. These selectors are not supported at all on Internet Explorer, so these rules will be completely ignored in these browsers, therefore the current behaviour is maintained.
  3. At the present time, Firefox still doesn‘t support the :has() pseudo class. They are working actively on it and they plan to release it soon, but to support this pseudo selector right now in this browser it is necessary the layout.css.has-selector flag. This means that in this browser, at the moment this pull request will fix the bug if one rolls over the menus before the focused menus (general sibling combinator) but it will not work if one rolls over the menus after them (:has() peseudo class).

Screencasts

Current behaviour

current-behaviour

Fix in Chrome

fix-chrome

Fix in Safari

fix-safari

Fix in Firefox

fix-firefox

Closes: #62

@vercel
Copy link

vercel bot commented Jul 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
7css ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2023 1:49pm

@elchininet elchininet marked this pull request as ready for review July 29, 2023 13:50
@khang-nd
Copy link
Owner

khang-nd commented Aug 2, 2023

Thanks @elchininet for fixing this. The PR is gorgeous-looking as well ✨

@khang-nd khang-nd merged commit 85709a7 into khang-nd:main Aug 2, 2023
@elchininet elchininet deleted the avoid_overlapping_menus branch August 2, 2023 16:43
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

Successfully merging this pull request may close these issues.

[Menu Bar] Overlapped Dropdown Menu
2 participants