WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/22/2019 06:25:45 PM (11 months ago)
Author:
desrosj
Message:

Bundled Themes: Update Twenty Twenty.

This brings trunk’s version of Twenty Twenty in-sync with GitHub.

For a complete list of changes since [46551], see https://github.com/WordPress/twentytwenty/compare/bc89c51...4549fd9.

Reviewed by SergeyBiryukov, desrosj, ianbelanger.
Props anlino, ianbelanger, poena, williampatton, nielslange, acosmin, intimez, itowhid06, decrecementofeliz, aristath, westonruter, mukesh27, jorgefilipecosta, karmatosed.
Fixes #48386.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwenty/inc/custom-css.php

    r46446 r46571  
    5656
    5757        // Get variables.
    58         $body           = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'text' ) );
    59         $body_default   = '#000000';
    60         $accent         = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'accent' ) );
    61         $accent_default = '#cd2653';
     58        $body              = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'text' ) );
     59        $body_default      = '#000000';
     60        $secondary         = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'secondary' ) );
     61        $secondary_default = '#6d6d6d';
     62        $borders           = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'borders' ) );
     63        $borders_default   = '#dcd7ca';
     64        $accent            = sanitize_hex_color( twentytwenty_get_color_for_area( 'content', 'accent' ) );
     65        $accent_default    = '#cd2653';
     66
    6267        /**
    6368         * Filters the CSS selectors targeting button component on frontend to apply common css
     
    7075
    7176        // Header.
    72         $header_footer_text   = sanitize_hex_color( twentytwenty_get_color_for_area( 'header-footer', 'text' ) );
    73         $header_footer_accent = sanitize_hex_color( twentytwenty_get_color_for_area( 'header-footer', 'accent' ) );
     77        $header_footer_background         = sanitize_hex_color( twentytwenty_get_color_for_area( 'header-footer', 'background' ) );
     78        $header_footer_background_default = '#ffffff';
    7479
    7580        // Cover.
     
    127132            // Accent color.
    128133            if ( $accent && $accent !== $accent_default ) {
    129                 twentytwenty_generate_css( '.editor-styles-wrapper a, .editor-styles-wrapper .has-drop-cap:not(:focus):first-letter', 'color', $accent );
    130                 twentytwenty_generate_css( '.editor-styles-wrapper blockquote, .editor-styles-wrapper .wp-block-quote', 'border-color', $accent, '', ' !important' );
    131                 twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-file .wp-block-file__textlink', 'color', $accent );
    132                 twentytwenty_generate_css( $buttons_targets, 'background', $accent );
    133                 twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link', 'border-color', $accent );
    134                 twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link', 'color', $accent );
     134                twentytwenty_generate_css( '.has-accent-color, .editor-styles-wrapper .editor-block-list__layout a, .editor-styles-wrapper .has-drop-cap:not(:focus)::first-letter, .editor-styles-wrapper .wp-block-button.is-style-outline .wp-block-button__link, .editor-styles-wrapper .wp-block-pullquote::before, .editor-styles-wrapper .wp-block-file .wp-block-file__textlink', 'color', $accent );
     135                twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-quote', 'border-color', $accent, '' );
     136                twentytwenty_generate_css( '.has-accent-background-color, .editor-styles-wrapper .wp-block-button__link, .editor-styles-wrapper .wp-block-file__button', 'background-color', $accent );
    135137            }
    136138
     
    140142            }
    141143
     144            // Borders color.
     145            if ( $borders && $borders !== $borders_default ) {
     146                twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-code, .editor-styles-wrapper pre, .editor-styles-wrapper .wp-block-preformatted pre, .editor-styles-wrapper .wp-block-verse pre, .editor-styles-wrapper fieldset, .editor-styles-wrapper .wp-block-table, .editor-styles-wrapper .wp-block-table *, .editor-styles-wrapper .wp-block-table.is-style-stripes, .editor-styles-wrapper .wp-block-latest-posts.is-grid li', 'border-color', $borders );
     147                twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-table caption, .editor-styles-wrapper .wp-block-table.is-style-stripes tbody tr:nth-child(odd)', 'background-color', $borders );
     148            }
     149
    142150            // Text color.
    143151            if ( $body && $body !== $body_default ) {
    144                 twentytwenty_generate_css( 'body .editor-styles-wrapper, body .editor-post-title__block, body .editor-post-title__input, body textarea, .editor-post-title__block .editor-post-title__input', 'color', $body );
     152                twentytwenty_generate_css( 'body .editor-styles-wrapper, .editor-post-title__block .editor-post-title__input, .editor-post-title__block .editor-post-title__input:focus', 'color', $body );
     153            }
     154
     155            // Secondary color.
     156            if ( $secondary && $secondary !== $secondary_default ) {
     157                twentytwenty_generate_css( '.editor-styles-wrapper figcaption, .editor-styles-wrapper cite, .editor-styles-wrapper .wp-block-quote__citation, .editor-styles-wrapper .wp-block-quote cite, .editor-styles-wrapper .wp-block-quote footer, .editor-styles-wrapper .wp-block-pullquote__citation, .editor-styles-wrapper .wp-block-pullquote cite, .editor-styles-wrapper .wp-block-pullquote footer, .editor-styles-wrapper ul.wp-block-archives li, .editor-styles-wrapper ul.wp-block-categories li, .editor-styles-wrapper ul.wp-block-latest-posts li, .editor-styles-wrapper ul.wp-block-categories__list li, .editor-styles-wrapper .wp-block-latest-comments time, .editor-styles-wrapper .wp-block-latest-posts time', 'color', $secondary );
     158            }
     159
     160            // Header Footer Background Color.
     161            if ( $header_footer_background && $header_footer_background !== $header_footer_background_default ) {
     162                twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-pullquote::before', 'background-color', $header_footer_background );
    145163            }
    146164        } elseif ( 'classic-editor' === $type ) {
Note: See TracChangeset for help on using the changeset viewer.