Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
@Snugug, @ChinggizKhan, would you be open to take a patch to provide better classes for menus?
For instance: .root, .submenu, .mlid-[menulinkid]...
Not sure if something like that belongs to the base-theme, but it's worth considering...
I'd override theme_menu_link and theme_menu_tree and make sure the structure is as much backwards-compatible as possible.
There's also the possibility to provide a setting in the theme configuration to enable/disable this, but I'm afraid the performance hit would need to be measured before going forward with something like that.
thanks
Comments
Comment #1
Fidelix CreditAttribution: Fidelix commentedThe only way to provide these classes would be via module hooks, I think...