Make WordPress Core


Ignore:
Timestamp:
09/14/2023 04:54:22 AM (12 months ago)
Author:
isabel_brison
Message:

Editor: disable default style engine optimisation.

Stops style engine from combining CSS selectors by default so that rule order is preserved.

Props ramonopoly, rajinsharwar, timdix, costdev, audrasjb, SergeyBiryukov, JeffPaul, mukesh27.
Fixes #58811.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/style-engine/class-wp-style-engine-processor.php

    r55820 r56574  
    8686     *
    8787     * @since 6.1.0
     88     * @since 6.4.0 The Optimization is no longer the default.
    8889     *
    8990     * @param array $options   {
     
    9192     *
    9293     *     @type bool $optimize Whether to optimize the CSS output, e.g. combine rules.
    93      *                          Default true.
     94     *                          Default false.
    9495     *     @type bool $prettify Whether to add new lines and indents to output.
    9596     *                          Defaults to whether the `SCRIPT_DEBUG` constant is defined.
     
    99100    public function get_css( $options = array() ) {
    100101        $defaults = array(
    101             'optimize' => true,
     102            'optimize' => false,
    102103            'prettify' => defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG,
    103104        );
Note: See TracChangeset for help on using the changeset viewer.