Rework menu navigation: these changes build off pull request #239 for issue #200

* Only set button and menu if container is not null.
 * Break up the "return early" conditional into multiple parts.
 * Shorten the name of the toggled class from `toggled-on` to `toggled`.
 * Restore the "Hide menu toggle button if menu is empty." documentation.
 * Remove the `nav-menu` class. The previous code would replace any custom custom classes applied via `wp_nav_menu()` or template file.
 * Replace the `nav-menu` selector is style.css with selectors that will target both a custom nav menu and a page menu. These changes could use critical feedback. Do you know of an edge case where they might not work as expected?
This commit is contained in:
Michael Fields 2013-06-16 20:29:17 -07:00
parent 75f612d365
commit 4c396f6f9b
2 changed files with 23 additions and 21 deletions

View file

@ -447,7 +447,8 @@ a:active {
@media screen and (max-width: 600px) {
.menu-toggle,
.main-small-navigation ul.nav-menu.toggled-on {
.navigation-main.toggled ul.menu,
.navigation-main.toggled div.menu > ul {
display: block;
}
@ -456,6 +457,7 @@ a:active {
}
}
/* =Content
----------------------------------------------- */