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 472 483 473 } 484 474 … … 489 479 border-width: 0.1rem; 490 480 padding: 20px; 481 491 482 } 492 483 … … 1552 1543 } 1553 1544 1545 1546 1547 1548 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 1615 1619 1616 padding: 50px; 1620 1617 border-width: 3px; … … 2012 2009 background-color: #39414d; 2013 2010 color: #d1e4dd; 2011 2012 2013 2014 2015 2016 2017 2018 2014 2019 } 2015 2020 … … 2229 2234 } 2230 2235 2236 2237 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: 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 1792 1793 1794 1795 1796 1803 1797 select { 1804 1798 border: 3px solid #39414d; … … 1997 1991 } 1998 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 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 2303 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 3527 3528 3492 3529 } 3493 3530 … … 4023 4060 } 4024 4061 4062 4063 4064 4065 4066 4067 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 4039 4085 } 4040 4086 … … 4279 4325 .wp-calendar-nav .wp-calendar-nav-next { 4280 4326 float: right; 4327 4328 4329 4330 4331 4281 4332 } 4282 4333 … … 4885 4936 4886 4937 .page-links .post-page-numbers { 4938 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 5035 4983 5036 } 4984 5037 … … 5237 5290 .blog .format-video .entry-content { 5238 5291 margin-top: 60px; 5292 5293 5294 5295 5296 5297 5298 5299 5300 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 5768 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 6180 6181 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: 2px) { 6371 6418 .widget-area { 6372 6419 display: grid; 6420 6421 6422 6423 6424 6425 6426 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 6795 6796 6797 6798 6799 6800 6801 6802 6803 6804 6805 6806 6807 6808 6809 6810 6811 6812 6813 6814 6815 6816 6817 6818 6819 6820 6821 6822 6823 6824 6825 6826 6827 6828 6829 6830 6831 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 513 529 514 } 530 515 … … 535 520 border-width: 0.1rem; 536 521 padding: var(--global--spacing-unit); 522 537 523 } 538 524 … … 1108 1094 } 1109 1095 1096 1097 1098 1099 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 1150 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 1459 1460 1461 1462 1463 1464 1464 } 1465 1465 … … 1619 1619 } 1620 1620 1621 1622 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( 's-background-dark' ) ) { 49 document.body.classList.add( 's-background-dark' ); 50 50 } 51 51 } else { 52 document.body.classList.remove( ' is-background-dark' );52 document.body.classList.remove( 's-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 p.js. 3 3 * 4 * Required to open and close the mobile navigation.4 * . 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.' ); 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[] = 's-background-dark'; 179 173 } else { 180 $classes[] = ' is-background-light';174 $classes[] = 's-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 ', '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 s', $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 ', '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 339 340 add_theme_support( 'custom-units' ); 340 341 } … … 416 417 } 417 418 419 420 421 422 423 424 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 439 440 441 442 443 444 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() ) . '">' . 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['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: 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 1218 1219 1220 1221 1234 1222 select { 1235 1223 border: var(--form--border-width) solid var(--form--border-color); … … 1413 1401 } 1414 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 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 1644 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 2465 2466 2441 2467 } 2442 2468 … … 2805 2831 } 2806 2832 2833 2834 2835 2836 2837 2838 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 2821 2856 } 2822 2857 … … 3003 3038 } 3004 3039 3040 3041 3042 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 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 3553 3512 3554 } 3513 3555 … … 3671 3713 .blog .format-video .entry-content { 3672 3714 margin-top: calc(2 * var(--global--spacing-vertical)); 3715 3716 3717 3718 3719 3720 3721 3722 3723 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 4121 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 4517 4518 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: 2px) { 4669 4717 .widget-area { 4670 4718 display: grid; 4719 4720 4721 4722 4723 4724 4725 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 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 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: 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 1222 1223 1224 1225 1226 1238 1227 select { 1239 1228 border: var(--form--border-width) solid var(--form--border-color); … … 1417 1406 } 1418 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 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 1649 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 2470 2471 2445 2472 } 2446 2473 … … 2809 2836 } 2810 2837 2838 2839 2840 2841 2842 2843 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 2825 2861 } 2826 2862 … … 3007 3043 } 3008 3044 3045 3046 3047 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 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 3563 3521 3564 } 3522 3565 … … 3680 3723 .blog .format-video .entry-content { 3681 3724 margin-top: calc(2 * var(--global--spacing-vertical)); 3725 3726 3727 3728 3729 3730 3731 3732 3733 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 4131 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 4527 4528 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: 2px) { 4678 4727 .widget-area { 4679 4728 display: grid; 4729 4730 4731 4732 4733 4734 4735 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 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 4986 5081 /*# sourceMappingURL=style.css.map */
Note: See TracChangeset
for help on using the changeset viewer.