#57833 closed defect (bug) (fixed)
Correctly merge custom CSS into global styles
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.2 | Priority: | normal |
Severity: | normal | Version: | 6.2 |
Component: | Editor | Keywords: | gutenberg-merge has-patch commit |
Focuses: | Cc: |
Description
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
- Using only 6.2 Beta 3, navigate to the Site Editor and add some custom CSS to the Heading block, for example,
color: red
- Note the Heading blocks are now red in the Site Editor.
- Navigate to a page or post and add a Heading block. It is will not be red.
- Now activate Gutenberg 15.2, and the Headings will be red.
Original report: https://github.com/WordPress/gutenberg/issues/48466
Change History (8)
This ticket was mentioned in PR #4154 on WordPress/wordpress-develop by @Mamaduka.
2 years ago
#1
- Keywords has-patch added
@Mamaduka commented on PR #4154:
2 years ago
#2
The test failure doesn't look related:
1) Tests_Admin_wpSiteHealth::test_object_cache_thresholds with data set #3 ('options_count', 100) Failed asserting that false is true.
#6
@
2 years ago
- Owner set to gziolo
- Resolution set to fixed
- Status changed from new to closed
In 55438:
2 years ago
#7
Committed with https://core.trac.wordpress.org/changeset/55438.
Note: See
TracTickets for help on using
tickets.
Gutenberg issue: https://github.com/WordPress/gutenberg/issues/48466
Trac ticket: https://core.trac.wordpress.org/ticket/57833