From ea48d8514b785a3ef40d4939a310925c361195f0 Mon Sep 17 00:00:00 2001 From: allancole Date: Fri, 16 Nov 2018 00:13:32 +0000 Subject: [PATCH] Updating Twenty Nineteen, our new default theme for 2019, set for 5.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This update changes the following: - Improve menu UI to support keyboard navigation in both directions - Improve more-menu-link visibility when no menu items are hidden - Improve text-selection custom colors for better contrast and legibility - Improve support for sticky toolbars in the editor - Improve table element fonts - Add .button class support - Remove translation escaping - Fix menu JS to prevent unused touched event listeners - Fix duplicate more-menu-link issue on selective refresh in the customizer - Fix editor font-weights for headings - Fix search form input style - Fix nested blockquote styles - Fix download block button style when download text stretches more than one line - Fix audio block centering issue - Fix align-full blocks in the editor so they don’t create horizontal scrollbars - Fix editor to prevent Gutenberg's meta boxes area from overlapping the content Initial development occurred on GitHub. See: https://github.com/WordPress/twentynineteen Props allancole, karmatosed, kjellr, yingling017, mrasharirfan, milana_cap, fabiankaegy, westonruter, aaronjorbin, ntwb, b-07, khleomix, audrasjb, nielslange, mmaumio, richsalvucci, littlebigthing, dimadin, joyously, anevins12, peterwilsoncc, DannyCooper, WPprodigy, siriokun, briannaorg, 00travelgirl00, shahjehanali1, ianbelanger79, nadim1992, Ismail-elkorchi, nativeinside, iamchetanp, grappler, ocean90, joshfeck, frankew, abdulwahab610, mendezcode, eliorivero, melchoyce, jasmussen, laurelfulford, mdawaffe, kraftbj, dereksmart, naokomc, mayukojpn, enodekciw, chetansatasiya, ketuchetan, atanas-angelov-dev, carolinan, sharazghouri, artisan-asad, mukeshpanchal27, mukesh27, burhandodhy, @crunnells, aryaprakasa, tlxo, themeroots, whizbangik, yingles, tlxo, youthkee, brentswisher, smy315, ahmadawais, desi-developer, 2ndkauboy, mor10. git-svn-id: https://develop.svn.wordpress.org/branches/5.0@43904 602fd350-edb4-49c9-b593-d223f7449a82 --- .../twentynineteen/inc/color-patterns.php | 31 ++-- .../twentynineteen/inc/template-functions.php | 12 +- .../themes/twentynineteen/js/priority-menu.js | 167 ++++++++++++------ .../js/touch-keyboard-navigation.js | 151 ++++++++++++---- .../themes/twentynineteen/print.css | 51 +++++- .../themes/twentynineteen/print.scss | 61 ++++++- .../themes/twentynineteen/readme.txt | 12 +- .../twentynineteen/sass/blocks/_blocks.scss | 16 +- .../sass/elements/_elements.scss | 2 +- .../twentynineteen/sass/elements/_tables.scss | 1 + .../twentynineteen/sass/forms/_buttons.scss | 13 +- .../twentynineteen/sass/forms/_fields.scss | 9 + .../navigation/_menu-main-navigation.scss | 34 +++- .../sass/site/primary/_posts-and-pages.scss | 11 ++ .../sass/site/secondary/_widgets.scss | 1 - .../sass/variables-site/_fonts.scss | 16 +- .../themes/twentynineteen/style-editor.css | 115 ++++-------- .../themes/twentynineteen/style-editor.scss | 98 ++++------ .../themes/twentynineteen/style-rtl.css | 115 +++++++----- .../themes/twentynineteen/style.css | 115 +++++++----- 20 files changed, 664 insertions(+), 367 deletions(-) diff --git a/src/wp-content/themes/twentynineteen/inc/color-patterns.php b/src/wp-content/themes/twentynineteen/inc/color-patterns.php index e2f4e982c1..ba8cb0ea23 100644 --- a/src/wp-content/themes/twentynineteen/inc/color-patterns.php +++ b/src/wp-content/themes/twentynineteen/inc/color-patterns.php @@ -26,17 +26,20 @@ function twentynineteen_custom_colors_css() { * @param int $saturation Color saturation level. */ - $saturation = absint( apply_filters( 'twentynineteen_custom_colors_saturation', 100 ) ); - $saturation = $saturation . '%'; + $saturation = absint( apply_filters( 'twentynineteen_custom_colors_saturation', 100 ) ); + $saturation = $saturation . '%'; - $lightness = absint( apply_filters( 'twentynineteen_custom_colors_lightness', 33 ) ); - $lightness = $lightness . '%'; + $saturation_selection = absint( apply_filters( 'twentynineteen_custom_colors_saturation_selection', 50 ) ); + $saturation_selection = $saturation_selection . '%'; - $lightness_hover = absint( apply_filters( 'twentynineteen_custom_colors_lightness_hover', 23 ) ); - $lightness_hover = $lightness_hover . '%'; + $lightness = absint( apply_filters( 'twentynineteen_custom_colors_lightness', 33 ) ); + $lightness = $lightness . '%'; - $lightness_selection = absint( apply_filters( 'twentynineteen_custom_colors_lightness_selection', 90 ) ); - $lightness_selection = $lightness_selection . '%'; + $lightness_hover = absint( apply_filters( 'twentynineteen_custom_colors_lightness_hover', 23 ) ); + $lightness_hover = $lightness_hover . '%'; + + $lightness_selection = absint( apply_filters( 'twentynineteen_custom_colors_lightness_selection', 90 ) ); + $lightness_selection = $lightness_selection . '%'; $theme_css = ' /* @@ -82,7 +85,7 @@ function twentynineteen_custom_colors_css() { * - Widget links */ a, - a:visited, + a:not(.button):visited, .main-navigation .main-menu > li, .main-navigation ul.main-menu > li > a, .post-navigation .post-title, @@ -168,10 +171,10 @@ function twentynineteen_custom_colors_css() { /* Text selection colors */ ::selection { - background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_selection . ' ); /* base: #005177; */ + background-color: hsl( ' . $primary_color . ', ' . $saturation_selection . ', ' . $lightness_selection . ' ); /* base: #005177; */ } ::-moz-selection { - background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_selection . ' ); /* base: #005177; */ + background-color: hsl( ' . $primary_color . ', ' . $saturation_selection . ', ' . $lightness_selection . ' ); /* base: #005177; */ }'; $editor_css = ' @@ -186,7 +189,8 @@ function twentynineteen_custom_colors_css() { .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color), .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:hover .wp-block-button__link:not(.has-text-color), .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:focus .wp-block-button__link:not(.has-text-color), - .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:active .wp-block-button__link:not(.has-text-color) { + .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:active .wp-block-button__link:not(.has-text-color), + .editor-block-list__layout .editor-block-list__block .wp-block-file .wp-block-file__textlink { color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */ } @@ -209,7 +213,8 @@ function twentynineteen_custom_colors_css() { /* Hover colors */ .editor-block-list__layout .editor-block-list__block a:hover, - .editor-block-list__layout .editor-block-list__block a:active { + .editor-block-list__layout .editor-block-list__block a:active, + .editor-block-list__layout .editor-block-list__block .wp-block-file .wp-block-file__textlink:hover { color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_hover . ' ); /* base: #005177; */ } diff --git a/src/wp-content/themes/twentynineteen/inc/template-functions.php b/src/wp-content/themes/twentynineteen/inc/template-functions.php index 7ed60f8f49..8ee4f0d4f8 100644 --- a/src/wp-content/themes/twentynineteen/inc/template-functions.php +++ b/src/wp-content/themes/twentynineteen/inc/template-functions.php @@ -205,19 +205,19 @@ function twentynineteen_add_ellipses_to_nav( $nav_menu, $args ) { if ( 'menu-1' === $args->theme_location ) : - $nav_menu .= '