Make WordPress Core


Ignore:
Timestamp:
05/09/2024 04:07:53 AM (3 years ago)
Author:
isabel_brison
Message:

Editor: move global CSS custom properties to :root selector.

Changes the rules outputting global styles CSS custom properties to use :root instead of body, and cleans up some unused variables.

Props ramonopoly, isabel_brison.
Fixes #61135.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-duotone.php

    r57652 r58123  
    810810         *
    811811         * @since 6.3.0
     812         * @since 6.6.0 Replaced body selector with `WP_Theme_JSON::ROOT_CSS_PROPERTIES_SELECTOR`.
    812813         *
    813814         * @param array $sources The duotone presets.
    … …  
    815816         */
    816817        private static function get_global_styles_presets( $sources ) {
    817                 $css = 'body{';
     818                $css = WP_Theme_JSON::ROOT_CSS_PROPERTIES_SELECTOR . '{';
    818819                foreach ( $sources as $filter_id => $filter_data ) {
    819820                        $slug              = $filter_data['slug'];
Note: See TracChangeset for help on using the changeset viewer.