WordPress.org

Make WordPress Core

Ticket #50182: 50182.diff

File 50182.diff, 8.3 KB (added by dboy1988, 12 months ago)
  • src/wp-content/themes/twentyfifteen/style.css

    diff --git src/wp-content/themes/twentyfifteen/style.css src/wp-content/themes/twentyfifteen/style.css
    index c97f019150..bfea5e64da 100644
    a:focus { 
    714714        margin-top: 0.5em;
    715715}
    716716
    717 .no-js .main-navigation ul ul {
     717.no-js .secondary {
    718718        display: block;
    719719}
     720.no-js button.secondary-toggle {
     721        display:none;
     722}
    720723
    721724.dropdown-toggle {
    722725        background-color: transparent;
  • src/wp-content/themes/twentyfourteen/functions.php

    diff --git src/wp-content/themes/twentyfourteen/functions.php src/wp-content/themes/twentyfourteen/functions.php
    index a8797f91a3..84a8fdeec3 100644
    if ( ! function_exists( 'is_customize_preview' ) ) : 
    689689                return ( $wp_customize instanceof WP_Customize_Manager ) && $wp_customize->is_preview();
    690690        }
    691691endif;
     692
     693/**
     694 * Handles JavaScript detection.
     695 *
     696 * Adds a `js` class to the root `<html>` element when JavaScript is detected.
     697 *
     698 */
     699function twentyfourteen_javascript_detection() {
     700        echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n";
     701}
     702add_action( 'wp_head', 'twentyfourteen_javascript_detection', 0 );
     703
  • src/wp-content/themes/twentyfourteen/header.php

    diff --git src/wp-content/themes/twentyfourteen/header.php src/wp-content/themes/twentyfourteen/header.php
    index 21d1a546cb..0f364799d7 100644
     
    1616<html class="ie ie8" <?php language_attributes(); ?>>
    1717<![endif]-->
    1818<!--[if !(IE 7) & !(IE 8)]><!-->
    19 <html <?php language_attributes(); ?>>
     19<html <?php language_attributes(); ?> class="no-js">
    2020<!--<![endif]-->
    2121<head>
    2222        <meta charset="<?php bloginfo( 'charset' ); ?>">
  • src/wp-content/themes/twentyfourteen/style.css

    diff --git src/wp-content/themes/twentyfourteen/style.css src/wp-content/themes/twentyfourteen/style.css
    index 5e09805b48..4365e78201 100644
    span + .edit-link:before, 
    934934        width: 48px;
    935935}
    936936
     937.no-js .search-toggle {
     938        display:none;
     939}
     940
    937941.search-toggle:hover,
    938942.search-toggle.active {
    939943        background-color: #41a62a;
    a.post-thumbnail:hover { 
    32743278                top: 10px;
    32753279        }
    32763280}
     3281@media(max-width:782px) {
     3282        .no-js .primary-navigation button.menu-toggle {
     3283                display:none;
     3284        }
     3285        .no-js .primary-navigation ul {
     3286                display:block;
     3287        }
     3288        .no-js .primary-navigation ul#primary-menu {
     3289                padding-top:50px;
     3290                padding-bottom:25px;
     3291        }
     3292        .no-js .primary-navigation ul li {
     3293                width:100%;
     3294                clear: both;
     3295        }
     3296}
    32773297
    32783298
    32793299@media screen and (max-width: 400px) {
  • src/wp-content/themes/twentythirteen/functions.php

    diff --git src/wp-content/themes/twentythirteen/functions.php src/wp-content/themes/twentythirteen/functions.php
    index cf9718c76c..584ce5893c 100644
    if ( ! function_exists( 'wp_body_open' ) ) : 
    825825                do_action( 'wp_body_open' );
    826826        }
    827827endif;
     828
     829/**
     830 * Handles JavaScript detection.
     831 *
     832 * Adds a `js` class to the root `<html>` element when JavaScript is detected.
     833 *
     834 */
     835function twentythirteen_javascript_detection() {
     836        echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n";
     837}
     838add_action( 'wp_head', 'twentythirteen_javascript_detection', 0 );
  • src/wp-content/themes/twentythirteen/header.php

    diff --git src/wp-content/themes/twentythirteen/header.php src/wp-content/themes/twentythirteen/header.php
    index 92c54e94ad..2795157179 100644
     
    1616<html class="ie ie8" <?php language_attributes(); ?>>
    1717<![endif]-->
    1818<!--[if !(IE 7) & !(IE 8)]><!-->
    19 <html <?php language_attributes(); ?>>
     19<html <?php language_attributes(); ?> class="no-js">
    2020<!--<![endif]-->
    2121<head>
    2222        <meta charset="<?php bloginfo( 'charset' ); ?>">
  • src/wp-content/themes/twentythirteen/style.css

    diff --git src/wp-content/themes/twentythirteen/style.css src/wp-content/themes/twentythirteen/style.css
    index 70f769b4ca..32213a28a7 100644
    footer.entry-meta { 
    30573057        div.nav-menu > ul {
    30583058                display: none;
    30593059        }
     3060        .no-js .main-navigation button.menu-toggle {
     3061                display:none;
     3062        }
     3063        .no-js .main-navigation ul {
     3064                display:block;
     3065        }
     3066        .no-js .main-navigation ul li {
     3067                width:100%;
     3068        }
    30603069
    30613070        #content .featured-gallery {
    30623071                padding-left: 24px;
  • src/wp-content/themes/twentytwelve/functions.php

    diff --git src/wp-content/themes/twentytwelve/functions.php src/wp-content/themes/twentytwelve/functions.php
    index 366514bd76..563d538e49 100644
    if ( ! function_exists( 'wp_body_open' ) ) : 
    719719                do_action( 'wp_body_open' );
    720720        }
    721721endif;
     722
     723/**
     724 * Handles JavaScript detection.
     725 *
     726 * Adds a `js` class to the root `<html>` element when JavaScript is detected.
     727 *
     728 */
     729function twentytwelve_javascript_detection() {
     730        echo "<script>(function(html){html.className = html.className.replace(/\bno-js\b/,'js')})(document.documentElement);</script>\n";
     731}
     732add_action( 'wp_head', 'twentytwelve_javascript_detection', 0 );
  • src/wp-content/themes/twentytwelve/header.php

    diff --git src/wp-content/themes/twentytwelve/header.php src/wp-content/themes/twentytwelve/header.php
    index 2888cd8ee3..a694e158ef 100644
     
    1616<html class="ie ie8" <?php language_attributes(); ?>>
    1717<![endif]-->
    1818<!--[if !(IE 7) & !(IE 8)]><!-->
    19 <html <?php language_attributes(); ?>>
     19<html <?php language_attributes(); ?> class="no-js">
    2020<!--<![endif]-->
    2121<head>
    2222<meta charset="<?php bloginfo( 'charset' ); ?>" />
  • src/wp-content/themes/twentytwelve/style.css

    diff --git src/wp-content/themes/twentytwelve/style.css src/wp-content/themes/twentytwelve/style.css
    index 98abf2bf27..3b7601d1c0 100644
    a:hover { 
    613613.menu-toggle {
    614614        display: inline-block;
    615615}
     616.no-js .main-navigation button.menu-toggle {
     617        display:none;
     618}
     619.no-js .main-navigation ul {
     620        display:block;
     621}
    616622
    617623/* Banner */
    618624section[role="banner"] {
  • src/wp-content/themes/twentytwenty/style.css

    diff --git src/wp-content/themes/twentytwenty/style.css src/wp-content/themes/twentytwenty/style.css
    index 8d902c5bc6..3708366b8f 100644
    body:not(.enable-search-modal) .site-logo img { 
    14691469
    14701470/* Header Navigation ------------------------- */
    14711471
    1472 .header-navigation-wrapper {
     1472.js .header-navigation-wrapper {
    14731473        display: none;
    14741474}
    14751475
     1476.no-js .header-navigation-wrapper nav.primary-menu-wrapper ul.primary-menu li,
     1477.no-js .header-navigation-wrapper nav.primary-menu-wrapper ul.primary-menu li a  {
     1478        text-align: center;
     1479        width:100%;
     1480        padding:0px;
     1481}
     1482
     1483.no-js .header-navigation-wrapper nav.primary-menu-wrapper ul.primary-menu {
     1484        padding-top:50px;
     1485}
     1486
    14761487/* Header Toggles ---------------------------- */
    14771488
    14781489.header-toggles {
    body:not(.enable-search-modal) .site-logo img { 
    14861497        padding: 0 2rem;
    14871498}
    14881499
     1500.no-js .header-inner .toggle {
     1501        display:none;
     1502}
     1503
    14891504.header-inner .toggle svg {
    14901505        display: block;
    14911506        position: relative;
    body:not(.enable-search-modal) .site-logo img { 
    15371552        top: 0;
    15381553}
    15391554
     1555.no-js .search-toggle {
     1556        display:none;
     1557}
     1558
    15401559.search-toggle .toggle-icon,
    15411560.search-toggle svg {
    15421561        height: 2.5rem;
    body:not(.enable-search-modal) .site-logo img { 
    15661585
    15671586/* Primary Menu ---------------------------- */
    15681587
    1569 .primary-menu-wrapper {
    1570         display: none;
    1571 }
    1572 
    15731588ul.primary-menu {
    15741589        display: flex;
    15751590        font-size: 1.8rem;
    ul.primary-menu { 
    16271642        right: -0.5rem;
    16281643        top: calc(50% - 0.4rem);
    16291644}
     1645.no-js .primary-menu > li > .icon {
     1646        display:none;
     1647}
    16301648
    16311649.primary-menu a {
    16321650        color: inherit;
    a.to-the-top > * { 
    57025720                display: flex;
    57035721        }
    57045722
     5723        .js .header-navigation-wrapper {
     5724                display:flex;
     5725        }
     5726
     5727        .no-js .header-navigation-wrapper nav.primary-menu-wrapper ul.primary-menu li, .no-js .header-navigation-wrapper nav.primary-menu-wrapper ul.primary-menu li a {
     5728                width:auto;
     5729                text-align: inherit;
     5730                padding:inherit;
     5731        }
     5732
     5733        .no-js .header-navigation-wrapper nav.primary-menu-wrapper ul.primary-menu {
     5734                padding-top:0px;
     5735        }
     5736
    57055737        .primary-menu-wrapper {
    57065738                display: block;
    57075739                width: 100%;