Skip to content

Duotone filter not rendering in some places #35331

@ajlende

Description

@ajlende

Description

When applying duotone as a block style in theme.json, there are still a couple places the duotone filter doesn't get applied.

See #34667 (comment)

The thumbnail for block patterns that use duotone won't show the filter applied:
Screenshot 2021-09-29 at 17 22 27

The site editor shows the image without a filter but the frontend works fine. The post editor when I insert an image does work fine:
Screenshot 2021-09-29 at 17 22 51

To reproduce

You can test on Skatepark applying Automattic/themes#4740

Or by adding the following to your theme.json for testing the image and cover blocks.

{
	"styles": {
		"blocks": {
			"core/cover": {
				"filter": {
					"duotone": "var(--wp--preset--duotone--blue-red)"
				}
			},
			"core/image": {
				"filter": {
					"duotone": "var(--wp--preset--duotone--blue-red)"
				}
			}
		}
	}
}

Metadata

Metadata

Assignees

Labels

[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions