Make WordPress Core

Ticket #57544: 57544.1.patch

File 57544.1.patch, 3.8 KB (added by sabernhardt, 19 months ago)

keeping custom colors together with extra-high specificity for Separator block (:root .wp-block-separator.has-accent-color)

  • src/wp-content/themes/twentytwenty/assets/css/editor-style-block-rtl.css

     
    162162
    163163/* CUSTOM COLORS */
    164164
    165 :root .has-accent-color {
     165:root .has-accent-color,
     166:root .wp-block-separator.has-accent-color {
    166167        color: #cd2653;
    167168}
    168169
     
    171172        color: #fff;
    172173}
    173174
    174 :root .has-primary-color {
     175:root .has-primary-color,
     176:root .wp-block-separator.has-primary-color {
    175177        color: #000;
    176178}
    177179
     
    180182        color: #f5efe0;
    181183}
    182184
    183 :root .has-secondary-color {
     185:root .has-secondary-color,
     186:root .wp-block-separator.has-secondary-color {
    184187        color: #6d6d6d;
    185188}
    186189
     
    189192        color: #fff;
    190193}
    191194
    192 :root .has-subtle-background-color {
     195:root .has-subtle-background-color,
     196:root .wp-block-separator.has-subtle-background-color {
    193197        color: #dcd7ca;
    194198}
    195199
     
    198202        color: #000;
    199203}
    200204
    201 :root .has-background-color {
     205:root .has-background-color,
     206:root .wp-block-separator.has-background-color {
    202207        color: #f5efe0;
    203208}
    204209
  • src/wp-content/themes/twentytwenty/assets/css/editor-style-block.css

     
    162162
    163163/* CUSTOM COLORS */
    164164
    165 :root .has-accent-color {
     165:root .has-accent-color,
     166:root .wp-block-separator.has-accent-color {
    166167        color: #cd2653;
    167168}
    168169
     
    171172        color: #fff;
    172173}
    173174
    174 :root .has-primary-color {
     175:root .has-primary-color,
     176:root .wp-block-separator.has-primary-color {
    175177        color: #000;
    176178}
    177179
     
    180182        color: #f5efe0;
    181183}
    182184
    183 :root .has-secondary-color {
     185:root .has-secondary-color,
     186:root .wp-block-separator.has-secondary-color {
    184187        color: #6d6d6d;
    185188}
    186189
     
    189192        color: #fff;
    190193}
    191194
    192 :root .has-subtle-background-color {
     195:root .has-subtle-background-color,
     196:root .wp-block-separator.has-subtle-background-color {
    193197        color: #dcd7ca;
    194198}
    195199
     
    198202        color: #000;
    199203}
    200204
    201 :root .has-background-color {
     205:root .has-background-color,
     206:root .wp-block-separator.has-background-color {
    202207        color: #f5efe0;
    203208}
    204209
  • src/wp-content/themes/twentytwenty/inc/custom-css.php

     
    126126                        // Colors.
    127127                        // Accent color.
    128128                        if ( $accent && $accent !== $accent_default ) {
    129                                 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 );
     129                                twentytwenty_generate_css( ':root .has-accent-color, :root .wp-block-separator.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 );
    130130                                twentytwenty_generate_css( '.editor-styles-wrapper .wp-block-quote', 'border-color', $accent, '' );
    131131                                twentytwenty_generate_css( '.has-accent-background-color, .editor-styles-wrapper .wp-block-button__link, .editor-styles-wrapper .wp-block-file__button', 'background-color', $accent );
    132132                        }