💎 PREMIUM: Changeset/ - Collection

Changeset 46701


Ignore:
Timestamp:
11/11/2019 12:27:21 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Bundled Themes: Update Twenty Twenty.

This brings Twenty Twenty in sync with GitHub. For a full list of changes since 5.3 RC4, see https://github.com/WordPress/twentytwenty/compare/c267289...898792b.

Props williampatton, poena, andersnoren, desrosj, schlessera, leprincenoir, alextran, aristath, b-07.
See #48110, #48386, #48450, #48505.
Fixes #48557.

Location:
trunk/src/wp-content/themes/twentytwenty
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css

    r46613 r46701  
    320320}
    321321
     322.editor-styles-wrapper p.has-normal-font-size,
    322323.editor-styles-wrapper p.has-regular-font-size {
    323324    font-size: 1em;
  • trunk/src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css

    r46613 r46701  
    320320}
    321321
     322.editor-styles-wrapper p.has-normal-font-size,
    322323.editor-styles-wrapper p.has-regular-font-size {
    323324    font-size: 1em;
  • trunk/src/wp-content/themes/twentytwenty/assets/js/customize-controls.js

    r46446 r46701  
    1 /* global twentyTwentyBgColors, twentyTwentyColor, Color, jQuery, wp, _ */
     1/* global twentyTwentyBgColors, twentyTwentyColor, jQuery, wp, _ */
    22/**
    33 * Customizer enhancements for a better user experience.
     
    7575
    7676            // Get secondary color.
    77             value[ context ].secondary = Color( {
    78                 h: colors.bgColorObj.h(),
    79                 s: colors.bgColorObj.s() / 2,
    80                 l: ( colors.textColorObj.l() * 0.57 ) + ( colors.bgColorObj.l() * 0.43 )
    81             } ).toCSS();
     77            value[ context ].secondary = colors.bgColorObj
     78                .clone()
     79                .getReadableContrastingColor( colors.bgColorObj )
     80                .s( colors.bgColorObj.s() / 2 )
     81                .toCSS();
    8282        }
    8383
  • trunk/src/wp-content/themes/twentytwenty/assets/js/index.js

    r46668 r46701  
    3131    NodeList.prototype.forEach = function( callback, thisArg ) {
    3232        var i;
     33        var len = this.length;
    3334
    3435        thisArg = thisArg || window;
    3536
    36         for ( i = 0; i < this.length; i++ ) {
     37        for ( i = 0; i < len; i++ ) {
    3738            callback.call( thisArg, this[ i ], i, this );
    3839        }
     
    6970}
    7071
     72// Add a class to the body for when touch is enabled for browsers that don't support media queries
     73// for interaction media features. Adapted from <https://codepen.io/Ferie/pen/vQOMmO>
     74( function() {
     75    var matchMedia = function() {
     76        // Include the 'heartz' as a way to have a non matching MQ to help terminate the join. See <https://git.io/vznFH>.
     77        var prefixes = [ '-webkit-', '-moz-', '-o-', '-ms-' ];
     78        var query = [ '(', prefixes.join( 'touch-enabled),(' ), 'heartz', ')' ].join( '' );
     79        return window.matchMedia && window.matchMedia( query ).matches;
     80    };
     81
     82    if ( ( 'ontouchstart' in window ) || ( window.DocumentTouch && document instanceof window.DocumentTouch ) || matchMedia() ) {
     83        document.body.classList.add( 'touch-enabled' );
     84    }
     85}() );
     86
    7187/*  -----------------------------------------------------------------------------------------------
    7288    Cover Modals
     
    524540            }
    525541        }
    526 
    527         /**
    528          * Toggles `focus` class to allow submenu access on tablets.
    529          */
    530         ( function( menuObj ) {
    531             var touchStartFn, j,
    532                 parentLink = menuObj.querySelectorAll( '.primary-menu .menu-item-has-children > a' );
    533 
    534             if ( 'ontouchstart' in window ) {
    535                 touchStartFn = function( e ) {
    536                     var menuItem = this.parentNode;
    537 
    538                     if ( ! menuItem.classList.contains( 'focus' ) ) {
    539                         e.preventDefault();
    540                         for ( j = 0; j < menuItem.parentNode.children.length; ++j ) {
    541                             if ( menuItem === menuItem.parentNode.children[j] ) {
    542                                 continue;
    543