[wp-trac] [WordPress Trac] #57833: Correctly merge custom CSS into global styles

WordPress Trac noreply at wordpress.org
Wed Mar 1 08:59:00 UTC 2023


#57833: Correctly merge custom CSS into global styles
--------------------------+-----------------------------
 Reporter:  Mamaduka      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  6.2
Component:  Editor        |    Version:
 Severity:  normal        |   Keywords:  gutenberg-merge
  Focuses:                |
--------------------------+-----------------------------
 Update the `get_block_editor_settings` function and merge custom CSS
 directly into the `$global_styles` array.

 == Why?

 Styles added directly to the `$editor_settings['styles']` will get
 overridden later into the function (See L#440). This method only works in
 the Gutenberg plugin, where we use a filter to inject additional styles.

 == Testing Instructions

 1. Using only 6.2 Beta 3, navigate to the Site Editor and add some custom
 CSS to the Heading block, for example, `color: red`
 2. Note the Heading blocks are now red in the Site Editor.
 3. Navigate to a page or post and add a Heading block. It is will not be
 red.
 4. Now activate Gutenberg 15.2, and the Headings will be red.

 Original report: https://github.com/WordPress/gutenberg/issues/48466

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57833>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list