Changeset 49320
- Timestamp:
- 10/27/2020 01:58:37 AM (4 years ago)
- Location:
- trunk/src/wp-content/themes/twentytwentyone
- Files:
-
- 1 added
- 1 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-content/themes/twentytwentyone/assets/css/ie-editor.css
r49247 r49320 31 31 } 32 32 33 /* OS dark theme preference */34 @media (prefers-color-scheme: dark) {35 html.respect-color-scheme-preference body {36 background-color: #28303d;37 }38 @media (prefers-color-scheme: dark){39 html.respect-color-scheme-preference body{40 background-color: #28303d;41 }42 }43 }44 45 33 /* Button extends */ 46 34 .wp-block-button__link { … … 481 469 .wp-block-code code { 482 470 font-size: 1rem; 471 white-space: pre !important; 472 overflow-x: auto; 483 473 } 484 474 … … 489 479 border-width: 0.1rem; 490 480 padding: 20px; 481 color: currentColor; 491 482 } 492 483 … … 1552 1543 } 1553 1544 1545 pre.wp-block-preformatted { 1546 overflow-x: auto; 1547 white-space: pre !important; 1548 font-size: 1rem; 1549 } 1550 1554 1551 .wp-block-pullquote { 1555 1552 padding: 40px 0; 1556 margin-left: 0;1557 margin-right: 0;1558 1553 text-align: center; 1559 1554 border-width: 3px; … … 1617 1612 1618 1613 .wp-block-pullquote.is-style-solid-color { 1614 margin-left: auto; 1615 margin-right: auto; 1619 1616 padding: 50px; 1620 1617 border-width: 3px; … … 2012 2009 background-color: #39414d; 2013 2010 color: #d1e4dd; 2011 } 2012 2013 .wp-block[data-align="center"] > * { 2014 text-align: center; 2015 } 2016 2017 .wp-block[data-align="center"] .wp-block-search__button-only .wp-block-search__inside-wrapper { 2018 justify-content: center; 2014 2019 } 2015 2020 … … 2229 2234 } 2230 2235 2236 .wp-block-tag-cloud.aligncenter { 2237 text-align: center; 2238 } 2239 2231 2240 pre.wp-block-verse { 2232 2241 padding: 0; -
trunk/src/wp-content/themes/twentytwentyone/assets/css/ie.css
r49247 r49320 11 11 Version: 1.0.0 12 12 License: GNU General Public License v2 or later 13 License URI: LICENSE13 License URI: http://www.gnu.org/licenses/gpl-2.0.html 14 14 Text Domain: twentytwentyone 15 15 Tags: one-column, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready … … 123 123 } 124 124 125 /* OS dark theme preference */126 @media (prefers-color-scheme: dark) {127 html.respect-color-scheme-preference body {128 background-color: #28303d;129 }130 @media (prefers-color-scheme: dark){131 html.respect-color-scheme-preference body{132 background-color: #28303d;133 }134 }135 }136 137 125 /* Button extends */ 138 126 .site .button { … … 1801 1789 } 1802 1790 1791 input[type="email"], 1792 input[type="url"] { 1793 /*rtl:ignore*/ 1794 direction: ltr; 1795 } 1796 1803 1797 select { 1804 1798 border: 3px solid #39414d; … … 1997 1991 } 1998 1992 1993 fieldset { 1994 display: grid; 1995 border-color: #39414d; 1996 padding: 25px; 1997 } 1998 1999 fieldset legend { 2000 font-size: 1.5rem; 2001 } 2002 2003 fieldset input[type="submit"] { 2004 max-width: max-content; 2005 } 2006 2007 fieldset input:not([type="submit"]) { 2008 margin-bottom: 20px; 2009 } 2010 2011 fieldset input[type="radio"], fieldset input[type="checkbox"] { 2012 margin-bottom: 0; 2013 } 2014 2015 fieldset input[type="radio"] + label { 2016 font-size: 1.125rem; 2017 padding-left: 0; 2018 margin-bottom: 20px; 2019 } 2020 2021 fieldset input[type="checkbox"] + label { 2022 font-size: 1.125rem; 2023 padding-left: 0; 2024 margin-bottom: 20px; 2025 } 2026 1999 2027 img { 2000 2028 display: block; … … 2077 2105 2078 2106 pre { 2079 white-space: pre-wrap; 2107 white-space: pre; 2108 overflow-x: auto; 2080 2109 } 2081 2110 … … 2225 2254 .wp-block-code code { 2226 2255 font-size: 1rem; 2227 overflow: auto; 2256 white-space: pre; 2257 overflow-x: auto; 2258 display: block; 2228 2259 } 2229 2260 … … 2269 2300 } 2270 2301 2302 .wp-block-columns.is-style-twentytwentyone-columns-overlap { 2303 justify-content: space-around; 2304 } 2305 2271 2306 @media only screen and (min-width: 652px) { 2272 .wp-block-columns.is-style-twentytwentyone-columns-overlap .wp-block-column {2273 flex-grow: 1;2274 }2275 2307 .wp-block-columns.is-style-twentytwentyone-columns-overlap .wp-block-column:nth-child(2n) { 2276 2308 margin-left: -50px; … … 3490 3522 margin-left: 10px; 3491 3523 } 3524 } 3525 3526 pre.wp-block-preformatted { 3527 overflow-x: auto; 3528 white-space: pre; 3492 3529 } 3493 3530 … … 4023 4060 } 4024 4061 4062 .wp-block-search__button-inside .wp-block-search__inside-wrapper { 4063 background-color: #fff; 4064 } 4065 4066 .wp-block-search__button-only.aligncenter .wp-block-search__inside-wrapper { 4067 justify-content: center; 4068 } 4069 4025 4070 .wp-block-search .wp-block-search__label { 4026 4071 font-size: 1.125rem; … … 4037 4082 margin-right: -3px; 4038 4083 padding: 10px; 4084 background-color: #fff; 4039 4085 } 4040 4086 … … 4279 4325 .wp-calendar-nav .wp-calendar-nav-next { 4280 4326 float: right; 4327 } 4328 4329 .wp-block-tag-cloud.alignfull { 4330 padding-left: 20px; 4331 padding-right: 20px; 4281 4332 } 4282 4333 … … 4885 4936 4886 4937 .page-links .post-page-numbers { 4938 display: inline-block; 4887 4939 margin-left: 13px; 4888 4940 margin-right: 13px; 4889 padding: 10px 0; 4941 min-width: 44px; 4942 min-height: 44px; 4890 4943 } 4891 4944 … … 4960 5013 } 4961 5014 4962 .entry-content .more-link:hover {4963 text-decoration: none;4964 }4965 4966 5015 .entry-content > iframe[style] { 4967 5016 margin: 30px 0 !important; … … 4981 5030 font-size: 1rem; 4982 5031 display: block; 5032 } 5033 5034 .entry-footer > span { 5035 display: inline-block; 4983 5036 } 4984 5037 … … 5237 5290 .blog .format-video .entry-content { 5238 5291 margin-top: 60px; 5292 } 5293 5294 .archive .entry-footer .cat-links, 5295 .archive .entry-footer .tags-links, 5296 .search .entry-footer .cat-links, 5297 .search .entry-footer .tags-links, 5298 .blog .entry-footer .cat-links, 5299 .blog .entry-footer .tags-links { 5300 display: block; 5239 5301 } 5240 5302 … … 5695 5757 padding-bottom: 25px; 5696 5758 background-color: #d1e4dd; 5697 overflow-x: hidden;5698 overflow-y: auto;5699 5759 transition: all .15s ease-in-out; 5700 5760 transform: translateY(30px); … … 5705 5765 height: 100vh; 5706 5766 z-index: 499; 5767 overflow-x: hidden; 5768 overflow-y: auto; 5707 5769 border: 2px solid transparent; 5708 5770 } … … 5764 5826 display: none; 5765 5827 } 5766 .primary-navigation > .primary-menu-container ul > li :not(.hover).sub-menu-toggle[aria-expanded="false"] ~ ul {5828 .primary-navigation > .primary-menu-container ul > li .sub-menu-toggle[aria-expanded="false"] ~ ul { 5767 5829 display: none; 5768 5830 } … … 5854 5916 } 5855 5917 5856 .primary-navigation > div > .menu-wrapper .hover .sub-menu-toggle .icon-minus {5857 display: flex;5858 }5859 5860 .primary-navigation > div > .menu-wrapper .hover .sub-menu-toggle .icon-plus {5861 display: none;5862 }5863 5864 5918 .primary-navigation > div > .menu-wrapper > li > .sub-menu { 5865 5919 position: relative; … … 6123 6177 } 6124 6178 6179 .navigation .nav-links > * { 6180 min-width: 44px; 6181 min-height: 44px; 6182 } 6183 6125 6184 .navigation .nav-links .nav-next a, 6126 6185 .navigation .nav-links .nav-previous a { … … 6270 6329 } 6271 6330 6272 @media (prefers-color-scheme: dark){6273 .pagination .nav-links > *{6274 color: #f0f0f0;6275 }6276 }6277 6278 6331 .comments-pagination .nav-links > * { 6279 6332 color: #28303d; … … 6285 6338 } 6286 6339 6287 @media (prefers-color-scheme: dark){6288 .comments-pagination .nav-links > *{6289 color: #f0f0f0;6290 }6291 }6292 6293 6340 .pagination .nav-links > *.current { 6294 6341 border-bottom: 1px solid #28303d; … … 6368 6415 } 6369 6416 6370 @media only screen and (min-width: 822px) {6417 @media only screen and (min-width: 652px) { 6371 6418 .widget-area { 6372 6419 display: grid; 6420 grid-template-columns: repeat(2, 1fr); 6421 column-gap: 50px; 6422 } 6423 } 6424 6425 @media only screen and (min-width: 1024px) { 6426 .widget-area { 6373 6427 grid-template-columns: repeat(3, 1fr); 6374 column-gap: 50px;6375 6428 } 6376 6429 } … … 6738 6791 max-width: none; 6739 6792 } 6793 6794 .is-IE.has-background-dark { 6795 color: #fff; 6796 } 6797 6798 .is-IE.has-background-dark *, 6799 .is-IE.has-background-dark a, 6800 .is-IE.has-background-dark .site-description, 6801 .is-IE.has-background-dark .entry-title, 6802 .is-IE.has-background-dark .entry-footer, 6803 .is-IE.has-background-dark .widget-area, 6804 .is-IE.has-background-dark .post-navigation .meta-nav, 6805 .is-IE.has-background-dark .footer-navigation-wrapper li a:link, 6806 .is-IE.has-background-dark .site-footer > .site-info, 6807 .is-IE.has-background-dark .site-footer > .site-info a, 6808 .is-IE.has-background-dark .site-footer > .site-info a:visited { 6809 color: #fff; 6810 } 6811 6812 .is-IE.has-background-dark .sub-menu-toggle svg, 6813 .is-IE.has-background-dark .sub-menu-toggle path, 6814 .is-IE.has-background-dark .post-navigation .meta-nav svg, 6815 .is-IE.has-background-dark .post-navigation .meta-nav path { 6816 fill: #fff; 6817 } 6818 6819 .is-IE.has-background-dark .primary-navigation > div > .menu-wrapper > li > .sub-menu li { 6820 background: #000; 6821 } 6822 6823 @media only screen and (max-width: 481px) { 6824 .is-IE.has-background-dark.primary-navigation-open .primary-navigation > .primary-menu-container, 6825 .is-IE.has-background-dark.primary-navigation-open .menu-button-container { 6826 background-color: #000; 6827 } 6828 } 6829 6830 .is-IE.has-background-dark .skip-link:focus { 6831 color: #21759b; 6832 } 6740 6833 /*# sourceMappingURL=ie.css.map */ -
trunk/src/wp-content/themes/twentytwentyone/assets/css/style-editor.css
r49247 r49320 209 209 } 210 210 211 /* OS dark theme preference */212 @media (prefers-color-scheme: dark) {213 html.respect-color-scheme-preference {214 --global--color-background: var(--global--color-dark-gray);215 --global--color-primary: var(--global--color-light-gray);216 --global--color-secondary: var(--global--color-light-gray);217 --button--color-text: var(--global--color-background);218 --button--color-text-hover: var(--global--color-secondary);219 --button--color-text-active: var(--global--color-secondary);220 --button--color-background: var(--global--color-secondary);221 --button--color-background-active: var(--global--color-background);222 }223 html.respect-color-scheme-preference body {224 background-color: var(--global--color-background);225 }226 }227 228 211 /* Button extends */ 229 212 .wp-block-button__link, .wp-block-file .wp-block-file__button, .wp-block-search .wp-block-search__button { … … 527 510 .wp-block-code code { 528 511 font-size: var(--global--font-size-xs); 512 white-space: pre !important; 513 overflow-x: auto; 529 514 } 530 515 … … 535 520 border-width: 0.1rem; 536 521 padding: var(--global--spacing-unit); 522 color: currentColor; 537 523 } 538 524 … … 1108 1094 } 1109 1095 1096 pre.wp-block-preformatted { 1097 overflow-x: auto; 1098 white-space: pre !important; 1099 font-size: var(--global--font-size-xs); 1100 } 1101 1110 1102 .wp-block-pullquote { 1111 1103 padding: calc(2 * var(--global--spacing-unit)) 0; 1112 margin-left: 0;1113 margin-right: 0;1114 1104 text-align: center; 1115 1105 border-width: var(--pullquote--border-width); … … 1157 1147 1158 1148 .wp-block-pullquote.is-style-solid-color { 1149 margin-left: auto; 1150 margin-right: auto; 1159 1151 padding: calc(2.5 * var(--global--spacing-unit)); 1160 1152 border-width: var(--pullquote--border-width); … … 1462 1454 background-color: var(--button--color-background); 1463 1455 color: var(--button--color-text); 1456 } 1457 1458 .wp-block[data-align="center"] > * { 1459 text-align: center; 1460 } 1461 1462 .wp-block[data-align="center"] .wp-block-search__button-only .wp-block-search__inside-wrapper { 1463 justify-content: center; 1464 1464 } 1465 1465 … … 1619 1619 } 1620 1620 1621 .wp-block-tag-cloud.aligncenter { 1622 text-align: center; 1623 } 1624 1621 1625 pre.wp-block-verse { 1622 1626 padding: 0; -
trunk/src/wp-content/themes/twentytwentyone/assets/js/customize-preview.js
r49216 r49320 46 46 // Modify the body class depending on whether this is a dark background or not. 47 47 if ( isDark ) { 48 if ( ! document.body.classList.contains( ' is-background-dark' ) ) {49 document.body.classList.add( ' is-background-dark' );48 if ( ! document.body.classList.contains( 'has-background-dark' ) ) { 49 document.body.classList.add( 'has-background-dark' ); 50 50 } 51 51 } else { 52 document.body.classList.remove( ' is-background-dark' );52 document.body.classList.remove( 'has-background-dark' ); 53 53 } 54 54 -
trunk/src/wp-content/themes/twentytwentyone/assets/js/polyfills.js
r49216 r49320 1 1 /** 2 * File p rimary-navigation.js.2 * File polyfills.js. 3 3 * 4 * Required to open and close the mobile navigation.4 * Polyfills for IE11. 5 5 */ 6 6 -
trunk/src/wp-content/themes/twentytwentyone/assets/js/primary-navigation.js
r49250 r49320 40 40 */ 41 41 function twentytwentyoneExpandSubMenu( el ) { // jshint ignore:line 42 // Close submenu that was opened from a hover action.43 // We'll return early in this case to avoid changing the aria-expanded attribute.44 if ( el.parentNode.classList.contains( 'hover' ) ) {45 el.parentNode.classList.remove( 'hover' );46 return;47 }48 49 42 // Close other expanded items. 50 43 el.closest( 'nav' ).querySelectorAll( '.sub-menu-toggle' ).forEach( function( button ) { … … 131 124 document.getElementById( 'site-navigation' ).querySelectorAll( '.menu-wrapper > .menu-item-has-children' ).forEach( function( li ) { 132 125 li.addEventListener( 'mouseenter', function() { 133 if ( 'false' === this.querySelector( '.sub-menu-toggle' ).getAttribute( 'aria-expanded' ) ) { 134 this.classList.add( 'hover' ); 135 } 126 this.querySelector( '.sub-menu-toggle' ).setAttribute( 'aria-expanded', 'true' ); 136 127 } ); 137 128 li.addEventListener( 'mouseleave', function() { 138 this. classList.remove( 'hover' );129 this.querySelector( '.sub-menu-toggle' ).setAttribute( 'aria-expanded', 'false' ); 139 130 } ); 140 131 } ); -
trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-custom-colors.php
r49247 r49320 121 121 wp_add_inline_style( 'twenty-twenty-one-custom-color-overrides', $this->generate_custom_color_variables( 'editor' ) ); 122 122 } 123 124 $should_respect_color_scheme = get_theme_mod( 'respect_user_color_preference', true ); // @phpstan-ignore-line. Passing true instead of default value of false to get_theme_mod.125 if ( $should_respect_color_scheme && self::get_relative_luminance_from_hex( $background_color ) > 127 ) {126 // Add dark mode variable overrides.127 wp_add_inline_style( 'twenty-twenty-one-custom-color-overrides', '@media (prefers-color-scheme: dark) { :root .editor-styles-wrapper { --global--color-background: var(--global--color-dark-gray); --global--color-primary: var(--global--color-light-gray); --global--color-secondary: var(--global--color-light-gray); } }' );128 }129 123 } 130 124 … … 176 170 $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); 177 171 if ( 127 > self::get_relative_luminance_from_hex( $background_color ) ) { 178 $classes[] = ' is-background-dark';172 $classes[] = 'has-background-dark'; 179 173 } else { 180 $classes[] = ' is-background-light';174 $classes[] = 'has-background-light'; 181 175 } 182 176 -
trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php
r49247 r49320 147 147 ) 148 148 ); 149 150 $wp_customize->add_setting(151 'respect_user_color_preference',152 array(153 'capability' => 'edit_theme_options',154 'default' => true,155 'sanitize_callback' => function( $value ) {156 return (bool) $value;157 },158 )159 );160 161 $wp_customize->add_control(162 'respect_user_color_preference',163 array(164 'type' => 'checkbox',165 'section' => 'colors',166 'label' => esc_html__( 'Respect visitor\'s device dark mode settings', 'twentytwentyone' ),167 'description' => __( 'Dark mode is a device setting. If a visitor to your site requests it, your site will be shown with a dark background and light text.', 'twentytwentyone' ),168 'active_callback' => function( $value ) {169 return 127 < Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) );170 },171 )172 );173 149 } 174 150 -
trunk/src/wp-content/themes/twentytwentyone/comments.php
r49247 r49320 33 33 <h2 class="comments-title"> 34 34 <?php if ( '1' === $twenty_twenty_one_comment_count ) : ?> 35 <?php esc_html_e( '1 Reply', 'twentytwentyone' ); ?>35 <?php esc_html_e( '1 Comment', 'twentytwentyone' ); ?> 36 36 <?php else : ?> 37 37 <?php 38 38 printf( 39 39 /* translators: %s: comment count number. */ 40 esc_html( _nx( '%s Reply', '%s Replies', $twenty_twenty_one_comment_count, 'comments title', 'twentytwentyone' ) ),40 esc_html( _nx( '%s Comment', '%s Comments', $twenty_twenty_one_comment_count, 'comments title', 'twentytwentyone' ) ), 41 41 esc_html( number_format_i18n( $twenty_twenty_one_comment_count ) ) 42 42 ); … … 86 86 array( 87 87 'logged_in_as' => null, 88 'title_reply' => esc_html__( 'Leave a reply', 'twentytwentyone' ),88 'title_reply' => esc_html__( 'Leave a comment', 'twentytwentyone' ), 89 89 'title_reply_before' => '<h2 id="reply-title" class="comment-reply-title">', 90 90 'title_reply_after' => '</h2>', -
trunk/src/wp-content/themes/twentytwentyone/functions.php
r49247 r49320 337 337 338 338 // Add support for custom units. 339 // This was removed in WordPress 5.6 but is still required to properly support WP 5.5. 339 340 add_theme_support( 'custom-units' ); 340 341 } … … 416 417 } 417 418 419 wp_register_script( 420 'twenty-twenty-one-ie11-polyfills', 421 get_template_directory_uri() . '/assets/js/polyfills.js', 422 array(), 423 wp_get_theme()->get( 'Version' ), 424 true 425 ); 426 418 427 // Main navigation scripts. 419 428 if ( has_nav_menu( 'primary' ) ) { 420 wp_register_script(421 'twenty-twenty-one-ie11-polyfills',422 get_template_directory_uri() . '/assets/js/polyfills.js',423 array(),424 wp_get_theme()->get( 'Version' ),425 true426 );427 429 wp_enqueue_script( 428 430 'twenty-twenty-one-primary-navigation-script', … … 433 435 ); 434 436 } 437 438 // Responsive embeds script. 439 wp_enqueue_script( 440 'twenty-twenty-one-responsive-embeds-script', 441 get_template_directory_uri() . '/assets/js/responsive-embeds.js', 442 array( 'twenty-twenty-one-ie11-polyfills' ), 443 wp_get_theme()->get( 'Version' ), 444 true 445 ); 435 446 } 436 447 add_action( 'wp_enqueue_scripts', 'twenty_twenty_one_scripts' ); … … 543 554 add_action( 'customize_preview_init', 'twentytwentyone_customize_preview_init' ); 544 555 545 546 556 /** 547 557 * Enqueue scripts for the customizer. … … 560 570 true 561 571 ); 562 563 wp_enqueue_script(564 'twentytwentyone-customize-controls',565 get_theme_file_uri( '/assets/js/customize.js' ),566 array( 'customize-base', 'customize-controls', 'underscore', 'jquery', 'twentytwentyone-customize-helpers' ),567 wp_get_theme()->get( 'Version' ),568 true569 );570 571 wp_localize_script(572 'twentytwentyone-customize-controls',573 'backgroundColorNotice',574 array(575 'message' => esc_html__( 'You currently have dark mode enabled on your device. Changing the color picker will allow you to preview light mode.', 'twentytwentyone' ),576 )577 );578 572 } 579 573 add_action( 'customize_controls_enqueue_scripts', 'twentytwentyone_customize_controls_enqueue_scripts' ); … … 587 581 */ 588 582 function twentytwentyone_the_html_classes() { 589 $background_color = get_theme_mod( 'background_color', 'D1E4DD' ); 590 $should_respect_color_scheme = get_theme_mod( 'respect_user_color_preference', true ); 591 if ( $should_respect_color_scheme && 127 <= Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( $background_color ) ) { 592 echo 'class="respect-color-scheme-preference"'; 593 } 594 } 583 $classes = apply_filters( 'twentytwentyone_html_classes', '' ); 584 if ( ! $classes ) { 585 return; 586 } 587 echo 'class="' . esc_attr( $classes ) . '"'; 588 } 589 590 /** 591 * Add "is-IE" class to body if the user is on Internet Explorer. 592 * 593 * @since 1.0.0 594 * 595 * @return void 596 */ 597 function twentytwentyone_add_ie_class() { 598 ?> 599 <script> 600 if ( -1 !== navigator.userAgent.indexOf( 'MSIE' ) || -1 !== navigator.appVersion.indexOf( 'Trident/' ) ) { 601 document.body.classList.add( 'is-IE' ); 602 } 603 </script> 604 <?php 605 } 606 add_action( 'wp_footer', 'twentytwentyone_add_ie_class' ); -
trunk/src/wp-content/themes/twentytwentyone/inc/template-functions.php
r49247 r49320 225 225 function twenty_twenty_one_continue_reading_link() { 226 226 if ( ! is_admin() ) { 227 return '<div class="more-link-container"><a class="more-link" href="' . esc_url( get_permalink() ) . ' ">' . twenty_twenty_one_continue_reading_text() . '</a></div>';227 return '<div class="more-link-container"><a class="more-link" href="' . esc_url( get_permalink() ) . '#more-' . esc_attr( get_the_ID() ) . '">' . twenty_twenty_one_continue_reading_text() . '</a></div>'; 228 228 } 229 229 } -
trunk/src/wp-content/themes/twentytwentyone/inc/template-tags.php
r49247 r49320 106 106 printf( 107 107 /* translators: %s: list of categories. */ 108 '<span class="cat-links">' . esc_html__( 'Categorized as %s', 'twentytwentyone' ) . ' .</span>',108 '<span class="cat-links">' . esc_html__( 'Categorized as %s', 'twentytwentyone' ) . ' </span>', 109 109 $categories_list // phpcs:ignore WordPress.Security.EscapeOutput 110 110 ); … … 116 116 printf( 117 117 /* translators: %s: list of tags. */ 118 '<span class="tags-links">' . esc_html__( 'Tagged %s', 'twentytwentyone' ) . ' .</span>',118 '<span class="tags-links">' . esc_html__( 'Tagged %s', 'twentytwentyone' ) . '</span>', 119 119 $tags_list // phpcs:ignore WordPress.Security.EscapeOutput 120 120 ); -
trunk/src/wp-content/themes/twentytwentyone/searchform.php
r49216 r49320 19 19 $twentytwentyone_unique_id = wp_unique_id( 'search-form-' ); 20 20 21 $twentytwentyone_aria_label = ! empty( $args[' label'] ) ? 'aria-label="' . esc_attr( $args['label'] ) . '"' : '';21 $twentytwentyone_aria_label = ! empty( $args['aria_label'] ) ? 'aria-label="' . esc_attr( $args['aria_label'] ) . '"' : ''; 22 22 ?> 23 23 <form role="search" <?php echo $twentytwentyone_aria_label; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped above. ?> method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>"> -
trunk/src/wp-content/themes/twentytwentyone/style-rtl.css
r49247 r49320 11 11 Version: 1.0.0 12 12 License: GNU General Public License v2 or later 13 License URI: LICENSE13 License URI: http://www.gnu.org/licenses/gpl-2.0.html 14 14 Text Domain: twentytwentyone 15 15 Tags: one-column, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready … … 301 301 } 302 302 303 /* OS dark theme preference */304 @media (prefers-color-scheme: dark) {305 html.respect-color-scheme-preference {306 --global--color-background: var(--global--color-dark-gray);307 --global--color-primary: var(--global--color-light-gray);308 --global--color-secondary: var(--global--color-light-gray);309 --button--color-text: var(--global--color-background);310 --button--color-text-hover: var(--global--color-secondary);311 --button--color-text-active: var(--global--color-secondary);312 --button--color-background: var(--global--color-secondary);313 --button--color-background-active: var(--global--color-background);314 }315 html.respect-color-scheme-preference body {316 background-color: var(--global--color-background);317 }318 }319 320 303 /* Button extends */ 321 304 .site .button, … … 1232 1215 } 1233 1216 1217 input[type="email"], 1218 input[type="url"] { 1219 direction: ltr; 1220 } 1221 1234 1222 select { 1235 1223 border: var(--form--border-width) solid var(--form--border-color); … … 1413 1401 } 1414 1402 1403 fieldset { 1404 display: grid; 1405 border-color: var(--global--color-secondary); 1406 padding: var(--global--spacing-horizontal); 1407 } 1408 1409 fieldset legend { 1410 font-size: var(--global--font-size-lg); 1411 } 1412 1413 fieldset input[type="submit"] { 1414 max-width: max-content; 1415 } 1416 1417 fieldset input:not([type="submit"]) { 1418 margin-bottom: var(--global--spacing-unit); 1419 } 1420 1421 fieldset input[type="radio"], fieldset input[type="checkbox"] { 1422 margin-bottom: 0; 1423 } 1424 1425 fieldset input[type="radio"] + label, 1426 fieldset input[type="checkbox"] + label { 1427 font-size: var(--form--font-size); 1428 padding-right: 0; 1429 margin-bottom: var(--global--spacing-unit); 1430 } 1431 1415 1432 img { 1416 1433 display: block; … … 1479 1496 1480 1497 pre { 1481 white-space: pre-wrap; 1498 white-space: pre; 1499 overflow-x: auto; 1482 1500 } 1483 1501 … … 1577 1595 .wp-block-code code { 1578 1596 font-size: var(--global--font-size-xs); 1579 overflow: auto; 1597 white-space: pre; 1598 overflow-x: auto; 1599 display: block; 1580 1600 } 1581 1601 … … 1621 1641 } 1622 1642 1643 .wp-block-columns.is-style-twentytwentyone-columns-overlap { 1644 justify-content: space-around; 1645 } 1646 1623 1647 @media only screen and (min-width: 652px) { 1624 .wp-block-columns.is-style-twentytwentyone-columns-overlap .wp-block-column {1625 flex-grow: 1;1626 }1627 1648 .wp-block-columns.is-style-twentytwentyone-columns-overlap .wp-block-column:nth-child(2n) { 1628 1649 margin-right: calc(-2 * var(--global--spacing-horizontal)); … … 2439 2460 margin-right: calc(0.4 * var(--global--spacing-horizontal)); 2440 2461 } 2462 } 2463 2464 pre.wp-block-preformatted { 2465 overflow-x: auto; 2466 white-space: pre; 2441 2467 } 2442 2468 … … 2805 2831 } 2806 2832 2833 .wp-block-search__button-inside .wp-block-search__inside-wrapper { 2834 background-color: var(--global--color-white); 2835 } 2836 2837 .wp-block-search__button-only.aligncenter .wp-block-search__inside-wrapper { 2838 justify-content: center; 2839 } 2840 2807 2841 .wp-block-search .wp-block-search__label { 2808 2842 font-size: var(--form--font-size); … … 2819 2853 margin-left: calc(-1 * var(--button--border-width)); 2820 2854 padding: var(--form--spacing-unit); 2855 background-color: var(--global--color-white); 2821 2856 } 2822 2857 … … 3003 3038 } 3004 3039 3040 .wp-block-tag-cloud.alignfull { 3041 padding-right: var(--global--spacing-unit); 3042 padding-left: var(--global--spacing-unit); 3043 } 3044 3005 3045 .wp-block-verse { 3006 3046 font-family: var(--entry-content--font-family); … … 3434 3474 3435 3475 .page-links .post-page-numbers { 3476 display: inline-block; 3436 3477 margin-right: calc(0.66 * var(--global--spacing-unit)); 3437 3478 margin-left: calc(0.66 * var(--global--spacing-unit)); 3438 padding: calc(0.33 * var(--global--spacing-vertical)) 0; 3479 min-width: 44px; 3480 min-height: 44px; 3439 3481 } 3440 3482 … … 3489 3531 } 3490 3532 3491 .entry-content .more-link:hover {3492 text-decoration: none;3493 }3494 3495 3533 .entry-content > iframe[style] { 3496 3534 margin: var(--global--spacing-vertical) 0 !important; … … 3510 3548 font-size: var(--global--font-size-xs); 3511 3549 display: block; 3550 } 3551 3552 .entry-footer > span { 3553 display: inline-block; 3512 3554 } 3513 3555 … … 3671 3713 .blog .format-video .entry-content { 3672 3714 margin-top: calc(2 * var(--global--spacing-vertical)); 3715 } 3716 3717 .archive .entry-footer .cat-links, 3718 .archive .entry-footer .tags-links, 3719 .search .entry-footer .cat-links, 3720 .search .entry-footer .tags-links, 3721 .blog .entry-footer .cat-links, 3722 .blog .entry-footer .tags-links { 3723 display: block; 3673 3724 } 3674 3725 … … 4059 4110 padding-bottom: var(--global--spacing-horizontal); 4060 4111 background-color: var(--global--color-background); 4061 overflow-x: hidden;4062 overflow-y: auto;4063 4112 transition: all .15s ease-in-out; 4064 4113 transform: translateY(var(--global--spacing-vertical)); … … 4069 4118 height: 100vh; 4070 4119 z-index: 499; 4120 overflow-x: hidden; 4121 overflow-y: auto; 4071 4122 border: 2px solid transparent; 4072 4123 } … … 4128 4179 display: none; 4129 4180 } 4130 .primary-navigation > .primary-menu-container ul > li :not(.hover).sub-menu-toggle[aria-expanded="false"] ~ ul {4181 .primary-navigation > .primary-menu-container ul > li .sub-menu-toggle[aria-expanded="false"] ~ ul { 4131 4182 display: none; 4132 4183 } … … 4218 4269 } 4219 4270 4220 .primary-navigation > div > .menu-wrapper .hover .sub-menu-toggle .icon-minus {4221 display: flex;4222 }4223 4224 .primary-navigation > div > .menu-wrapper .hover .sub-menu-toggle .icon-plus {4225 display: none;4226 }4227 4228 4271 .primary-navigation > div > .menu-wrapper > li > .sub-menu { 4229 4272 position: relative; … … 4471 4514 } 4472 4515 4516 .navigation .nav-links > * { 4517 min-width: 44px; 4518 min-height: 44px; 4519 } 4520 4473 4521 .navigation .nav-links .nav-next a, 4474 4522 .navigation .nav-links .nav-previous a { … … 4666 4714 } 4667 4715 4668 @media only screen and (min-width: 822px) {4716 @media only screen and (min-width: 652px) { 4669 4717 .widget-area { 4670 4718 display: grid; 4719 grid-template-columns: repeat(2, 1fr); 4720 column-gap: calc(2 * var(--global--spacing-horizontal)); 4721 } 4722 } 4723 4724 @media only screen and (min-width: 1024px) { 4725 .widget-area { 4671 4726 grid-template-columns: repeat(3, 1fr); 4672 column-gap: calc(2 * var(--global--spacing-horizontal));4673 4727 } 4674 4728 } … … 4974 5028 max-width: none; 4975 5029 } 5030 5031 .is-IE.has-background-dark { 5032 color: #fff; 5033 } 5034 5035 .is-IE.has-background-dark *, 5036 .is-IE.has-background-dark a, 5037 .is-IE.has-background-dark .site-description, 5038 .is-IE.has-background-dark .entry-title, 5039 .is-IE.has-background-dark .entry-footer, 5040 .is-IE.has-background-dark .widget-area, 5041 .is-IE.has-background-dark .post-navigation .meta-nav, 5042 .is-IE.has-background-dark .footer-navigation-wrapper li a:link, 5043 .is-IE.has-background-dark .site-footer > .site-info, 5044 .is-IE.has-background-dark .site-footer > .site-info a, 5045 .is-IE.has-background-dark .site-footer > .site-info a:visited { 5046 color: #fff; 5047 } 5048 5049 .is-IE.has-background-dark .sub-menu-toggle svg, 5050 .is-IE.has-background-dark .sub-menu-toggle path, 5051 .is-IE.has-background-dark .post-navigation .meta-nav svg, 5052 .is-IE.has-background-dark .post-navigation .meta-nav path { 5053 fill: #fff; 5054 } 5055 5056 .is-IE.has-background-dark .primary-navigation > div > .menu-wrapper > li > .sub-menu li { 5057 background: #000; 5058 } 5059 5060 @media only screen and (max-width: 481px) { 5061 .is-IE.has-background-dark.primary-navigation-open .primary-navigation > .primary-menu-container, 5062 .is-IE.has-background-dark.primary-navigation-open .menu-button-container { 5063 background-color: #000; 5064 } 5065 } 5066 5067 .is-IE.has-background-dark .skip-link:focus { 5068 color: #21759b; 5069 } -
trunk/src/wp-content/themes/twentytwentyone/style.css
r49247 r49320 11 11 Version: 1.0.0 12 12 License: GNU General Public License v2 or later 13 License URI: LICENSE13 License URI: http://www.gnu.org/licenses/gpl-2.0.html 14 14 Text Domain: twentytwentyone 15 15 Tags: one-column, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready … … 301 301 } 302 302 303 /* OS dark theme preference */304 @media (prefers-color-scheme: dark) {305 html.respect-color-scheme-preference {306 --global--color-background: var(--global--color-dark-gray);307 --global--color-primary: var(--global--color-light-gray);308 --global--color-secondary: var(--global--color-light-gray);309 --button--color-text: var(--global--color-background);310 --button--color-text-hover: var(--global--color-secondary);311 --button--color-text-active: var(--global--color-secondary);312 --button--color-background: var(--global--color-secondary);313 --button--color-background-active: var(--global--color-background);314 }315 html.respect-color-scheme-preference body {316 background-color: var(--global--color-background);317 }318 }319 320 303 /* Button extends */ 321 304 .site .button, … … 1236 1219 } 1237 1220 1221 input[type="email"], 1222 input[type="url"] { 1223 /*rtl:ignore*/ 1224 direction: ltr; 1225 } 1226 1238 1227 select { 1239 1228 border: var(--form--border-width) solid var(--form--border-color); … … 1417 1406 } 1418 1407 1408 fieldset { 1409 display: grid; 1410 border-color: var(--global--color-secondary); 1411 padding: var(--global--spacing-horizontal); 1412 } 1413 1414 fieldset legend { 1415 font-size: var(--global--font-size-lg); 1416 } 1417 1418 fieldset input[type="submit"] { 1419 max-width: max-content; 1420 } 1421 1422 fieldset input:not([type="submit"]) { 1423 margin-bottom: var(--global--spacing-unit); 1424 } 1425 1426 fieldset input[type="radio"], fieldset input[type="checkbox"] { 1427 margin-bottom: 0; 1428 } 1429 1430 fieldset input[type="radio"] + label, 1431 fieldset input[type="checkbox"] + label { 1432 font-size: var(--form--font-size); 1433 padding-left: 0; 1434 margin-bottom: var(--global--spacing-unit); 1435 } 1436 1419 1437 img { 1420 1438 display: block; … … 1483 1501 1484 1502 pre { 1485 white-space: pre-wrap; 1503 white-space: pre; 1504 overflow-x: auto; 1486 1505 } 1487 1506 … … 1581 1600 .wp-block-code code { 1582 1601 font-size: var(--global--font-size-xs); 1583 overflow: auto; 1602 white-space: pre; 1603 overflow-x: auto; 1604 display: block; 1584 1605 } 1585 1606 … … 1625 1646 } 1626 1647 1648 .wp-block-columns.is-style-twentytwentyone-columns-overlap { 1649 justify-content: space-around; 1650 } 1651 1627 1652 @media only screen and (min-width: 652px) { 1628 .wp-block-columns.is-style-twentytwentyone-columns-overlap .wp-block-column {1629 flex-grow: 1;1630 }1631 1653 .wp-block-columns.is-style-twentytwentyone-columns-overlap .wp-block-column:nth-child(2n) { 1632 1654 margin-left: calc(-2 * var(--global--spacing-horizontal)); … … 2443 2465 margin-left: calc(0.4 * var(--global--spacing-horizontal)); 2444 2466 } 2467 } 2468 2469 pre.wp-block-preformatted { 2470 overflow-x: auto; 2471 white-space: pre; 2445 2472 } 2446 2473 … … 2809 2836 } 2810 2837 2838 .wp-block-search__button-inside .wp-block-search__inside-wrapper { 2839 background-color: var(--global--color-white); 2840 } 2841 2842 .wp-block-search__button-only.aligncenter .wp-block-search__inside-wrapper { 2843 justify-content: center; 2844 } 2845 2811 2846 .wp-block-search .wp-block-search__label { 2812 2847 font-size: var(--form--font-size); … … 2823 2858 margin-right: calc(-1 * var(--button--border-width)); 2824 2859 padding: var(--form--spacing-unit); 2860 background-color: var(--global--color-white); 2825 2861 } 2826 2862 … … 3007 3043 } 3008 3044 3045 .wp-block-tag-cloud.alignfull { 3046 padding-left: var(--global--spacing-unit); 3047 padding-right: var(--global--spacing-unit); 3048 } 3049 3009 3050 .wp-block-verse { 3010 3051 font-family: var(--entry-content--font-family); … … 3443 3484 3444 3485 .page-links .post-page-numbers { 3486 display: inline-block; 3445 3487 margin-left: calc(0.66 * var(--global--spacing-unit)); 3446 3488 margin-right: calc(0.66 * var(--global--spacing-unit)); 3447 padding: calc(0.33 * var(--global--spacing-vertical)) 0; 3489 min-width: 44px; 3490 min-height: 44px; 3448 3491 } 3449 3492 … … 3498 3541 } 3499 3542 3500 .entry-content .more-link:hover {3501 text-decoration: none;3502 }3503 3504 3543 .entry-content > iframe[style] { 3505 3544 margin: var(--global--spacing-vertical) 0 !important; … … 3519 3558 font-size: var(--global--font-size-xs); 3520 3559 display: block; 3560 } 3561 3562 .entry-footer > span { 3563 display: inline-block; 3521 3564 } 3522 3565 … … 3680 3723 .blog .format-video .entry-content { 3681 3724 margin-top: calc(2 * var(--global--spacing-vertical)); 3725 } 3726 3727 .archive .entry-footer .cat-links, 3728 .archive .entry-footer .tags-links, 3729 .search .entry-footer .cat-links, 3730 .search .entry-footer .tags-links, 3731 .blog .entry-footer .cat-links, 3732 .blog .entry-footer .tags-links { 3733 display: block; 3682 3734 } 3683 3735 … … 4068 4120 padding-bottom: var(--global--spacing-horizontal); 4069 4121 background-color: var(--global--color-background); 4070 overflow-x: hidden;4071 overflow-y: auto;4072 4122 transition: all .15s ease-in-out; 4073 4123 transform: translateY(var(--global--spacing-vertical)); … … 4078 4128 height: 100vh; 4079 4129 z-index: 499; 4130 overflow-x: hidden; 4131 overflow-y: auto; 4080 4132 border: 2px solid transparent; 4081 4133 } … … 4137 4189 display: none; 4138 4190 } 4139 .primary-navigation > .primary-menu-container ul > li :not(.hover).sub-menu-toggle[aria-expanded="false"] ~ ul {4191 .primary-navigation > .primary-menu-container ul > li .sub-menu-toggle[aria-expanded="false"] ~ ul { 4140 4192 display: none; 4141 4193 } … … 4227 4279 } 4228 4280 4229 .primary-navigation > div > .menu-wrapper .hover .sub-menu-toggle .icon-minus {4230 display: flex;4231 }4232 4233 .primary-navigation > div > .menu-wrapper .hover .sub-menu-toggle .icon-plus {4234 display: none;4235 }4236 4237 4281 .primary-navigation > div > .menu-wrapper > li > .sub-menu { 4238 4282 position: relative; … … 4480 4524 } 4481 4525 4526 .navigation .nav-links > * { 4527 min-width: 44px; 4528 min-height: 44px; 4529 } 4530 4482 4531 .navigation .nav-links .nav-next a, 4483 4532 .navigation .nav-links .nav-previous a { … … 4675 4724 } 4676 4725 4677 @media only screen and (min-width: 822px) {4726 @media only screen and (min-width: 652px) { 4678 4727 .widget-area { 4679 4728 display: grid; 4729 grid-template-columns: repeat(2, 1fr); 4730 column-gap: calc(2 * var(--global--spacing-horizontal)); 4731 } 4732 } 4733 4734 @media only screen and (min-width: 1024px) { 4735 .widget-area { 4680 4736 grid-template-columns: repeat(3, 1fr); 4681 column-gap: calc(2 * var(--global--spacing-horizontal));4682 4737 } 4683 4738 } … … 4984 5039 } 4985 5040 5041 .is-IE.has-background-dark { 5042 color: #fff; 5043 } 5044 5045 .is-IE.has-background-dark *, 5046 .is-IE.has-background-dark a, 5047 .is-IE.has-background-dark .site-description, 5048 .is-IE.has-background-dark .entry-title, 5049 .is-IE.has-background-dark .entry-footer, 5050 .is-IE.has-background-dark .widget-area, 5051 .is-IE.has-background-dark .post-navigation .meta-nav, 5052 .is-IE.has-background-dark .footer-navigation-wrapper li a:link, 5053 .is-IE.has-background-dark .site-footer > .site-info, 5054 .is-IE.has-background-dark .site-footer > .site-info a, 5055 .is-IE.has-background-dark .site-footer > .site-info a:visited { 5056 color: #fff; 5057 } 5058 5059 .is-IE.has-background-dark .sub-menu-toggle svg, 5060 .is-IE.has-background-dark .sub-menu-toggle path, 5061 .is-IE.has-background-dark .post-navigation .meta-nav svg, 5062 .is-IE.has-background-dark .post-navigation .meta-nav path { 5063 fill: #fff; 5064 } 5065 5066 .is-IE.has-background-dark .primary-navigation > div > .menu-wrapper > li > .sub-menu li { 5067 background: #000; 5068 } 5069 5070 @media only screen and (max-width: 481px) { 5071 .is-IE.has-background-dark.primary-navigation-open .primary-navigation > .primary-menu-container, 5072 .is-IE.has-background-dark.primary-navigation-open .menu-button-container { 5073 background-color: #000; 5074 } 5075 } 5076 5077 .is-IE.has-background-dark .skip-link:focus { 5078 color: #21759b; 5079 } 5080 4986 5081 /*# sourceMappingURL=style.css.map */
Note: See TracChangeset
for help on using the changeset viewer.