Make WordPress Core

Changeset 51095


Ignore:
Timestamp:
06/08/2021 03:05:34 PM (3 years ago)
Author:
ryelle
Message:

Twenty Twenty: Ensure custom primary color is applied to text in the editor.

Update the specificity of the custom CSS to match the editor styles. This overrides the default primary color with the selected custom color, matching the frontend display.

Props sabernhardt, notlaura.
Fixes #50120.

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

Legend:

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

    r50359 r51095  
    225225/* Typography -------------------------------- */
    226226
    227 .editor-styles-wrapper .editor-block-list__layout a {
     227.editor-styles-wrapper a {
    228228    color: #cd2653;
    229229    text-decoration: underline;
  • trunk/src/wp-content/themes/twentytwenty/inc/custom-css.php

    r47122 r51095  
    123123            // Accent color.
    124124            if ( $accent && $accent !== $accent_default ) {
    125                 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 );
     125                twentytwenty_generate_css( ':root .has-accent-color, .editor-styles-wrapper 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 );
    126126                twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-quote', 'border-color', $accent, '' );
    127127                twentytwenty_generate_css( '.has-accent-background-color, .editor-styles-wrapper .wp-block-button__link, .editor-styles-wrapper .wp-block-file__button', 'background-color', $accent );
Note: See TracChangeset for help on using the changeset viewer.