Make WordPress Core

Ticket #48684: 48684.exclude-components.diff

File 48684.exclude-components.diff, 1.3 KB (added by sabernhardt, 5 months ago)

applies color rule to any element except for editor components and anything within them

  • src/wp-content/themes/twentytwenty/inc/custom-css.php

     
    135135                        // Background color.
    136136                        if ( $background && $background !== $background_default ) {
    137137                                twentytwenty_generate_css( '.editor-styles-wrapper', 'background-color', '#' . $background );
    138                                 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 );
     138                                twentytwenty_generate_css( '.has-background.has-primary-background-color:not(.has-text-color),.has-background.has-primary-background-color *:where(:not([class^="components-"]):not([class^="components-"] *)):not(.has-text-color),.has-background.has-accent-background-color:not(.has-text-color),.has-background.has-accent-background-color *:where(:not([class^="components-"]):not([class^="components-"] *)):not(.has-text-color)', 'color', '#' . $background );
    139139                        }
    140140
    141141                        // Borders color.