themes icon indicating copy to clipboard operation
themes copied to clipboard

Twenty Twenty-Two (Mint) theme shows all images in black and white

Open tvolpert opened this issue 3 years ago • 70 comments

Quick summary

Any image added to a site using the Twenty Twenty-Two (Mint) theme has a black and white duotone filter applied. None of the other flavors of Twenty Twenty-Two seem to be affected.

IMPORTANT NOTE: This is NOT a bug of the theme, but rather an issue with Gutenberg. See this comment below.

This issue will remain open for visibility until the Gutenberg issue has been addressed.

Steps to reproduce

Activate the Twenty Twenty-Two (Mint) theme on a test site, and add an image or gallery block to any page or post.

What you expected to happen

The pictures should be shown in full color.

What actually happened

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

Context

User report: 34045134-hc

Simple, Atomic or both?

Simple, Atomic

Theme-specific issue?

Twenty Twenty Two (Mint)

Browser, operating system and other notes

Chrome and Safari on MacOS.

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.

Reproducibility

Consistent

Severity

Some (< 50%)

Available workarounds?

Yes, easy to implement

Workaround details

You can override the behavior with the following CSS snippet:

.wp-block-image img {
    filter: none!important;
}

Any custom duotone filters added by the user will have their own classes generated, so this doesn't affect that functionality.

tvolpert avatar Feb 10 '22 20:02 tvolpert

User report: 4782455-zen

Was able to reproduce this issue on 'Pink' version as well. Tested and confirmed that the main 'Twenty Twenty-Two' theme does not have the grayscale duotone effect as default.

Because the user is on Personal plan, I advised switching to the main 'Twenty Twenty-Two' theme while preserving their homepage content.

vipulpradhan avatar Feb 15 '22 23:02 vipulpradhan

+1 4780109-zd-woothemes Sent CSS workaround.

formosattic avatar Feb 16 '22 05:02 formosattic

This probably needs to be transferred to the Themes GH repo - but I'm just pinging for a gut check. p1645386161641019-slack-C029FM1EH

jordesign avatar Feb 20 '22 19:02 jordesign

Also encountered on 4786473-zen (Personal).

Suggested to the user to activate the main Twenty Twenty-Two theme, as the "Pink" version defaults to duotone on all images.

1dr0 avatar Feb 23 '22 05:02 1dr0

I don't see any updates on the Slack thread mentioned above, so I'll share another report on 20512734-hc - user activated Twenty Twenty-Two (Pink) and all images on the site turned into black and white. I recommended activating Twenty Twenty-Two instead.

carinapilar avatar Feb 25 '22 12:02 carinapilar

Another report here: 4836332-zen this one is the (Mint) varient.

KirkwallDay avatar Mar 06 '22 20:03 KirkwallDay

This also affects Skatepark, reported here: https://wordpress.com/forums/topic/image-green-filter/?view=all

metabreakr avatar Mar 11 '22 17:03 metabreakr

Noting re: Skatepark that even changing the site's default colors to something else keeps the duotone going in bright green.

supernovia avatar Mar 12 '22 20:03 supernovia

We have another case in Twenty Twenty Two Mint: https://wordpress.com/forums/topic/customisation-16/

supernovia avatar Mar 12 '22 23:03 supernovia

Similar case here: 4863474-zen

Workaround provided:

body {
  --wp--preset--duotone--default-filter : none;
}

mxhassani avatar Mar 15 '22 20:03 mxhassani

Another case in 4876729-zd-woothemes (using Twenty Twenty-Two (Pink)). Only seems to have affected the logo, so I provided this:

.wp-block-site-logo img {
    filter: unset;
}

jp-imagines avatar Mar 21 '22 15:03 jp-imagines

4880218-zen

Same issue on Twenty Twenty-Two (Swiss). The workaround provided by tvolpert works there as well.

wiesenhauss avatar Mar 21 '22 18:03 wiesenhauss

4881833-zen

Another ticket here: Twenty Twenty-Two (Pink)

xue28 avatar Mar 22 '22 06:03 xue28

Any updates? Have another user with the same issue on Twenty Twenty-Two (swiss). #34637558-hc User would like an update if that does get resolved.

khristiansnyder avatar Mar 23 '22 06:03 khristiansnyder

@kjellr Following themes has duotone filter applied to all images. figma designs also has duotone images for these. Can you suggest on this design change.

  • twentytwentytwo-swiss
  • twentytwentytwo-mint
  • twentytwentytwo-pink

madhusudhand avatar Mar 23 '22 07:03 madhusudhand

This is not a bug on the theme, this filter is intended for those variations. The existing bugs are on Gutenberg so that users will be able to disable the filter if they want to:

  • https://github.com/WordPress/gutenberg/issues/38504
  • https://github.com/WordPress/gutenberg/issues/34122

We can leave this issue open if it's helpful for HEs, but the themes are working as intended, if users don't want these filters, that option will come from GB when those issues are fixed.

MaggieCabrera avatar Mar 23 '22 08:03 MaggieCabrera

That's correct, this is intended, and is shown on the theme demos and in the preview. For example:

https://twentytwentytwomintdemo.wordpress.com https://twentytwentytwoswissdemo.wordpress.com

As Maggie noted we're waiting for Gutenberg functionality that will allow folks to turn that off globally. And also there's a very confusing bug (https://github.com/WordPress/gutenberg/issues/35331) that doesn't apply duotone in the Site Editor, or in pattern previews.

kjellr avatar Mar 23 '22 13:03 kjellr

Noting https://wordpress.org/support/topic/disable-duotone-on-images/ (Skatepark) for follow-up once the issues in GB are fixed.

KokkieH avatar Mar 24 '22 09:03 KokkieH

Noting this one for follow-up as well: https://wordpress.com/forums/topic/twenty-twenty-two-theme/

supernovia avatar Mar 27 '22 18:03 supernovia

4908220-zen

Another ticket here: Twenty Twenty-Two (Pink)

xue28 avatar Mar 31 '22 02:03 xue28

4908224-zen

Another ticket here: Skatepark

xue28 avatar Mar 31 '22 06:03 xue28

Another report: 4920631-zd-woothemes Theme: Twenty Twenty-Two (Pink)

jamiepalatnik avatar Apr 05 '22 02:04 jamiepalatnik

Another report- #4931315-zen Theme: Skatepark

yashitamittal11 avatar Apr 08 '22 05:04 yashitamittal11

Reported on 35093764-hc

Theme: Twenty Twenty-Two (Swiss)

nerdysandy avatar Apr 08 '22 18:04 nerdysandy

Another one 35043875-hc Theme: Skatepark

Provided the "filter: none" CSS workaround to remove the tint.

1dr0 avatar Apr 12 '22 06:04 1dr0

Another one here: 4951832-zd-woothemes

Theme: Twenty Twenty-Two (Pink)

I shared CSS snippet as workaround fix

jromales avatar Apr 16 '22 03:04 jromales

Since we aren't supposed to glomb onto Gutenberg github issues, we have another case here: https://wordpress.com/forums/topic/duotone-remove-from-my-blog/

The CSS snippet won't work on free sites. Noting this case for followup.

supernovia avatar Apr 16 '22 21:04 supernovia

Another in https://wordpress.com/forums/topic/images-are-greyscale/ using Twenty Twenty-Two(Swiss)

Recommended they use Twenty Twenty-Two for now.

KokkieH avatar Apr 19 '22 10:04 KokkieH

https://wordpress.com/forums/topic/my-pictures-turn-black-and-white/ using Skatepark

KokkieH avatar Apr 21 '22 10:04 KokkieH

Another user from the thread above using Skatepark as well: https://wordpress.com/forums/topic/my-pictures-turn-black-and-white/?view=all#post-3816111

darnelldibbles avatar Apr 22 '22 22:04 darnelldibbles