Make WordPress Core

Changeset 46701


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

Bundled Themes: Update Twenty Twenty.

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

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

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

Legend:

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

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

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

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

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

    r46613 r46701  
    2020         *
    2121         * Return CSS for non-latin language, if available, or null
    22          *
     22         * 
    2323         * @param string $type Whether to return CSS for the "front-end", "block-editor" or "classic-editor".
    2424         *
  • trunk/src/wp-content/themes/twentytwenty/footer.php

    r46613 r46701  
    2727                            ?>
    2828                            <a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php echo bloginfo( 'name' ); ?></a>
    29                         </p>
     29                        </p><!-- .footer-copyright -->
    3030
    3131                        <p class="powered-by-wordpress">
  • trunk/src/wp-content/themes/twentytwenty/functions.php

    r46668 r46701  
    2020 * WP Body Open
    2121 * Register Sidebars
    22  * Enqueue block editor assets
    23  * Enqueue classic editor styles
    24  * Block editor settings
     22 * Enqueue Block Editor Assets
     23 * Enqueue Classic Editor Styles
     24 * Block Editor Settings
    2525 */
    2626
     
    120120    add_theme_support( 'align-wide' );
    121121
    122     // Adds starter content to highlight the theme on fresh sites.
    123     add_theme_support( 'starter-content', twentytwenty_get_starter_content() );
     122    /*
     123     * Adds starter content to highlight the theme on fresh sites.
     124     * This is done conditionally to avoid loading the starter content on every
     125     * page load, as it is a one-off operation only needed once in the customizer.
     126     */
     127    if ( is_customize_preview() ) {
     128        require get_template_directory() . '/inc/starter-content.php';
     129        add_theme_support( 'starter-content', twentytwenty_get_starter_content() );
     130    }
    124131
    125132    // Add theme support for selective refresh for widgets.
     
    167174// Custom CSS.
    168175require get_template_directory() . '/inc/custom-css.php';
    169 
    170 // Custom starter content to highlight the theme on fresh sites.
    171 require get_template_directory() . '/inc/starter-content.php';
    172176
    173177/**
     
    532536                'shortName' => _x( 'M', 'Short name of the regular font size in the block editor.', 'twentytwenty' ),
    533537                'size'      => 21,
    534                 'slug'      => 'regular',
     538                'slug'      => 'normal',
    535539            ),
    536540            array(
     
    693697        'content'       => array(
    694698            'accent'     => array(
    695                 'color'        => array( '.color-accent', '.color-accent-hover:hover', '.color-accent-hover:focus', ':root .has-accent-color', '.has-drop-cap:not(:focus):first-letter', '.wp-block-button.is-style-outline', 'a' ),
    696                 'border-color' => array( 'blockquote', '.border-color-accent', '.border-color-accent-hover:hover', '.border-color-accent-hover:focus' ),
    697                 'background => array( 'button:not(.toggle)', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file .wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.bg-accent', '.bg-accent-hover:hover', '.bg-accent-hover:focus', ':root .has-accent-background-color', '.comment-reply-link' ),
    698                 'fill'         => array( '.fill-children-accent', '.fill-children-accent *' ),
     699                'color'            => array( '.color-accent', '.color-accent-hover:hover', '.color-accent-hover:focus', ':root .has-accent-color', '.has-drop-cap:not(:focus):first-letter', '.wp-block-button.is-style-outline', 'a' ),
     700                'border-color'     => array( 'blockquote', '.border-color-accent', '.border-color-accent-hover:hover', '.border-color-accent-hover:focus' ),
     701                'background-color' => array( 'button:not(.toggle)', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file .wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.bg-accent', '.bg-accent-hover:hover', '.bg-accent-hover:focus', ':root .has-accent-background-color', '.comment-reply-link' ),
     702                'fill'             => array( '.fill-children-accent', '.fill-children-accent *' ),
    699703            ),
    700704            'background' => array(
    701                 'color'      => array( ':root .has-background-color', 'button', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.wp-block-button', '.comment-reply-link' ),
    702                 'background' => array( ':root .has-background-background-color' ),
     705                'color'            => array( ':root .has-background-color', 'button', '.button', '.faux-button', '.wp-block-button__link', '.wp-block-file__button', 'input[type="button"]', 'input[type="reset"]', 'input[type="submit"]', '.wp-block-button', '.comment-reply-link', '.has-background.has-primary-background-color:not(.has-text-color)', '.has-background.has-primary-background-color *:not(.has-text-color)', '.has-background.has-accent-background-color:not(.has-text-color)', '.has-background.has-accent-background-color *:not(.has-text-color)' ),
     706                'background-color' => array( ':root .has-background-background-color' ),
    703707            ),
    704708            'text'       => array(
    705                 'color'      => array( 'body', '.entry-title a', ':root .has-primary-color' ),
    706                 'background' => array( ':root .has-primary-background-color' ),
     709                'color'            => array( 'body', '.entry-title a', ':root .has-primary-color' ),
     710                'background-color' => array( ':root .has-primary-background-color' ),
    707711            ),
    708712            'secondary'  => array(
    709                 'color'      => array( 'cite', 'figcaption', '.wp-caption-text', '.post-meta', '.entry-content .wp-block-archives li', '.entry-content .wp-block-categories li', '.entry-content .wp-block-latest-posts li', '.wp-block-latest-comments__comment-date', '.wp-block-latest-posts__post-date', '.wp-block-embed figcaption', '.wp-block-image figcaption', '.wp-block-pullquote cite', '.comment-metadata', '.comment-respond .comment-notes', '.comment-respond .logged-in-as', '.pagination .dots', '.entry-content hr:not(.has-background)', 'hr.styled-separator', ':root .has-secondary-color' ),
    710                 'background' => array( ':root .has-secondary-background-color' ),
     713                'color'            => array( 'cite', 'figcaption', '.wp-caption-text', '.post-meta', '.entry-content .wp-block-archives li', '.entry-content .wp-block-categories li', '.entry-content .wp-block-latest-posts li', '.wp-block-latest-comments__comment-date', '.wp-block-latest-posts__post-date', '.wp-block-embed figcaption', '.wp-block-image figcaption', '.wp-block-pullquote cite', '.comment-metadata', '.comment-respond .comment-notes', '.comment-respond .logged-in-as', '.pagination .dots', '.entry-content hr:not(.has-background)', 'hr.styled-separator', ':root .has-secondary-color' ),
     714                'background-color' => array( ':root .has-secondary-background-color' ),
    711715            ),
    712716            'borders'    => array(
    713717                'border-color'        => array( 'pre', 'fieldset', 'input', 'textarea', 'table', 'table *', 'hr' ),
    714                 'background'          => array( 'caption', 'code', 'code', 'kbd', 'samp', '.wp-block-table.is-style-stripes tbody tr:nth-child(odd)', ':root .has-subtle-background-background-color' ),
     718                'background-color'    => array( 'caption', 'code', 'code', 'kbd', 'samp', '.wp-block-table.is-style-stripes tbody tr:nth-child(odd)', ':root .has-subtle-background-background-color' ),
    715719                'border-bottom-color' => array( '.wp-block-table.is-style-stripes' ),
    716720                'border-top-color'    => array( '.wp-block-latest-posts.is-grid li' ),
     
    720724        'header-footer' => array(
    721725            'accent'     => array(
    722                 'color'      => array( 'body:not(.overlay-header) .primary-menu > li > a', 'body:not(.overlay-header) .primary-menu > li > .icon', '.modal-menu a', '.footer-menu a, .footer-widgets a', '#site-footer .wp-block-button.is-style-outline', '.wp-block-pullquote:before', '.singular:not(.overlay-header) .entry-header a', '.archive-header a', '.header-footer-group .color-accent', '.header-footer-group .color-accent-hover:hover' ),
    723                 '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"]' ),
     726                'color'            => array( 'body:not(.overlay-header) .primary-menu > li > a', 'body:not(.overlay-header) .primary-menu > li > .icon', '.modal-menu a', '.footer-menu a, .footer-widgets a', '#site-footer .wp-block-button.is-style-outline', '.wp-block-pullquote:before', '.singular:not(.overlay-header) .entry-header a', '.archive-header a', '.header-footer-group .color-accent', '.header-footer-group .color-accent-hover:hover' ),
     727                'background-color' => 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"]' ),
    724728            ),
    725729            'background' => array(
    726                 '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"]' ),
    727                 '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' ),
     730                '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"]' ),
     731                'background-color' => 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' ),
    728732            ),
    729733            'text'       => array(
    730734                'color'               => array( '.header-footer-group', 'body:not(.overlay-header) #site-header .toggle', '.menu-modal .toggle' ),
    731                 'background'          => array( 'body:not(.overlay-header) .primary-menu ul' ),
     735                'background-color'    => array( 'body:not(.overlay-header) .primary-menu ul' ),
    732736                'border-bottom-color' => array( 'body:not(.overlay-header) .primary-menu > li > ul:after' ),
    733737                'border-left-color'   => array( 'body:not(.overlay-header) .primary-menu ul ul:after' ),
     
    737741            ),
    738742            'borders'    => array(
    739                 'border-color' => array( '.header-footer-group pre', '.header-footer-group fieldset', '.header-footer-group input', '.header-footer-group textarea', '.header-footer-group table', '.header-footer-group table *', '.footer-nav-widgets-wrapper', '#site-footer', '.menu-modal nav *', '.footer-widgets-outer-wrapper', '.footer-top' ),
    740                 'background => array( '.header-footer-group table caption', 'body:not(.overlay-header) .header-inner .toggle-wrapper::before' ),
     743                'border-color'     => array( '.header-footer-group pre', '.header-footer-group fieldset', '.header-footer-group input', '.header-footer-group textarea', '.header-footer-group table', '.header-footer-group table *', '.footer-nav-widgets-wrapper', '#site-footer', '.menu-modal nav *', '.footer-widgets-outer-wrapper', '.footer-top' ),
     744                'background-color' => array( '.header-footer-group table caption', 'body:not(.overlay-header) .header-inner .toggle-wrapper::before' ),
    741745            ),
    742746        ),
  • trunk/src/wp-content/themes/twentytwenty/inc/custom-css.php

    r46613 r46701  
    130130            // Background color.
    131131            if ( $background && $background !== $background_default ) {
    132                 twentytwenty_generate_css( '.editor-styles-wrapper', 'background', '#' . $background );
     132                twentytwenty_generate_css( '.editor-styles-wrapper', 'background-color', '#' . $background );
     133                twentytwenty_generate_css( '.has-background.has-primary-background-color:not(.has-text-color),.has-background.has-primary-background-color *:not(.has-text-color),.has-background.has-accent-background-color:not(.has-text-color),.has-background.has-accent-background-color *:not(.has-text-color)', 'color', '#' . $background );
    133134            }
    134135
     
    165166            // Background color.
    166167            if ( $background && $background !== $background_default ) {
    167                 twentytwenty_generate_css( 'body#tinymce.wp-editor.content', 'background', '#' . $background );
     168                twentytwenty_generate_css( 'body#tinymce.wp-editor.content', 'background-color', '#' . $background );
    168169            }
    169170
  • trunk/src/wp-content/themes/twentytwenty/inc/starter-content.php

    r46571 r46701  
    176176                'name'  => __( 'Primary', 'twentytwenty' ),
    177177                'items' => array(
     178                    'link_home', // Note that the core "home" page is actually a link in case a static front page is not used.
     179                    'page_about',
     180                    'page_blog',
    178181                    'page_contact',
    179182                ),
    180183            ),
    181             // Assign a menu to the "expanded" (modal) menu location.
     184            // This replicates primary just to demonstrate the expanded menu.
    182185            'expanded' => array(
    183186                'name'  => __( 'Primary', 'twentytwenty' ),
     
    186189                    'page_about',
    187190                    'page_blog',
     191                    'page_contact',
    188192                ),
    189193            ),
  • trunk/src/wp-content/themes/twentytwenty/print.css

    r46613 r46701  
    6767  h3,
    6868  h4,
     69  .has-normal-font-size,
    6970  .has-regular-font-size,
    7071  .has-large-font-size,
  • trunk/src/wp-content/themes/twentytwenty/style-rtl.css

    r46676 r46701  
    181181    width: 1px;
    182182    word-wrap: normal !important;
     183    word-break: normal;
    183184}
    184185
     
    827828}
    828829
     830input[type="text"]:focus,
     831input[type="email"]:focus,
     832input[type="url"]:focus,
     833input[type="password"]:focus,
     834input[type="number"]:focus,
     835input[type="tel"]:focus,
     836input[type="range"]:focus,
     837input[type="date"]:focus,
     838input[type="month"]:focus,
     839input[type="week"]:focus,
     840input[type="time"]:focus,
     841input[type="datetime"]:focus,
     842input[type="datetime-local"]:focus,
     843input[type="color"]:focus,
     844textarea:focus {
     845    border-color: currentColor;
     846}
     847
     848input[type="search"]:focus {
     849    outline: thin dotted;
     850    outline-offset: -4px;
     851}
     852
    829853/* Tables ------------------------------------ */
    830854
     
    16801704}
    16811705
     1706/*
     1707 * Enable nav submenu expansion with tapping on arrows on large-viewport
     1708 * touch interfaces (e.g. tablets or laptops with touch screens).
     1709 * These rules are supported by all browsers (>IE11) and when JS is disabled.
     1710 */
     1711@media (any-pointer: coarse) {
     1712
     1713    .primary-menu > li.menu-item-has-children > a {
     1714        padding-left: 0;
     1715        margin-left: 2rem;
     1716    }
     1717
     1718    .primary-menu ul li.menu-item-has-children > a {
     1719        margin-left: 4.5rem;
     1720        padding-left: 0;
     1721        width: unset;
     1722    }
     1723
     1724}
     1725
     1726/* Repeat previous rules for IE11 (when JS enabled for polyfill). */
     1727body.touch-enabled .primary-menu > li.menu-item-has-children > a {
     1728    padding-left: 0;
     1729    margin-left: 2rem;
     1730}
     1731
     1732body.touch-enabled .primary-menu ul li.menu-item-has-children > a {
     1733    margin-left: 4.5rem;
     1734    padding-left: 0;
     1735    width: unset;
     1736}
     1737
    16821738/* -------------------------------------------------------------------------- */
    16831739
     
    26862742}
    26872743
     2744.entry-content .has-normal-font-size,
    26882745.entry-content .has-regular-font-size {
    26892746    font-size: 1em;
     
    28652922/* Block: Columns ---------------------------- */
    28662923
     2924.wp-block-columns.alignfull,
     2925.alignfull:not(.has-background) .wp-block-columns {
     2926    padding-right: 2rem;
     2927    padding-left: 2rem;
     2928}
     2929
    28672930.wp-block-column {
    28682931    margin-bottom: 3.2rem;
     
    29903053.entry-content .wp-block-group p {
    29913054    max-width: 100%;
     3055}
     3056
     3057.alignfull:not(.has-background) > .wp-block-group__inner-container > p:not(.has-background-color) {
     3058    padding-right: 2rem;
     3059    padding-left: 2rem;
    29923060}
    29933061
     
    31763244}
    31773245
    3178 .wp-block-table.is-style-stripes {
     3246figure.wp-block-table.is-style-stripes {
    31793247    border-bottom: none;
     3248}
     3249
     3250.wp-block-table.is-style-stripes table {
     3251    border-collapse: inherit;
    31803252}
    31813253
     
    43484420    }
    43494421
    4350 }
    4351 
    4352 @media ( max-width: 599px ) {
    4353 
    4354     /* Blocks -------------------------------- */
    4355 
    4356     /* BLOCK: COLUMNS */
    4357 
    4358     .alignfull:not(.has-background) .wp-block-column > p:not(.has-background-color),
    4359     .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    4360         max-width: calc(100% - 4rem);
    4361         margin: auto;
    4362     }
    4363 }
    4364 
    4365 @media ( min-width: 600px ) and ( max-width: 781px ) {
    4366 
    4367     /* Blocks -------------------------------- */
    4368 
    4369     /* BLOCK: COLUMNS */
    4370 
    4371     .alignfull:not(.has-background) .wp-block-column:nth-child(odd) > p:not(.has-background-color),
    4372     .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    4373         padding-right: 2rem;
    4374     }
    4375 
    4376     .alignfull:not(.has-background) .wp-block-column:nth-child(even) > p:not(.has-background-color),
    4377     .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    4378         padding-left: 2rem;
    4379     }
    43804422}
    43814423
     
    52805322    }
    52815323
    5282     .alignfull .wp-block-column:first-child > p,
    5283     .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    5284         padding-right: 2rem;
    5285     }
    5286 
    5287     .alignfull:not(.has-background) .wp-block-column:last-child > p,
    5288     .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    5289         padding-left: 2rem;
     5324    .wp-block-columns.alignwide + .wp-block-columns.alignwide,
     5325    .wp-block-columns.alignfull + .wp-block-columns.alignfull {
     5326        margin-top: -2.8rem;
    52905327    }
    52915328}
     
    55135550    .wp-block-columns.alignwide + .wp-block-columns.alignwide,
    55145551    .wp-block-columns.alignfull + .wp-block-columns.alignfull {
    5515         margin-top: -5.2rem;
     5552        margin-top: -4.8rem;
    55165553    }
    55175554
  • trunk/src/wp-content/themes/twentytwenty/style.css

    r46676 r46701  
    181181    width: 1px;
    182182    word-wrap: normal !important;
     183    word-break: normal;
    183184}
    184185
     
    833834}
    834835
     836input[type="text"]:focus,
     837input[type="email"]:focus,
     838input[type="url"]:focus,
     839input[type="password"]:focus,
     840input[type="number"]:focus,
     841input[type="tel"]:focus,
     842input[type="range"]:focus,
     843input[type="date"]:focus,
     844input[type="month"]:focus,
     845input[type="week"]:focus,
     846input[type="time"]:focus,
     847input[type="datetime"]:focus,
     848input[type="datetime-local"]:focus,
     849input[type="color"]:focus,
     850textarea:focus {
     851    border-color: currentColor;
     852}
     853
     854input[type="search"]:focus {
     855    outline: thin dotted;
     856    outline-offset: -4px;
     857}
     858
    835859/* Tables ------------------------------------ */
    836860
     
    16881712}
    16891713
     1714/*
     1715 * Enable nav submenu expansion with tapping on arrows on large-viewport
     1716 * touch interfaces (e.g. tablets or laptops with touch screens).
     1717 * These rules are supported by all browsers (>IE11) and when JS is disabled.
     1718 */
     1719@media (any-pointer: coarse) {
     1720
     1721    .primary-menu > li.menu-item-has-children > a {
     1722        padding-right: 0;
     1723        margin-right: 2rem;
     1724    }
     1725
     1726    .primary-menu ul li.menu-item-has-children > a {
     1727        margin-right: 4.5rem;
     1728        padding-right: 0;
     1729        width: unset;
     1730    }
     1731
     1732}
     1733
     1734/* Repeat previous rules for IE11 (when JS enabled for polyfill). */
     1735body.touch-enabled .primary-menu > li.menu-item-has-children > a {
     1736    padding-right: 0;
     1737    margin-right: 2rem;
     1738}
     1739
     1740body.touch-enabled .primary-menu ul li.menu-item-has-children > a {
     1741    margin-right: 4.5rem;
     1742    padding-right: 0;
     1743    width: unset;
     1744}
     1745
    16901746/* -------------------------------------------------------------------------- */
    16911747
     
    27002756}
    27012757
     2758.entry-content .has-normal-font-size,
    27022759.entry-content .has-regular-font-size {
    27032760    font-size: 1em;
     
    28792936/* Block: Columns ---------------------------- */
    28802937
     2938.wp-block-columns.alignfull,
     2939.alignfull:not(.has-background) .wp-block-columns {
     2940    padding-left: 2rem;
     2941    padding-right: 2rem;
     2942}
     2943
    28812944.wp-block-column {
    28822945    margin-bottom: 3.2rem;
     
    30043067.entry-content .wp-block-group p {
    30053068    max-width: 100%;
     3069}
     3070
     3071.alignfull:not(.has-background) > .wp-block-group__inner-container > p:not(.has-background-color) {
     3072    padding-left: 2rem;
     3073    padding-right: 2rem;
    30063074}
    30073075
     
    31903258}
    31913259
    3192 .wp-block-table.is-style-stripes {
     3260figure.wp-block-table.is-style-stripes {
    31933261    border-bottom: none;
     3262}
     3263
     3264.wp-block-table.is-style-stripes table {
     3265    border-collapse: inherit;
    31943266}
    31953267
     
    43704442    }
    43714443
    4372 }
    4373 
    4374 @media ( max-width: 599px ) {
    4375 
    4376     /* Blocks -------------------------------- */
    4377 
    4378     /* BLOCK: COLUMNS */
    4379 
    4380     .alignfull:not(.has-background) .wp-block-column > p:not(.has-background-color),
    4381     .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    4382         max-width: calc(100% - 4rem);
    4383         margin: auto;
    4384     }
    4385 }
    4386 
    4387 @media ( min-width: 600px ) and ( max-width: 781px ) {
    4388 
    4389     /* Blocks -------------------------------- */
    4390 
    4391     /* BLOCK: COLUMNS */
    4392 
    4393     .alignfull:not(.has-background) .wp-block-column:nth-child(odd) > p:not(.has-background-color),
    4394     .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    4395         padding-left: 2rem;
    4396     }
    4397 
    4398     .alignfull:not(.has-background) .wp-block-column:nth-child(even) > p:not(.has-background-color),
    4399     .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    4400         padding-right: 2rem;
    4401     }
    44024444}
    44034445
     
    53145356    }
    53155357
    5316     .alignfull .wp-block-column:first-child > p,
    5317     .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    5318         padding-left: 2rem;
    5319     }
    5320 
    5321     .alignfull:not(.has-background) .wp-block-column:last-child > p,
    5322     .alignfull:not(.has-background) .wp-block-group__inner-container > p:not(.has-background-color) {
    5323         padding-right: 2rem;
     5358    .wp-block-columns.alignwide + .wp-block-columns.alignwide,
     5359    .wp-block-columns.alignfull + .wp-block-columns.alignfull {
     5360        margin-top: -2.8rem;
    53245361    }
    53255362}
     
    55475584    .wp-block-columns.alignwide + .wp-block-columns.alignwide,
    55485585    .wp-block-columns.alignfull + .wp-block-columns.alignfull {
    5549         margin-top: -5.2rem;
     5586        margin-top: -4.8rem;
    55505587    }
    55515588
Note: See TracChangeset for help on using the changeset viewer.