-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Filter (duotone) setting set to a block type in theme.json is rendered to the wrong elements on server side #41333
Copy link
Copy link
Closed
Labels
[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experiTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
When you define a block filter in theme.json, the output CSS is not written using the right selectors, so the filter ends up applied to the main block element instead the one indicated in block.json.
This causes several problems, for example:
- Discrepancies between what is shown in the editor and the public version of the post.
- Overriding the default filter/duotone using the editor has an unexpected result.
Step-by-step reproduction instructions
- Use
Skateparkor another theme with default duotone filters applied to some blocks such asImageandCover. - Create a new post and add an Image block, and also a Cover Block.
- Select a different duotone filter for each of those blocks recently added.
- Save and see the public version of the post (pay attention to the discrepancies between the editor and the public version).
Screenshots, screen recording, code snippet
Comparison. To the left is the editor and to the right is the public version of the post:
Step by step video:
default.duotone.mp4
Environment info
- Wordpress 6.0
- Latest Gutenberg trunk branch
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
[Feature] Design ToolsTools that impact the appearance of blocks both to expand the number of tools and improve the experiTools that impact the appearance of blocks both to expand the number of tools and improve the experi[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Type
Fields
Give feedbackNo fields configured for issues without a type.
