Make WordPress Core

Changeset 57637


Ignore:
Timestamp:
02/15/2024 10:16:59 PM (2 months ago)
Author:
SergeyBiryukov
Message:

Twenty Nineteen: Update selectors used to change the primary color in the Customizer.

The .editor-block-list__block class was removed in WordPress 5.4. It is now replaced with a selector that works in the current versions and is backward compatible.

Follow-up to [43842].

Props poena, faisal03, ashikur698.
Fixes #59922.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentynineteen/inc/color-patterns.php

    r57300 r57637  
    215215         * - buttons
    216216         */
    217         .editor-block-list__layout .editor-block-list__block a,
    218         .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
    219         .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:hover .wp-block-button__link:not(.has-text-color),
    220         .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:focus .wp-block-button__link:not(.has-text-color),
    221         .editor-block-list__layout .editor-block-list__block .wp-block-button.is-style-outline:active .wp-block-button__link:not(.has-text-color),
    222         .editor-block-list__layout .editor-block-list__block .wp-block-file .wp-block-file__textlink {
     217        .editor-styles-wrapper .wp-block a,
     218        .editor-styles-wrapper .wp-block .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color),
     219        .editor-styles-wrapper .wp-block .wp-block-button.is-style-outline:hover .wp-block-button__link:not(.has-text-color),
     220        .editor-styles-wrapper .wp-block .wp-block-button.is-style-outline:focus .wp-block-button__link:not(.has-text-color),
     221        .editor-styles-wrapper .wp-block .wp-block-button.is-style-outline:active .wp-block-button__link:not(.has-text-color),
     222        .editor-styles-wrapper .wp-block .wp-block-file .wp-block-file__textlink {
    223223            color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    224224        }
    225225
    226         .editor-block-list__layout .editor-block-list__block .wp-block-quote:not(.is-large):not(.is-style-large),
    227         .editor-styles-wrapper .editor-block-list__layout .wp-block-freeform blockquote {
     226        .editor-styles-wrapper .wp-block.wp-block-quote:not(.is-large):not(.is-style-large),
     227        .editor-styles-wrapper .wp-block .wp-block-freeform blockquote {
    228228            border-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    229229        }
    230230
    231         .editor-block-list__layout .editor-block-list__block .wp-block-pullquote.is-style-solid-color:not(.has-background-color) {
     231        .editor-styles-wrapper .wp-block.wp-block-pullquote.is-style-solid-color:not(.has-background-color) {
    232232            background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    233233        }
    234234
    235         .editor-block-list__layout .editor-block-list__block .wp-block-file .wp-block-file__button,
    236         .editor-block-list__layout .editor-block-list__block .wp-block-button:not(.is-style-outline) .wp-block-button__link,
    237         .editor-block-list__layout .editor-block-list__block .wp-block-button:not(.is-style-outline) .wp-block-button__link:active,
    238         .editor-block-list__layout .editor-block-list__block .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
    239         .editor-block-list__layout .editor-block-list__block .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
     235        .editor-styles-wrapper .wp-block.wp-block-file .wp-block-file__button,
     236        .editor-styles-wrapper .wp-block .wp-block-button:not(.is-style-outline) .wp-block-button__link,
     237        .editor-styles-wrapper .wp-block .wp-block-button:not(.is-style-outline) .wp-block-button__link:active,
     238        .editor-styles-wrapper .wp-block .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus,
     239        .editor-styles-wrapper .wp-block .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
    240240            background-color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness . ' ); /* base: #0073a8; */
    241241        }
    242242
    243243        /* Hover colors */
    244         .editor-block-list__layout .editor-block-list__block a:hover,
    245         .editor-block-list__layout .editor-block-list__block a:active,
    246         .editor-block-list__layout .editor-block-list__block .wp-block-file .wp-block-file__textlink:hover {
     244        .editor-styles-wrapper .wp-block a:hover,
     245        .editor-styles-wrapper .wp-block a:active,
     246        .editor-styles-wrapper .wp-block.wp-block-file .wp-block-file__textlink:hover {
    247247            color: hsl( ' . $primary_color . ', ' . $saturation . ', ' . $lightness_hover . ' ); /* base: #005177; */
    248248        }
    249249
    250250        /* Do not overwrite solid color pullquote or cover links */
    251         .editor-block-list__layout .editor-block-list__block .wp-block-pullquote.is-style-solid-color a,
    252         .editor-block-list__layout .editor-block-list__block .wp-block-cover a {
     251        .editor-styles-wrapper .wp-block.wp-block-pullquote.is-style-solid-color a,
     252        .editor-styles-wrapper .wp-block.wp-block-cover a {
    253253            color: inherit;
    254254        }
Note: See TracChangeset for help on using the changeset viewer.