forked from mirror/_s
Rework Navigation Menu Part 2
* Separate scoping and assignment so that a decision does not need to be made as to whether we should intermix spaces and tabs on the left * Restore the previously removed nav-menu class addition to the first unordered list in `#site-navigation`. * Restore the `.navigation-main.toggled-on .nav-menu` selector. * Remove rules for the `.main-small-navigation ul` selector.
This commit is contained in:
parent
4c396f6f9b
commit
ac3cda4543
|
@ -4,10 +4,9 @@
|
|||
* Handles toggling the navigation menu for small screens.
|
||||
*/
|
||||
( function() {
|
||||
var container = document.getElementById( 'site-navigation' ),
|
||||
button,
|
||||
menu;
|
||||
var container, button, menu;
|
||||
|
||||
container = document.getElementById( 'site-navigation' )
|
||||
if ( ! container )
|
||||
return;
|
||||
|
||||
|
@ -23,6 +22,9 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if ( -1 == menu.className.indexOf( 'nav-menu' ) )
|
||||
menu.className += ' nav-menu';
|
||||
|
||||
button.onclick = function() {
|
||||
if ( -1 != container.className.indexOf( 'toggled' ) )
|
||||
container.className = container.className.replace( ' toggled', '' );
|
||||
|
|
|
@ -441,14 +441,9 @@ a:active {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.main-small-navigation ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.menu-toggle,
|
||||
.navigation-main.toggled ul.menu,
|
||||
.navigation-main.toggled div.menu > ul {
|
||||
.navigation-main.toggled-on .nav-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue