The single active menu link is marked with the class active. The trail from that item to the root of the menu should be similarly marked up with an active-trail class.
The styling of the active trail is still under design. Having the markup will at least allow us to style the links when the design is ready.

| Comment | File | Size | Author |
|---|---|---|---|
| #1 | Screenshot of active-trail classes in the DOM of the interactive menu | 41.29 KB | sjbassett |
| #1 | 1827296-JS-adding-active-trail-class-01.patch | 640 bytes | sjbassett |
| toolbar-active-trail.png | 193.44 KB | jessebeach |
Comments
Comment #1
sjbassett commentedPatched the toolbar.js file to have jQuery find all li parents of the active link scoped to the `interactive-menu`. This is my first patch ever so any feedback on how I can do this better, please comment.
jQuery('.interactive-menu a.active').parents('.interactive-menu li').addClass('active-trail');Comment #3
benjifisher@sjbassett:
In order to make the test bot happy, you have to attach a patch against core. If you have your version of the code in the working tree, then this ought to do it:
In order to make humans happy, do this *in addition to* the sort of patch you used in #1, but name it "...do-not-test.patch" so the test bot knows to ignore it.
No opinion on whether you found the right place to put the code.
Is there any difference in efficiency between
.parents('.interactive-menu li')and (untested).parentsUntil('.interactive-menu', 'li')?We may also want PHP code to add the "active-trail" class in case JS is disabled. Or maybe I am being paranoid, and disabled JS is a problem of the past.
Comment #4
jessebeach commentedThis has been addressed in #1137920-227: Fix toolbar on small screen sizes and redesign toolbar for desktop.
Comment #5
jessebeach commented