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.
It seems that #navigation .content ul and #navigation .content li aren't actually elements.
However, if you remove .content, the selectors work.
I can post a patch if someone can verify which class should be used there (maybe .section?) or whether the class should come out altogether.
Comments
Comment #1
JohnAlbinOh! Those CSS rules match blocks added to the navigation region.
The problem I've found when adding styling to unordered lists is that it also applies to the contextual links in D7 (the drop-down links when you hover over the little gear icon). The way I get around that is by adding the ".content" class since the contextual links are outside the $content variable and its div wrapper in all tpls.
But you are right, they don't match the $main_menu links printed out by theme_links(). Hmm… Well, that's what the #main-menu and #secondary-menu rules are for. Maybe we just need better comments to explain?
Comment #2
JohnAlbinOk. I've taken your suggestion and combined it with my reasoning for a .content class (but now with comments).
Thanks, Lin! You're in the CHANGELOG now.
Fixed. http://drupal.org/cvs?commit=501248