Make WordPress Core

Ticket #48110: 48110.rc-1.diff

File 48110.rc-1.diff, 26.4 KB (added by ianbelanger, 5 years ago)

Release Candidate 1 Twenty Twenty patch

  • src/wp-content/themes/twentytwenty/.stylelintrc.json

     
    1 {
    2         "extends": "stylelint-config-wordpress",
    3         "rules": {
    4                 "font-family-no-missing-generic-family-keyword": null,
    5                 "no-descending-specificity": null
    6         }
    7 }
     1{
     2        "extends": [
     3                "stylelint-config-wordpress"
     4        ],
     5        "plugins": ["stylelint-a11y"],
     6        "rules": {
     7                "font-family-no-missing-generic-family-keyword": null,
     8                "no-descending-specificity": null,
     9                "a11y/no-outline-none": true,
     10                "a11y/selector-pseudo-class-focus": true
     11        }
     12}
  • src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css

     
    5757        font-family: "Inter var";
    5858        font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
    5959        font-style: normal;
    60         src: url(../fonts/inter/Inter-upright.var.woff2) format("woff2");
     60        src: url(../fonts/inter/Inter-upright-var.woff2) format("woff2");
    6161}
    6262
    6363@font-face {
    6464        font-family: "Inter var";
    6565        font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
    6666        font-style: italic;
    67         src: url(../fonts/inter/Inter-italic.var.woff2) format("woff2");
     67        src: url(../fonts/inter/Inter-italic-var.woff2) format("woff2");
    6868}
    6969
    7070/* Structure --------------------------------- */
  • src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css

     
    5757        font-family: "Inter var";
    5858        font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
    5959        font-style: normal;
    60         src: url(../fonts/inter/Inter-upright.var.woff2) format("woff2");
     60        src: url(../fonts/inter/Inter-upright-var.woff2) format("woff2");
    6161}
    6262
    6363@font-face {
    6464        font-family: "Inter var";
    6565        font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
    6666        font-style: italic;
    67         src: url(../fonts/inter/Inter-italic.var.woff2) format("woff2");
     67        src: url(../fonts/inter/Inter-italic-var.woff2) format("woff2");
    6868}
    6969
    7070/* Structure --------------------------------- */
  • src/wp-content/themes/twentytwenty/assets/css/editor-style-classic-rtl.css

     
    3030        font-family: "Inter var";
    3131        font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
    3232        font-style: normal;
    33         src: url(../fonts/inter/Inter-upright.var.woff2) format("woff2");
     33        src: url(../fonts/inter/Inter-upright-var.woff2) format("woff2");
    3434}
    3535
    3636@font-face {
    3737        font-family: "Inter var";
    3838        font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
    3939        font-style: italic;
    40         src: url(../fonts/inter/Inter-italic.var.woff2) format("woff2");
     40        src: url(../fonts/inter/Inter-italic-var.woff2) format("woff2");
    4141}
    4242
    4343/* Structure --------------------------------- */
  • src/wp-content/themes/twentytwenty/assets/css/editor-style-classic.css

     
    3030        font-family: "Inter var";
    3131        font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
    3232        font-style: normal;
    33         src: url(../fonts/inter/Inter-upright.var.woff2) format("woff2");
     33        src: url(../fonts/inter/Inter-upright-var.woff2) format("woff2");
    3434}
    3535
    3636@font-face {
    3737        font-family: "Inter var";
    3838        font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
    3939        font-style: italic;
    40         src: url(../fonts/inter/Inter-italic.var.woff2) format("woff2");
     40        src: url(../fonts/inter/Inter-italic-var.woff2) format("woff2");
    4141}
    4242
    4343/* Structure --------------------------------- */
  • src/wp-content/themes/twentytwenty/assets/js/index.js

     
    9292
    9393        // Handle cover modals when they're toggled
    9494        onToggle: function() {
    95                 document.querySelector( '.cover-modal' ).addEventListener( 'toggled', function( event ) {
    96                         var modal, body;
     95                document.querySelectorAll( '.cover-modal' ).forEach( function( element ) {
     96                        element.addEventListener( 'toggled', function( event ) {
     97                                var modal, body;
    9798
    98                         modal = event.target;
    99                         body = document.body;
     99                                modal = event.target;
     100                                body = document.body;
    100101
    101                         if ( modal.classList.contains( 'active' ) ) {
    102                                 body.classList.add( 'showing-modal' );
    103                         } else {
    104                                 body.classList.remove( 'showing-modal' );
    105                                 body.classList.add( 'hiding-modal' );
     102                                if ( modal.classList.contains( 'active' ) ) {
     103                                        body.classList.add( 'showing-modal' );
     104                                } else {
     105                                        body.classList.remove( 'showing-modal' );
     106                                        body.classList.add( 'hiding-modal' );
    106107
    107                                 // Remove the hiding class after a delay, when animations have been run
    108                                 setTimeout( function() {
    109                                         body.classList.remove( 'hiding-modal' );
    110                                 }, 500 );
    111                         }
     108                                        // Remove the hiding class after a delay, when animations have been run
     109                                        setTimeout( function() {
     110                                                body.classList.remove( 'hiding-modal' );
     111                                        }, 500 );
     112                                }
     113                        } );
    112114                } );
    113115        },
    114116
     
    413415        init: function() {
    414416                // If the current menu item is in a sub level, expand all the levels higher up on load
    415417                this.expandLevel();
    416                 this.goBackToCloseButton();
     418                this.keepFocusInModal();
    417419        },
    418420
    419421        expandLevel: function() {
     
    433435                } );
    434436        },
    435437
    436         // If the current menu item is the last one, return to close button when tab
    437         goBackToCloseButton: function() {
    438                 document.addEventListener( 'keydown', function( event ) {
    439                         var closeMenuButton, mobileMenu, isDesktop, menuLinks, firstLevelmenuLinks, lastMenuLinkToggleButton, lastToogleSubMenuLinkNotOpened, lastMenuLinkHasSubClosedMenu, socialLinks, hasSocialMenu, lastModalMenuItems, focusedElementParentLi, focusedElementIsInsideModal, lastMenuItem, isFirstModalItem, isLastModalItem;
    440 
    441                         closeMenuButton = document.querySelector( '.toggle.close-nav-toggle' );
    442                         mobileMenu = document.querySelector( '.mobile-menu' );
    443 
    444                         if ( mobileMenu ) {
    445                                 return false;
    446                         }
    447 
    448                         isDesktop = window.getComputedStyle( mobileMenu, null ).getPropertyValue( 'display' ) === 'none';
    449 
    450                         menuLinks = isDesktop ?
    451                                 document.querySelectorAll( '.menu-modal .expanded-menu .modal-menu li' ) :
    452                                 document.querySelectorAll( '.menu-modal .mobile-menu .modal-menu li' );
    453 
    454                         firstLevelmenuLinks = isDesktop ?
    455                                 document.querySelectorAll( '.menu-modal .expanded-menu .modal-menu > li' ) :
    456                                 document.querySelectorAll( '.menu-modal .mobile-menu .modal-menu > li' );
    457 
    458                         if ( firstLevelmenuLinks ) {
    459                                 return false;
    460                         }
     438        keepFocusInModal: function() {
     439                var _doc = document;
    461440
    462                         lastMenuLinkToggleButton = firstLevelmenuLinks[firstLevelmenuLinks.length - 1].querySelector( '.sub-menu-toggle' ) || undefined;
    463                         lastMenuLinkHasSubClosedMenu = lastMenuLinkToggleButton && ! lastMenuLinkToggleButton.classList.contains( 'active' );
     441                _doc.addEventListener( 'keydown', function( event ) {
     442                        var clickedEl = twentytwenty.toggles.clickedEl,
     443                                toggleTarget, modal, selectors, elements, menuType, bottomMenu, activeEl, lastEl, firstEl, tabKey, shiftKey;
     444
     445                        if ( clickedEl && _doc.body.classList.contains( 'showing-modal' ) ) {
     446                                toggleTarget = clickedEl.dataset.toggleTarget;
     447                                selectors = 'input, a, button';
     448                                modal = _doc.querySelector( toggleTarget );
     449
     450                                elements = modal.querySelectorAll( selectors );
     451                                elements = Array.prototype.slice.call( elements );
     452
     453                                if ( '.menu-modal' === toggleTarget ) {
     454                                        menuType = window.matchMedia( '(min-width: 1000px)' ).matches;
     455                                        menuType = menuType ? '.expanded-menu' : '.mobile-menu';
    464456
    465                         lastToogleSubMenuLinkNotOpened = isDesktop ?
    466                                 document.querySelector( '.menu-modal .expanded-menu .modal-menu .sub-menu .sub-menu-toggle:not(.active)' ) :
    467                                 document.querySelector( '.menu-modal .mobile-menu .sub-menu .sub-menu-toggle:not(.active)' );
     457                                        elements = elements.filter( function( element ) {
     458                                                return null !== element.closest( menuType ) && null !== element.offsetParent;
     459                                        } );
    468460
    469                         socialLinks = document.querySelectorAll( '.menu-modal .social-menu li' );
    470                         hasSocialMenu = document.querySelectorAll( '.menu-modal .social-menu' ).length > 0;
    471                         lastModalMenuItems = hasSocialMenu ? socialLinks : menuLinks;
    472                         focusedElementParentLi = twentytwentyFindParents( event.target, 'li' );
    473                         focusedElementIsInsideModal = twentytwentyFindParents( event.target, '.menu-modal' ).length > 0;
     461                                        elements.unshift( _doc.querySelector( '.close-nav-toggle' ) );
    474462
    475                         lastMenuItem = lastModalMenuItems[lastModalMenuItems.length - 1];
     463                                        bottomMenu = _doc.querySelector( '.menu-bottom > nav' );
    476464
    477                         isFirstModalItem = event.target === closeMenuButton;
     465                                        if ( bottomMenu ) {
     466                                                bottomMenu.querySelectorAll( selectors ).forEach( function( element ) {
     467                                                        elements.push( element );
     468                                                } );
     469                                        }
     470                                }
    478471
    479                         isLastModalItem = focusedElementIsInsideModal && focusedElementParentLi[0] ?
    480                                 focusedElementParentLi[0].className === lastMenuItem.className :
    481                                 undefined;
     472                                lastEl = elements[ elements.length - 1 ];
     473                                firstEl = elements[0];
     474                                activeEl = _doc.activeElement;
     475                                tabKey = event.keyCode === 9;
     476                                shiftKey = event.shiftKey;
    482477
    483                         if ( lastMenuLinkToggleButton && lastMenuLinkHasSubClosedMenu && ! hasSocialMenu ) { // Last 1st level item has submenu and is closed
    484                                 isLastModalItem = event.target === lastMenuLinkToggleButton;
    485                                 lastMenuItem = lastMenuLinkToggleButton;
    486                         }
    487                         if ( lastMenuLinkToggleButton && ! lastMenuLinkHasSubClosedMenu && ! hasSocialMenu ) { // Last 1st level item has submenu is opened
    488                                 isLastModalItem = event.target === lastToogleSubMenuLinkNotOpened || event.target === menuLinks[menuLinks.length - 1].querySelector( 'a' );
    489                                 lastMenuItem = lastToogleSubMenuLinkNotOpened || menuLinks[menuLinks.length - 1].querySelector( 'a' );
    490                         }
     478                                if ( ! shiftKey && tabKey && lastEl === activeEl ) {
     479                                        event.preventDefault();
     480                                        firstEl.focus();
     481                                }
    491482
    492                         if ( ! event.shiftKey && event.key === 'Tab' && isLastModalItem ) {
    493                                 // Forward
    494                                 event.preventDefault();
    495                                 closeMenuButton.focus();
    496                         }
    497                         if ( event.shiftKey && event.key === 'Tab' && isFirstModalItem ) {
    498                                 // Backward
    499                                 event.preventDefault();
    500                                 if ( lastMenuItem.querySelector( 'a' ) ) {
    501                                         lastMenuItem.querySelector( 'a' ).focus();
    502                                 } else {
    503                                         lastMenuItem.focus();
     483                                if ( shiftKey && tabKey && firstEl === activeEl ) {
     484                                        event.preventDefault();
     485                                        lastEl.focus();
    504486                                }
    505487                        }
    506488                } );
     
    645627                        // Toggle aria-expanded on the toggle
    646628                        twentytwentyToggleAttribute( toggle, 'aria-expanded', 'true', 'false' );
    647629
     630                        if ( self.clickedEl && -1 !== toggle.getAttribute( 'class' ).indexOf( 'close-' ) ) {
     631                                twentytwentyToggleAttribute( self.clickedEl, 'aria-expanded', 'true', 'false' );
     632                        }
     633
    648634                        // Toggle body class
    649635                        if ( toggle.dataset.toggleBodyClass ) {
    650                                 _doc.querySelector( 'body' ).classList.toggle( toggle.dataset.toggleBodyClass );
     636                                _doc.body.classList.toggle( toggle.dataset.toggleBodyClass );
    651637                        }
    652638
    653639                        // Check whether to set focus
     
    777763        if ( falseVal === undefined ) {
    778764                falseVal = false;
    779765        }
    780         if ( element[ attribute ] !== trueVal ) {
     766        if ( element.getAttribute( attribute ) !== trueVal ) {
    781767                element.setAttribute( attribute, trueVal );
    782768        } else {
    783769                element.setAttribute( attribute, falseVal );
  • src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php

     
    2626                        $wp_customize->get_setting( 'blogname' )->transport        = 'postMessage';
    2727                        $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
    2828
     29                        /**
     30                         * Removes the background image section.
     31                         * The theme only supports the background color option.
     32                         */
     33                        $wp_customize->remove_section( 'background_image' );
     34
    2935                        $wp_customize->selective_refresh->add_partial(
    3036                                'blogname',
    3137                                array(
  • src/wp-content/themes/twentytwenty/functions.php

     
    459459                        array(
    460460                                'name'      => _x( 'Large', 'Name of the large font size in the block editor', 'twentytwenty' ),
    461461                                'shortName' => _x( 'L', 'Short name of the large font size in the block editor.', 'twentytwenty' ),
    462                                 'size'      => 24,
     462                                'size'      => 26.25,
    463463                                'slug'      => 'large',
    464464                        ),
    465465                        array(
     
    482482add_action( 'after_setup_theme', 'twentytwenty_block_editor_settings' );
    483483
    484484/**
    485  * Read More Link
    486  * Overwrite default (more ...) tag
    487  */
    488 function twentytwenty_read_more_tag() {
    489         return sprintf(
    490                 '<a href="%1$s" class="more-link faux-button">%2$s <span class="screen-reader-text">"%3$s"</span></a>',
    491                 esc_url( get_permalink( get_the_ID() ) ),
    492                 __( 'Continue reading', 'twentytwenty' ),
    493                 esc_html( get_the_title( get_the_ID() ) )
    494         );
    495 }
    496 add_filter( 'the_content_more_link', 'twentytwenty_read_more_tag' );
    497 
    498 /**
    499485 * Enqueues scripts for customizer controls & settings.
    500486 *
    501487 * @since 1.0.0
     
    647633                                'background' => array( '.social-icons a', '#site-footer button:not(.toggle)', '#site-footer .button', '#site-footer .faux-button', '#site-footer .wp-block-button__link', '#site-footer .wp-block-file__button', '#site-footer input[type="button"]', '#site-footer input[type="reset"]', '#site-footer input[type="submit"]' ),
    648634                        ),
    649635                        'background' => array(
    650                                 'color'      => array( '.social-icons a', '.overlay-header .header-inner', 'body:not(.overlay-header) .primary-menu ul', '.header-footer-group button', '.header-footer-group .button', '.header-footer-group .faux-button', '.header-footer-group .wp-block-button:not(.is-style-outline) .wp-block-button__link', '.header-footer-group .wp-block-file__button', '.header-footer-group input[type="button"]', '.header-footer-group input[type="reset"]', '.header-footer-group input[type="submit"]' ),
     636                                'color'      => array( '.social-icons a', 'body:not(.overlay-header) .primary-menu ul', '.header-footer-group button', '.header-footer-group .button', '.header-footer-group .faux-button', '.header-footer-group .wp-block-button:not(.is-style-outline) .wp-block-button__link', '.header-footer-group .wp-block-file__button', '.header-footer-group input[type="button"]', '.header-footer-group input[type="reset"]', '.header-footer-group input[type="submit"]' ),
    651637                                'background' => array( '#site-header', '.footer-nav-widgets-wrapper', '#site-footer', '.menu-modal', '.menu-modal-inner', '.search-modal-inner', '.archive-header', '.singular .entry-header', '.singular .featured-media:before', '.wp-block-pullquote:before' ),
    652638                        ),
    653639                        'text'       => array(
  • src/wp-content/themes/twentytwenty/header.php

     
    121121                                                <?php
    122122                                        }
    123123
    124                                         $header_toggles_classes = '';
    125 
    126                                         if ( ! has_nav_menu( 'expanded' ) && false === $enable_header_search ) {
    127                                                 $header_toggles_classes .= ' hide-on-desktop';
    128                                         }
    129                                         ?>
     124                                        if ( true === $enable_header_search || has_nav_menu( 'expanded' ) ) {
     125                                                ?>
    130126
    131                                         <div class="header-toggles hide-no-js<?php echo $header_toggles_classes; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>">
     127                                                <div class="header-toggles hide-no-js">
    132128
    133129                                                <?php
    134                                                 $nav_toggle_wrapper_classes = '';
    135 
    136                                                 // Add a class indicating whether the navigation toggle wrapper can be hidden on desktop.
    137130                                                if ( has_nav_menu( 'expanded' ) ) {
    138                                                         $nav_toggle_wrapper_classes .= ' has-expanded-menu';
    139                                                 }
    140                                                 ?>
     131                                                        ?>
    141132
    142                                                 <div class="toggle-wrapper nav-toggle-wrapper<?php echo $nav_toggle_wrapper_classes; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- static output ?>">
     133                                                        <div class="toggle-wrapper nav-toggle-wrapper has-expanded-menu">
    143134
    144                                                         <button class="toggle nav-toggle desktop-nav-toggle" data-toggle-target=".menu-modal" data-toggle-body-class="showing-menu-modal" aria-expanded="false" data-set-focus=".close-nav-toggle">
    145                                                                 <span class="toggle-inner">
    146                                                                         <span class="toggle-text"><?php _e( 'Menu', 'twentytwenty' ); ?></span>
    147                                                                         <span class="toggle-icon">
    148                                                                                 <?php twentytwenty_the_theme_svg( 'ellipsis' ); ?>
     135                                                                <button class="toggle nav-toggle desktop-nav-toggle" data-toggle-target=".menu-modal" data-toggle-body-class="showing-menu-modal" aria-expanded="false" data-set-focus=".close-nav-toggle">
     136                                                                        <span class="toggle-inner">
     137                                                                                <span class="toggle-text"><?php _e( 'Menu', 'twentytwenty' ); ?></span>
     138                                                                                <span class="toggle-icon">
     139                                                                                        <?php twentytwenty_the_theme_svg( 'ellipsis' ); ?>
     140                                                                                </span>
    149141                                                                        </span>
    150                                                                 </span>
    151                                                         </button><!-- .nav-toggle -->
     142                                                                </button><!-- .nav-toggle -->
    152143
    153                                                 </div><!-- .nav-toggle-wrapper -->
     144                                                        </div><!-- .nav-toggle-wrapper -->
     145
     146                                                        <?php
     147                                                }
    154148
    155                                                 <?php
    156149                                                if ( true === $enable_header_search ) {
    157150                                                        ?>
    158151
     
    171164                                                }
    172165                                                ?>
    173166
    174                                         </div><!-- .header-toggles -->
     167                                                </div><!-- .header-toggles -->
     168                                                <?php
     169                                        }
     170                                        ?>
    175171
    176172                                </div><!-- .header-navigation-wrapper -->
    177173
  • src/wp-content/themes/twentytwenty/style-rtl.css

     
    257257        font-family: "Inter var";
    258258        font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
    259259        font-style: normal;
    260         src: url(./assets/fonts/inter/Inter-upright.var.woff2) format("woff2");
     260        font-display: swap;
     261        src: url(./assets/fonts/inter/Inter-upright-var.woff2) format("woff2");
    261262}
    262263
    263264@font-face {
    264265        font-family: "Inter var";
    265266        font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
    266267        font-style: italic;
    267         src: url(./assets/fonts/inter/Inter-italic.var.woff2) format("woff2");
     268        font-display: swap;
     269        src: url(./assets/fonts/inter/Inter-italic-var.woff2) format("woff2");
    268270}
    269271
    270272
     
    534536blockquote {
    535537        border-color: #cd2653;
    536538        border-style: solid;
    537         border-width: 0 0.2rem 0 0;
     539        border-width: 0 0 0 0.2rem;
    538540        color: inherit;
    539541        font-size: 1em;
    540542        margin: 4rem 0;
    541         padding: 0.5rem 2rem 0.5rem 0;
     543        padding: 0.5rem 0 0.5rem 2rem;
    542544}
    543545
    544546cite {
     
    15601562}
    15611563
    15621564.primary-menu a:hover,
    1563 .primary-menu a:focus {
     1565.primary-menu a:focus,
     1566.primary-menu .current_page_ancestor {
    15641567        text-decoration: underline;
    15651568}
    15661569
     
    16661669
    16671670.primary-menu ul ul::after {
    16681671        border-bottom-color: transparent;
    1669         border-right-color: #000;
     1672        border-left-color: #000;
    16701673        bottom: auto;
    16711674        left: -1.6rem;
    16721675        top: 2rem;
    16731676}
    16741677
     1678.rtl .primary-menu ul ul::after {
     1679        transform: rotate(-180deg);
     1680}
    16751681
    16761682/* -------------------------------------------------------------------------- */
    16771683
     
    18001806
    18011807.modal-menu a:focus,
    18021808.modal-menu a:hover,
    1803 .modal-menu li.current-menu-item > .ancestor-wrapper > a {
     1809.modal-menu li.current-menu-item > .ancestor-wrapper > a,
     1810.modal-menu li.current_page_ancestor > .ancestor-wrapper > a {
    18041811        text-decoration: underline;
    18051812}
    18061813
     
    26132620/* Block Typography Classes ------------------ */
    26142621
    26152622.has-text-align-left {
    2616         text-align: right;
     2623        text-align: left;
    26172624}
    26182625
    26192626.has-text-align-center {
     
    31713178}
    31723179
    31733180.wp-block-quote[style="text-align:right"] {
    3174         border-width: 0 0 0 0.2rem;
    3175         padding: 0 0 0 2rem;
     3181        border-width: 0 0.2rem 0 0;
     3182        padding: 0 2rem 0 0;
    31763183}
    31773184
    31783185/* STYLE: LARGE */
     
    40124019
    40134020/* Widget: RSS ------------------------------- */
    40144021
    4015 .widget_rss a.rsswidget:first-of-type {
     4022.widget_rss .widget-title a.rsswidget:first-of-type {
    40164023        display: none;
    40174024}
    40184025
     
    49924999                margin-top: 4rem;
    49935000        }
    49945001
     5002        .alignleft {
     5003                margin: 0.3rem 0 2rem 2rem;
     5004        }
     5005
     5006        .alignright {
     5007                margin: 0.3rem 2rem 2rem 0;
     5008        }
     5009
    49955010        .alignwide,
    49965011        .alignfull {
    49975012                margin-bottom: 6rem;
  • src/wp-content/themes/twentytwenty/style.css

     
    257257        font-family: "Inter var";
    258258        font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
    259259        font-style: normal;
    260         src: url(./assets/fonts/inter/Inter-upright.var.woff2) format("woff2");
     260        font-display: swap;
     261        src: url(./assets/fonts/inter/Inter-upright-var.woff2) format("woff2");
    261262}
    262263
    263264@font-face {
    264265        font-family: "Inter var";
    265266        font-weight: 100 900; /* stylelint-disable-line font-weight-notation */
    266267        font-style: italic;
    267         src: url(./assets/fonts/inter/Inter-italic.var.woff2) format("woff2");
     268        font-display: swap;
     269        src: url(./assets/fonts/inter/Inter-italic-var.woff2) format("woff2");
    268270}
    269271
    270272
     
    534536blockquote {
    535537        border-color: #cd2653;
    536538        border-style: solid;
     539
     540        /*rtl:ignore*/
    537541        border-width: 0 0 0 0.2rem;
    538542        color: inherit;
    539543        font-size: 1em;
    540544        margin: 4rem 0;
     545
     546        /*rtl:ignore*/
    541547        padding: 0.5rem 0 0.5rem 2rem;
    542548}
    543549
     
    15621568}
    15631569
    15641570.primary-menu a:hover,
    1565 .primary-menu a:focus {
     1571.primary-menu a:focus,
     1572.primary-menu .current_page_ancestor {
    15661573        text-decoration: underline;
    15671574}
    15681575
     
    16681675
    16691676.primary-menu ul ul::after {
    16701677        border-bottom-color: transparent;
     1678
     1679        /*rtl:ignore*/
    16711680        border-left-color: #000;
    16721681        bottom: auto;
    16731682        right: -1.6rem;
    16741683        top: 2rem;
    16751684}
    16761685
     1686.rtl .primary-menu ul ul::after {
     1687        transform: rotate(180deg);
     1688}
    16771689
    16781690/* -------------------------------------------------------------------------- */
    16791691
     
    18021814
    18031815.modal-menu a:focus,
    18041816.modal-menu a:hover,
    1805 .modal-menu li.current-menu-item > .ancestor-wrapper > a {
     1817.modal-menu li.current-menu-item > .ancestor-wrapper > a,
     1818.modal-menu li.current_page_ancestor > .ancestor-wrapper > a {
    18061819        text-decoration: underline;
    18071820}
    18081821
     
    26152628/* Block Typography Classes ------------------ */
    26162629
    26172630.has-text-align-left {
     2631
     2632        /*rtl:ignore*/
    26182633        text-align: left;
    26192634}
    26202635
     
    31733188}
    31743189
    31753190.wp-block-quote[style="text-align:right"] {
     3191
     3192        /*rtl:begin:ignore*/
    31763193        border-width: 0 0.2rem 0 0;
    31773194        padding: 0 2rem 0 0;
     3195
     3196        /*rtl:end:ignore*/
    31783197}
    31793198
    31803199/* STYLE: LARGE */
     
    40184037
    40194038/* Widget: RSS ------------------------------- */
    40204039
    4021 .widget_rss a.rsswidget:first-of-type {
     4040.widget_rss .widget-title a.rsswidget:first-of-type {
    40224041        display: none;
    40234042}
    40244043
     
    50065025                margin-top: 4rem;
    50075026        }
    50085027
     5028        .alignleft {
     5029                margin: 0.3rem 2rem 2rem 0;
     5030        }
     5031
     5032        .alignright {
     5033                margin: 0.3rem 0 2rem 2rem;
     5034        }
     5035
    50095036        .alignwide,
    50105037        .alignfull {
    50115038                margin-bottom: 6rem;
  • src/wp-content/themes/twentytwenty/template-parts/content-cover.php

     
    166166         *  Output comments wrapper if it's a post, or if comments are open,
    167167         * or if there's a comment number – and check for password.
    168168         * */
    169         if ( ( 'post' === $post->post_type || comments_open() || get_comments_number() ) && ! post_password_required() ) {
     169        if ( ( is_single() || is_page() ) && ( comments_open() || get_comments_number() ) && ! post_password_required() ) {
    170170                ?>
    171171
    172172                <div class="comments-wrapper section-inner">
  • src/wp-content/themes/twentytwenty/template-parts/content.php

     
    3333                        if ( is_search() || ! is_singular() && 'summary' === get_theme_mod( 'blog_content', 'full' ) ) {
    3434                                the_excerpt();
    3535                        } else {
    36                                 the_content();
     36                                the_content( sprintf( '<span class="faux-button">%1$s</span> <span class="screen-reader-text">"%2$s"</span>', __( 'Continue reading', 'twentytwenty' ), get_the_title() ) );
    3737                        }
    3838                        ?>
    3939
     
    7575         *  Output comments wrapper if it's a post, or if comments are open,
    7676         * or if there's a comment number – and check for password.
    7777         * */
    78         if ( ( 'post' === $post->post_type || comments_open() || get_comments_number() ) && ! post_password_required() ) {
     78        if ( ( is_single() || is_page() ) && ( comments_open() || get_comments_number() ) && ! post_password_required() ) {
    7979                ?>
    8080
    8181                <div class="comments-wrapper section-inner">
  • src/wp-content/themes/twentytwenty/template-parts/modal-search.php

     
    2222                        );
    2323                        ?>
    2424
    25                         <button class="toggle search-untoggle fill-children-current-color" data-toggle-target=".search-modal" data-toggle-body-class="showing-search-modal" data-set-focus=".search-modal .search-field">
     25                        <button class="toggle search-untoggle close-search-toggle fill-children-current-color" data-toggle-target=".search-modal" data-toggle-body-class="showing-search-modal" data-set-focus=".search-modal .search-field">
    2626                                <span class="screen-reader-text"><?php _e( 'Close search', 'twentytwenty' ); ?></span>
    2727                                <?php twentytwenty_the_theme_svg( 'cross' ); ?>
    2828                        </button><!-- .search-toggle -->