From 67dbadd476c93b8957f3aab0c037abbb56cf4ac9 Mon Sep 17 00:00:00 2001 From: Tammie Lister Date: Tue, 25 Oct 2016 16:51:35 +0000 Subject: [PATCH] Twenty Seventeen: Display scroll down arrow when no menu This improves scrollability without a menu. Props nnaimov, melchoyce, davidakennedy Fixes #38392 Built from https://develop.svn.wordpress.org/trunk@38909 git-svn-id: http://core.svn.wordpress.org/trunk@38852 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../themes/twentyseventeen/assets/js/global.js | 4 ++-- wp-content/themes/twentyseventeen/style.css | 18 +++++++++++++----- .../template-parts/header/site-branding.php | 4 ++++ wp-includes/version.php | 2 +- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/wp-content/themes/twentyseventeen/assets/js/global.js b/wp-content/themes/twentyseventeen/assets/js/global.js index 14863b09ee..1f707b3384 100644 --- a/wp-content/themes/twentyseventeen/assets/js/global.js +++ b/wp-content/themes/twentyseventeen/assets/js/global.js @@ -10,7 +10,7 @@ $navWrap = $navigation.find( '.wrap' ), $navMenuItem = $navigation.find( '.menu-item' ), $menuToggle = $navigation.find( '.menu-toggle' ), - $menuScrollDown = $navigation.find( '.menu-scroll-down' ), + $menuScrollDown = $body.find( '.menu-scroll-down' ), $sidebar = $body.find( '#secondary' ), $entryContent = $body.find( '.entry-content' ), $formatQuote = $body.find( '.format-quote blockquote' ), @@ -143,7 +143,7 @@ $( document ).ready( function() { // Let's fire some JavaScript! - if ( 'true' === twentyseventeenScreenReaderText.has_navigation ) { + if ( $menuScrollDown.length ) { /** * 'Scroll Down' arrow in menu area diff --git a/wp-content/themes/twentyseventeen/style.css b/wp-content/themes/twentyseventeen/style.css index 53dab0ec9d..16d69baea7 100644 --- a/wp-content/themes/twentyseventeen/style.css +++ b/wp-content/themes/twentyseventeen/style.css @@ -1464,7 +1464,7 @@ a:hover .nav-title, /* Scroll down arrow */ -.navigation-top .menu-scroll-down { +.site-header .menu-scroll-down { display: none; } @@ -3514,24 +3514,32 @@ article.panel-placeholder { display: none; } - .site-navigation-fixed.navigation-top .menu-scroll-down { + .site-navigation-fixed.site-header.menu-scroll-down { display: none; } /* Scroll down arrow */ - .navigation-top .menu-scroll-down { - color: #767676; + .site-header .menu-scroll-down { display: block; padding: 0.5em 0.5em 0.4em; position: absolute; right: 0; - top: 0.9em; -webkit-transform: rotate(90deg); /* Chrome, Safari, Opera */ -ms-transform: rotate(90deg); /* IE 9 */ transform: rotate(90deg); } + .site-header .menu-scroll-down { + color: #fff; + top: 2em; + } + + .site-header .navigation-top .menu-scroll-down { + color: #767676; + top: 0.9em; + } + .menu-scroll-down:focus { outline: thin dotted; } diff --git a/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php b/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php index ffa668d15e..5ba9117375 100644 --- a/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php +++ b/wp-content/themes/twentyseventeen/template-parts/header/site-branding.php @@ -27,5 +27,9 @@ + + 'next' ) ); ?> + + diff --git a/wp-includes/version.php b/wp-includes/version.php index c967bbde4c..4655ef4e0d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38908'; +$wp_version = '4.7-alpha-38909'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.