Making WordPress.org

Ticket #4476: 4467.diff

File 4467.diff, 2.7 KB (added by welcher, 6 years ago)

Initial patch

  • js/chapters.js

     
    1919        }
    2020
    2121        // Add our expandable button
    22         tocContainer.find( '> ul > .menu-item-has-children > a' )
     22        tocContainer.find( '> ul .menu-item-has-children > a' )
    2323                .wrap( '<div class="expandable"></div>' )
    2424                .after( '<button class="dashicons dashicons-arrow-down-alt2" aria-expanded="false"></button>' );
    2525
    2626        // Invisibly open all of the submenus
    27         jQuery( '.menu-item-has-children > ul ul' ).addClass( 'default-open' );
     27        jQuery( '.menu-item-has-children > ul ul' ).hide();
    2828
    2929        // Open the current menu
    3030        tocContainer.find( '.current-menu-item a' ).first()
     
    3434                .find( '> div > .dashicons' )
    3535                        .attr( 'aria-expanded', true );
    3636
     37        // Open the current submenu.
     38        tocContainer.find( '.current-menu-item > ul' ).show();
     39
    3740        // Or if wrapped in a div.expandable
    3841        jQuery( '.menu-item-has-children > div > .dashicons' ).click( function() {
    3942                var menuToggle = jQuery( this ).closest( '.menu-item-has-children' );
  • package.json

     
    1414        "matchdep": "~0.3.0"
    1515    }
    1616}
    17 
  • scss/main.scss

     
    545545                        width: 640px;
    546546                        margin: 0 auto;
    547547                }
    548                
     548
    549549        }
    550550        .color.section {
    551551                color: #fff;
     
    12821282                .comment-list li.depth-1,
    12831283                #comment-preview {
    12841284                        border: 1px solid #dfdfdf;
    1285                         border-radius: 2px;     
     1285                        border-radius: 2px;
    12861286                        width: 100%;
    12871287                }
    12881288
     
    16961696                a {
    16971697                        font-size: 68.6646px;
    16981698                        font-size: 6.86646rem;
    1699                
     1699
    17001700                        @media (max-width: 500px) {
    17011701                                font-size: 50px;
    17021702                                font-size: 5rem;
     
    21312131                display: block;
    21322132        }
    21332133        .current-menu-ancestor:not(.open) .expandable .dashicons:not(:focus),
    2134         .current-menu-item .expandable .dashicons:not(:focus) {
     2134        .current-menu-item > .expandable .dashicons:not(:focus) {
    21352135                background: #fff;
    21362136                color: #0073aa;
    21372137        }
  • stylesheets/main.css

     
    25172517}
    25182518
    25192519div[class*="-table-of-contents-container"] .current-menu-ancestor:not(.open) .expandable .dashicons:not(:focus),
    2520 div[class*="-table-of-contents-container"] .current-menu-item .expandable .dashicons:not(:focus) {
     2520div[class*="-table-of-contents-container"] .current-menu-item > .expandable .dashicons:not(:focus) {
    25212521  background: #fff;
    25222522  color: #0073aa;
    25232523}