Making WordPress.org


Ignore:
Timestamp:
06/10/2024 02:24:11 AM (8 months ago)
Author:
dd32
Message:

Support Forums: Blocks: Properly style the Blocks Everywhere interface in the old support theme.

The new support theme that defines the base variables hasn't been activated everywhere.

See #7599, #7593, [13571].
Closes https://github.com/WordPress/wordpress.org/issues/326.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-blocks.php

    r13581 r13791  
    6262     */
    6363    public function expand_theme_compat() {
     64        $back_compat_css_vars = '';
     65        // The old support theme doesn't have the parent colors defined.
     66        if ( 'pub/wporg-support' === get_stylesheet() ) {
     67            $back_compat_css_vars = <<<CSS
     68                :root {
     69                    --wp--preset--color--blueberry-1: #3858e9;
     70                    --wp--preset--color--charcoal-1: #1e1e1e;
     71                    --wp--preset--color--charcoal-3: #40464d;
     72                    --wp--preset--color--deep-blueberry: #213fd4;
     73                    --wp--custom--button--color--background: var(--wp--preset--color--blueberry-1);
     74                    --wp--custom--button--hover--color--background: var(--wp--preset--color--deep-blueberry);
     75                }
     76            CSS;
     77        }
     78
    6479        wp_add_inline_style(
    6580            'blocks-everywhere-compat',
    6681            <<<CSS
     82                {$back_compat_css_vars}
    6783                /* Fix the primary block inserter button */
    6884                .blocks-everywhere .components-button.is-primary {
Note: See TracChangeset for help on using the changeset viewer.