Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
menu system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Feb 2015 at 14:39 UTC
Updated:
7 Mar 2015 at 09:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
joelpittetYou know what would be really helpful here... .menu-item--leaf class. But that may be out of scope of this issue. Is there another issue to rename this class @mortendk?
I double checked, there is no other uses of the 'leaf' class than li elements in core but it is very generic a class name needs some BEM!
Comment #2
mortendk commentedi dont think we should rename anything here . just clean the csslint.
yes im a bit anti scope creep, but hey gets the job done
Comment #3
lewisnymanThis is an example of an issue were we need to this about the entire component, because if we weaken the selector in Seven we introduce potential for regressions because the module CSS is now stronger, if we change the module CSS we should also look at Bartik. We can use #1995272: [Meta] Refactor module CSS files inline with our CSS standards to add issues that affect all themes, so we can tackle it everywhere in one go.
Comment #4
joelpittetComment #5
joelpittetComment #6
joelpittetOk hopefully this is on the right track?
Comment #7
lewisnymanThis is looking really good :) mmm tidier CSS
Just making sure this is an intentional removal? I don't see how it fits within the scope of this issue.
Is the menu-item class supposed to be replacing the leaf class or extending it?
Comment #8
lewisnymanWe are going to need some thorough visual regression testing
Comment #9
joelpittetOH YES first and last removal was intentional.
RE:
1) It's not being used in CSS, already removed in menu build.
2) Extending. It's a type of menu-item (with no children)
Comment #10
mortendk commented+1 on this ... even that my heart burns over the epic scope creep ;)
I fully support killing of the leaf class its an edge case -its terrible in so many ways.
Do we even have a list of all the places we have menus.
Also do we need em in seven, classy, stark, bartik ?
Comment #11
joelpittetOh yeah should have mentioned. li
.leaf's use was already covered by.menu li's CSS. Which is now covered by.menu-item... and that was it's only use in core. If there is an easy way to add it back through contrib (either extendingMenuLinkTree::build()or doing it in the template...) and we can document that process then I think it would be safe to remove completely. It's an edge case indeed(when you need to style childless menu items different from ones with children, which you can do by targeting.menu-link--expanded/.menu-link--collapsedand excluding the styles on the children without it).I've checked all of core for leaf, there was just that class and the class addition which is now
.menu-item--leaf.Comment #12
mortendk commentedi might be biased but i have a hard time to see .leaf come under our basic rule or "building for the 80%" usecase.
Its one of these old Drupal4.7 things that are still sticking around, cause that was how we used to do it.
Lets try not to carry on all the bagage from ye old days :)
Comment #13
joelpittetFixed a couple of bugs in the toolbar and reviewed the changes a bit closer. Seems to be working out pretty well.
Comment #14
joelpittet@mortendk hook me up with documentation on how we can achieve the
.menu-item--leafclass without core and I'll gladly remove it in this patch... deal? Dare ya:PComment #15
mortendk commented@joel deal - point me to menu that have that leaf & ill make it hotpink for you :)
Comment #16
mortendk commentedomg im to tired wrong patch
Comment #17
joelpittetTurkey! :P Re-uploading 13
Comment #18
joelpittet@mortendk

Comment #19
lewisnymanI think people are able to do something like
.menu-item .menu-item .menu-itemto move down the structure of a menu, I don't think.leafcovers 80%Comment #20
joelpittet@LewisNyman yes and yes re #19 just doing some trading so we don't remove a "feature" without giving someone a fallback plan.
.menu-item-leaf=.menu-item:not(.menu-item-collapsed):not(.menu-item-expanded)OR the reverse just make the default .menu-item and override it on the other two which is the majority of cases.
Trying to get @mortendk to write the template example for determining and adding that class;) For good practice:P
Comment #21
mortendk commentedso your trying to get me to write the documentation so i can get .leaf out of core
... that pretty clever ;)
Comment #22
mortendk commentedTested!




Menu:
menu user
toolbar
toolbar stark with *.theme.css

toolbar stark with no theme css !

Comment #23
alexpottWe need a change record for this.
Comment #24
joelpittetCR added here https://www.drupal.org/node/2427579
Comment #25
mortendk commentedadded change notice: https://www.drupal.org/node/2427587 [#2427587]
Comment #26
alexpottThis looks wrong now.
This looks like this change might break it - depends if this is for an expanded details or menu... not sure.
Comment #27
davidhernandezI merged the change record for this issue with the one from #2425691: Remove .leaf/.menu-item--leaf from menu CSS components, per Alex's suggestion.
Comment #28
mortendk commented@alex your spot on the .addClass('active'); should be named to menu-item--active
the patch also needed some adjust ment after we removed leaf :)
Comment #29
davidhernandezMorten, your patch file is empty.
Comment #30
mortendk commentedand again ;)
Comment #31
mortendk commentedups
Comment #32
davidhernandezComment #35
davidhernandezLooks like changes to Seven's menus-and-lists from #17 when missing. I'm not seeing a comment that says it was intentional.
No idea why that file copy test is failing. I ran it locally and it passed after I made the Seven change. If that is the cause, good grief.
Comment #36
mortendk commented*shakes fist at testbot* look good to me
Comment #37
alexpottCSS is not frozen in beta. Committed 806def4 and pushed to 8.0.x. Thanks!
Comment #39
idebr commentedThis selector change broke the toggle for the primary navigation in Bartik. I have opened a followup at #2430735: Primary navigation toggle broken in Bartik to fix this.