Changeset 30013
- Timestamp:
- 10/24/2014 03:14:02 PM (12 years ago)
- Location:
- trunk/src/wp-content/themes/twentyfifteen
- Files:
-
- 4 edited
-
css/ie.css (modified) (1 diff)
-
functions.php (modified) (1 diff)
-
js/functions.js (modified) (2 diffs)
-
style.css (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentyfifteen/css/ie.css
r30012 r30013 131 131 line-height: 1.8462; 132 132 margin-top: 0; 133 }134 135 .dropdown-toggle {136 margin-top: -21px;137 133 } 138 134 -
trunk/src/wp-content/themes/twentyfifteen/functions.php
r29892 r30013 220 220 wp_enqueue_script( 'twentyfifteen-script', get_template_directory_uri() . '/js/functions.js', array( 'jquery' ), '20141010', true ); 221 221 wp_localize_script( 'twentyfifteen-script', 'screenReaderText', array( 222 'expand' => '<span class="screen-reader-text">' . esc_html__( ' Expand', 'twentyfifteen' ) . '</span>',223 'collapse' => '<span class="screen-reader-text">' . esc_html__( ' Collapse', 'twentyfifteen' ) . '</span>',222 'expand' => '<span class="screen-reader-text">' . esc_html__( 'expand child menu', 'twentyfifteen' ) . '</span>', 223 'collapse' => '<span class="screen-reader-text">' . esc_html__( 'collapse child menu', 'twentyfifteen' ) . '</span>', 224 224 ) ); 225 225 } -
trunk/src/wp-content/themes/twentyfifteen/js/functions.js
r29893 r30013 10 10 11 11 // Add dropdown toggle that display child menu items. 12 $( '.main-navigation .page_item_has_children > a, .main-navigation .menu-item-has-children > a' ).a ppend( '<button class="dropdown-toggle" aria-expanded="false">' + screenReaderText.expand + '</button>' );12 $( '.main-navigation .page_item_has_children > a, .main-navigation .menu-item-has-children > a' ).after( '<button class="dropdown-toggle" aria-expanded="false">' + screenReaderText.expand + '</button>' ); 13 13 14 14 $( '.dropdown-toggle' ).click( function( e ) { … … 16 16 e.preventDefault(); 17 17 _this.toggleClass( 'toggle-on' ); 18 _this. parent().next( '.children, .sub-menu' ).toggleClass( 'toggled-on' );18 _this.next( '.children, .sub-menu' ).toggleClass( 'toggled-on' ); 19 19 _this.attr( 'aria-expanded', _this.attr( 'aria-expanded' ) === 'false' ? 'true' : 'false' ); 20 20 _this.html( _this.html() === screenReaderText.expand ? screenReaderText.collapse : screenReaderText.expand ); -
trunk/src/wp-content/themes/twentyfifteen/style.css
r30011 r30013 693 693 box-sizing: content-box; 694 694 content: ""; 695 display: block;696 font-size: 15px;697 font-size: 1.5rem;698 695 height: 42px; 699 696 padding: 0; 700 697 position: absolute; 701 top: 50%; 698 text-transform: lowercase; /* Stop screen readers to read the text as capital letters */ 699 top: 3px; 702 700 right: 0; 703 -webkit-transform: translateY(-50%);704 -ms-transform: translateY(-50%);705 transform: translateY(-50%);706 701 width: 42px; 707 702 } … … 2553 2548 2554 2549 .main-navigation ul { 2555 border-top: 1px solid #eaeaea;2556 2550 border-top: 1px solid rgba(51, 51, 51, 0.1); 2557 border-bottom: 1px solid #eaeaea;2558 2551 border-bottom: 1px solid rgba(51, 51, 51, 0.1); 2559 2552 } … … 5079 5072 .dropdown-toggle { 5080 5073 height: 32px; 5074 top: 4px; 5081 5075 width: 32px; 5082 5076 }
Note: See TracChangeset
for help on using the changeset viewer.