Make WordPress Core


Ignore:
Timestamp:
06/22/2021 01:32:42 PM (11 months ago)
Author:
desrosj
Message:

Widgets: Add editor styles to the widgets block editor.

This updates the widgets screen to load the editor styles in the same way as the post editor. This combined with the package updates in [51198] and [51199] ensures that the blocks added to sidebars more accurately reflect what will be displayed on the front end of the site.

Props isabel_brison, noisysocks, andraganescu, audrasjb, jorbin, caseymilne, desrosj.
Fixes #53344. See #53388.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/blocks/block-editor.php

    r51149 r51200  
    430430        $this->assertContains( '"\/wp\/v2\/types"', $after );
    431431    }
     432
     433    /**
     434     * @ticket 53344
     435     */
     436    function test_get_block_editor_theme_styles() {
     437        $theme_styles = get_block_editor_theme_styles();
     438        $this->assertCount( 1, $theme_styles );
     439        $this->assertSameSets(
     440            array(
     441                'css'            => 'body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif }',
     442                '__unstableType' => 'core',
     443            ),
     444            $theme_styles[0]
     445        );
     446    }
    432447}
Note: See TracChangeset for help on using the changeset viewer.