From c5902bca7b5c548f054f2fa23f20dc100404827c Mon Sep 17 00:00:00 2001 From: Lance Willett Date: Wed, 15 Aug 2012 05:56:24 +0000 Subject: [PATCH] Twenty Twelve: selector for navigation menu should style the menu list element, props obenland, see #21562. Also remove duplicate line-height rule, props bradthomas127. See #21577. git-svn-id: https://develop.svn.wordpress.org/trunk@21520 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-content/themes/twentytwelve/js/theme.js | 5 +++++ wp-content/themes/twentytwelve/style.css | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-content/themes/twentytwelve/js/theme.js b/wp-content/themes/twentytwelve/js/theme.js index f624945a7e..cf284b36d8 100644 --- a/wp-content/themes/twentytwelve/js/theme.js +++ b/wp-content/themes/twentytwelve/js/theme.js @@ -10,6 +10,11 @@ jQuery( document ).ready( function( $ ) { timeout = false; $.fn.smallMenu = function() { + if ( ! masthead.find( '.menu' ).children().length ) { + $( '.menu-toggle' ).remove(); + return; + } + masthead.find( '.site-navigation' ).removeClass( 'main-navigation' ).addClass( 'main-small-navigation' ); masthead.find( '.site-navigation h3' ).removeClass( 'assistive-text' ).addClass( 'menu-toggle' ); diff --git a/wp-content/themes/twentytwelve/style.css b/wp-content/themes/twentytwelve/style.css index 40c0e51ce5..cf26e51736 100644 --- a/wp-content/themes/twentytwelve/style.css +++ b/wp-content/themes/twentytwelve/style.css @@ -507,7 +507,7 @@ a:hover { } /* Navigation Menu */ -.main-navigation { +.main-navigation .menu { display: inline-block; margin-top: 24px; margin-top: 1.714285714rem; @@ -1286,7 +1286,6 @@ label ~ span.required { margin: 0.571428571rem 0 0; font-size: 13px; font-size: 0.928571429rem; - line-height: 1.846153846; line-height: 1.714285714; list-style-type: square; list-style-position: inside;