Ticket #48110: 48110.rc-1.diff
File 48110.rc-1.diff, 26.4 KB (added by , 5 years ago) |
---|
-
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
57 57 font-family: "Inter var"; 58 58 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 59 59 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"); 61 61 } 62 62 63 63 @font-face { 64 64 font-family: "Inter var"; 65 65 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 66 66 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"); 68 68 } 69 69 70 70 /* Structure --------------------------------- */ -
src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css
57 57 font-family: "Inter var"; 58 58 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 59 59 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"); 61 61 } 62 62 63 63 @font-face { 64 64 font-family: "Inter var"; 65 65 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 66 66 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"); 68 68 } 69 69 70 70 /* Structure --------------------------------- */ -
src/wp-content/themes/twentytwenty/assets/css/editor-style-classic-rtl.css
30 30 font-family: "Inter var"; 31 31 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 32 32 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"); 34 34 } 35 35 36 36 @font-face { 37 37 font-family: "Inter var"; 38 38 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 39 39 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"); 41 41 } 42 42 43 43 /* Structure --------------------------------- */ -
src/wp-content/themes/twentytwenty/assets/css/editor-style-classic.css
30 30 font-family: "Inter var"; 31 31 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 32 32 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"); 34 34 } 35 35 36 36 @font-face { 37 37 font-family: "Inter var"; 38 38 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 39 39 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"); 41 41 } 42 42 43 43 /* Structure --------------------------------- */ -
src/wp-content/themes/twentytwenty/assets/js/index.js
92 92 93 93 // Handle cover modals when they're toggled 94 94 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; 97 98 98 modal = event.target;99 body = document.body;99 modal = event.target; 100 body = document.body; 100 101 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' ); 106 107 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 } ); 112 114 } ); 113 115 }, 114 116 … … 413 415 init: function() { 414 416 // If the current menu item is in a sub level, expand all the levels higher up on load 415 417 this.expandLevel(); 416 this. goBackToCloseButton();418 this.keepFocusInModal(); 417 419 }, 418 420 419 421 expandLevel: function() { … … 433 435 } ); 434 436 }, 435 437 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; 461 440 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'; 464 456 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 } ); 468 460 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' ) ); 474 462 475 lastMenuItem = lastModalMenuItems[lastModalMenuItems.length - 1];463 bottomMenu = _doc.querySelector( '.menu-bottom > nav' ); 476 464 477 isFirstModalItem = event.target === closeMenuButton; 465 if ( bottomMenu ) { 466 bottomMenu.querySelectorAll( selectors ).forEach( function( element ) { 467 elements.push( element ); 468 } ); 469 } 470 } 478 471 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; 482 477 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 } 491 482 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(); 504 486 } 505 487 } 506 488 } ); … … 645 627 // Toggle aria-expanded on the toggle 646 628 twentytwentyToggleAttribute( toggle, 'aria-expanded', 'true', 'false' ); 647 629 630 if ( self.clickedEl && -1 !== toggle.getAttribute( 'class' ).indexOf( 'close-' ) ) { 631 twentytwentyToggleAttribute( self.clickedEl, 'aria-expanded', 'true', 'false' ); 632 } 633 648 634 // Toggle body class 649 635 if ( toggle.dataset.toggleBodyClass ) { 650 _doc. querySelector( 'body' ).classList.toggle( toggle.dataset.toggleBodyClass );636 _doc.body.classList.toggle( toggle.dataset.toggleBodyClass ); 651 637 } 652 638 653 639 // Check whether to set focus … … 777 763 if ( falseVal === undefined ) { 778 764 falseVal = false; 779 765 } 780 if ( element [ attribute ]!== trueVal ) {766 if ( element.getAttribute( attribute ) !== trueVal ) { 781 767 element.setAttribute( attribute, trueVal ); 782 768 } else { 783 769 element.setAttribute( attribute, falseVal ); -
src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php
26 26 $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; 27 27 $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 28 28 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 29 35 $wp_customize->selective_refresh->add_partial( 30 36 'blogname', 31 37 array( -
src/wp-content/themes/twentytwenty/functions.php
459 459 array( 460 460 'name' => _x( 'Large', 'Name of the large font size in the block editor', 'twentytwenty' ), 461 461 'shortName' => _x( 'L', 'Short name of the large font size in the block editor.', 'twentytwenty' ), 462 'size' => 2 4,462 'size' => 26.25, 463 463 'slug' => 'large', 464 464 ), 465 465 array( … … 482 482 add_action( 'after_setup_theme', 'twentytwenty_block_editor_settings' ); 483 483 484 484 /** 485 * Read More Link486 * Overwrite default (more ...) tag487 */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 /**499 485 * Enqueues scripts for customizer controls & settings. 500 486 * 501 487 * @since 1.0.0 … … 647 633 '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"]' ), 648 634 ), 649 635 '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"]' ), 651 637 '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' ), 652 638 ), 653 639 'text' => array( -
src/wp-content/themes/twentytwenty/header.php
121 121 <?php 122 122 } 123 123 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 ?> 130 126 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"> 132 128 133 129 <?php 134 $nav_toggle_wrapper_classes = '';135 136 // Add a class indicating whether the navigation toggle wrapper can be hidden on desktop.137 130 if ( has_nav_menu( 'expanded' ) ) { 138 $nav_toggle_wrapper_classes .= ' has-expanded-menu'; 139 } 140 ?> 131 ?> 141 132 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"> 143 134 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> 149 141 </span> 150 </span> 151 </button><!-- .nav-toggle --> 142 </button><!-- .nav-toggle --> 152 143 153 </div><!-- .nav-toggle-wrapper --> 144 </div><!-- .nav-toggle-wrapper --> 145 146 <?php 147 } 154 148 155 <?php156 149 if ( true === $enable_header_search ) { 157 150 ?> 158 151 … … 171 164 } 172 165 ?> 173 166 174 </div><!-- .header-toggles --> 167 </div><!-- .header-toggles --> 168 <?php 169 } 170 ?> 175 171 176 172 </div><!-- .header-navigation-wrapper --> 177 173 -
src/wp-content/themes/twentytwenty/style-rtl.css
257 257 font-family: "Inter var"; 258 258 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 259 259 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"); 261 262 } 262 263 263 264 @font-face { 264 265 font-family: "Inter var"; 265 266 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 266 267 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"); 268 270 } 269 271 270 272 … … 534 536 blockquote { 535 537 border-color: #cd2653; 536 538 border-style: solid; 537 border-width: 0 0 .2rem 0 0;539 border-width: 0 0 0 0.2rem; 538 540 color: inherit; 539 541 font-size: 1em; 540 542 margin: 4rem 0; 541 padding: 0.5rem 2rem 0.5rem 0;543 padding: 0.5rem 0 0.5rem 2rem; 542 544 } 543 545 544 546 cite { … … 1560 1562 } 1561 1563 1562 1564 .primary-menu a:hover, 1563 .primary-menu a:focus { 1565 .primary-menu a:focus, 1566 .primary-menu .current_page_ancestor { 1564 1567 text-decoration: underline; 1565 1568 } 1566 1569 … … 1666 1669 1667 1670 .primary-menu ul ul::after { 1668 1671 border-bottom-color: transparent; 1669 border- right-color: #000;1672 border-left-color: #000; 1670 1673 bottom: auto; 1671 1674 left: -1.6rem; 1672 1675 top: 2rem; 1673 1676 } 1674 1677 1678 .rtl .primary-menu ul ul::after { 1679 transform: rotate(-180deg); 1680 } 1675 1681 1676 1682 /* -------------------------------------------------------------------------- */ 1677 1683 … … 1800 1806 1801 1807 .modal-menu a:focus, 1802 1808 .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 { 1804 1811 text-decoration: underline; 1805 1812 } 1806 1813 … … 2613 2620 /* Block Typography Classes ------------------ */ 2614 2621 2615 2622 .has-text-align-left { 2616 text-align: right;2623 text-align: left; 2617 2624 } 2618 2625 2619 2626 .has-text-align-center { … … 3171 3178 } 3172 3179 3173 3180 .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; 3176 3183 } 3177 3184 3178 3185 /* STYLE: LARGE */ … … 4012 4019 4013 4020 /* Widget: RSS ------------------------------- */ 4014 4021 4015 .widget_rss a.rsswidget:first-of-type {4022 .widget_rss .widget-title a.rsswidget:first-of-type { 4016 4023 display: none; 4017 4024 } 4018 4025 … … 4992 4999 margin-top: 4rem; 4993 5000 } 4994 5001 5002 .alignleft { 5003 margin: 0.3rem 0 2rem 2rem; 5004 } 5005 5006 .alignright { 5007 margin: 0.3rem 2rem 2rem 0; 5008 } 5009 4995 5010 .alignwide, 4996 5011 .alignfull { 4997 5012 margin-bottom: 6rem; -
src/wp-content/themes/twentytwenty/style.css
257 257 font-family: "Inter var"; 258 258 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 259 259 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"); 261 262 } 262 263 263 264 @font-face { 264 265 font-family: "Inter var"; 265 266 font-weight: 100 900; /* stylelint-disable-line font-weight-notation */ 266 267 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"); 268 270 } 269 271 270 272 … … 534 536 blockquote { 535 537 border-color: #cd2653; 536 538 border-style: solid; 539 540 /*rtl:ignore*/ 537 541 border-width: 0 0 0 0.2rem; 538 542 color: inherit; 539 543 font-size: 1em; 540 544 margin: 4rem 0; 545 546 /*rtl:ignore*/ 541 547 padding: 0.5rem 0 0.5rem 2rem; 542 548 } 543 549 … … 1562 1568 } 1563 1569 1564 1570 .primary-menu a:hover, 1565 .primary-menu a:focus { 1571 .primary-menu a:focus, 1572 .primary-menu .current_page_ancestor { 1566 1573 text-decoration: underline; 1567 1574 } 1568 1575 … … 1668 1675 1669 1676 .primary-menu ul ul::after { 1670 1677 border-bottom-color: transparent; 1678 1679 /*rtl:ignore*/ 1671 1680 border-left-color: #000; 1672 1681 bottom: auto; 1673 1682 right: -1.6rem; 1674 1683 top: 2rem; 1675 1684 } 1676 1685 1686 .rtl .primary-menu ul ul::after { 1687 transform: rotate(180deg); 1688 } 1677 1689 1678 1690 /* -------------------------------------------------------------------------- */ 1679 1691 … … 1802 1814 1803 1815 .modal-menu a:focus, 1804 1816 .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 { 1806 1819 text-decoration: underline; 1807 1820 } 1808 1821 … … 2615 2628 /* Block Typography Classes ------------------ */ 2616 2629 2617 2630 .has-text-align-left { 2631 2632 /*rtl:ignore*/ 2618 2633 text-align: left; 2619 2634 } 2620 2635 … … 3173 3188 } 3174 3189 3175 3190 .wp-block-quote[style="text-align:right"] { 3191 3192 /*rtl:begin:ignore*/ 3176 3193 border-width: 0 0.2rem 0 0; 3177 3194 padding: 0 2rem 0 0; 3195 3196 /*rtl:end:ignore*/ 3178 3197 } 3179 3198 3180 3199 /* STYLE: LARGE */ … … 4018 4037 4019 4038 /* Widget: RSS ------------------------------- */ 4020 4039 4021 .widget_rss a.rsswidget:first-of-type {4040 .widget_rss .widget-title a.rsswidget:first-of-type { 4022 4041 display: none; 4023 4042 } 4024 4043 … … 5006 5025 margin-top: 4rem; 5007 5026 } 5008 5027 5028 .alignleft { 5029 margin: 0.3rem 2rem 2rem 0; 5030 } 5031 5032 .alignright { 5033 margin: 0.3rem 0 2rem 2rem; 5034 } 5035 5009 5036 .alignwide, 5010 5037 .alignfull { 5011 5038 margin-bottom: 6rem; -
src/wp-content/themes/twentytwenty/template-parts/content-cover.php
166 166 * Output comments wrapper if it's a post, or if comments are open, 167 167 * or if there's a comment number – and check for password. 168 168 * */ 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() ) { 170 170 ?> 171 171 172 172 <div class="comments-wrapper section-inner"> -
src/wp-content/themes/twentytwenty/template-parts/content.php
33 33 if ( is_search() || ! is_singular() && 'summary' === get_theme_mod( 'blog_content', 'full' ) ) { 34 34 the_excerpt(); 35 35 } 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() ) ); 37 37 } 38 38 ?> 39 39 … … 75 75 * Output comments wrapper if it's a post, or if comments are open, 76 76 * or if there's a comment number – and check for password. 77 77 * */ 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() ) { 79 79 ?> 80 80 81 81 <div class="comments-wrapper section-inner"> -
src/wp-content/themes/twentytwenty/template-parts/modal-search.php
22 22 ); 23 23 ?> 24 24 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"> 26 26 <span class="screen-reader-text"><?php _e( 'Close search', 'twentytwenty' ); ?></span> 27 27 <?php twentytwenty_the_theme_svg( 'cross' ); ?> 28 28 </button><!-- .search-toggle -->