-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conditional vertical align for submenu items #264
Comments
I'm unclear on what's not aligned on your screenshot? |
Would you set a class on the entire parent menu, or just the selected item? Where would this be defined, and do we already have logic in place to append a class to a menu or menu item? |
This would be applied to closest parent menu item, in current case it would be "Digital marketing". I was thinking WP menus admin, would that work? |
I think forcing via classes is a bad idea here, creates management nightmare, and nobody will understand why some menus work or don't work correctly. Automatic algo needs to improve here, instead. What is specifically going wrong with this real world sample? Maybe there needs to be a "smaller?" threshold of some kind? How can robots determine this sample should be aligned up top? |
From your screenshot it looks like the secondary menu is only a few pixels shorter than the parent menu. It would be easy to add a tolerance to the logic though what would we want it to look like? Should it be static ( |
For current case the hotfix works for me, so I'm all for patching it up and deploying live right now. Meanwhile for future cases we'll need to think of something else, because if the parent menu is last item, it would break. |
Maybe auto-expanding anything shorter is the way to go here. Create a try branch @anoblet? |
After eye-balling this some more in #265, I've reached a decision:
Only thing that #265 could do for us, is to ensure cc @heshfekry PS @anoblet We should also keep this full "height expand" implementation branch copy around to revisit at some later point, just in case, but let's avoid adding more complexity with it for now. |
Just so happened that MDs have been updated with additional courses since last check, effectively fixing this issue in hand. |
Follow-up to #253.
So currently we're limiting the alignment decision to whether submenu is larger or not vs parent.
Could we add a condition there to override the decision to do it manually via a parent menu class?
I'll show what I mean below.
This could very well be aligned, but its not because submenu is smaller than parent:
Creates inconsistency and doesn't fully feel like a mega-menu.
The text was updated successfully, but these errors were encountered: