Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Twenty Twenty-Two (Mint) turns all images black and white #5483

Closed
tvolpert opened this issue Feb 8, 2022 · 1 comment
Closed

Twenty Twenty-Two (Mint) turns all images black and white #5483

tvolpert opened this issue Feb 8, 2022 · 1 comment

Comments

@tvolpert
Copy link

tvolpert commented Feb 8, 2022

Steps to replicate

Activate the Twenty Twenty-Two (Mint) theme on the site, and add an image or gallery block to any page or post. None of the other flavors of Twenty Twenty-Two seem to be affected.

https://d.pr/i/KWKD1X

Result

All images display with a Black and White duotone filter. Hitting "clear" from the Duotone button on the block toolbar does nothing.

Checking in dev tools, I can see the following from the theme's CSS:

.wp-block-image img {
    filter: var(--wp--preset--duotone--default-filter);
}

So the default duotone filter is being applied to all img elements whose parent belongs to the wp-block-image class – which, as far as I know, is pretty much ALL images on a WP site.

You can add a different Duotone filter, and it will display properly, but if cleared, it will return to the black and white default

Adding a custom Duotone filter results in the following:

.wp-duotone-6202f37045d67 img {
    filter: url('#wp-duotone-6202f37045d67') !important;
}

So I think the first rule just needs to be deleted entirely? Or at least made overridable by the user, somehow.

Expected

The pictures should be shown in full color.

  • User report: 34045134-hc
  • Follow-up ticket: None, since we were able to workaround the issue with custom CSS:
.wp-block-image img {
	filter: none!important;
}
@tvolpert
Copy link
Author

I submitted this through the wrong workflow by accident! It has been moved to: #5602

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant