admin管理员组

文章数量:1124391

I'm trying to find a way to have the duotone effect removed when the mouse hovers over the image. I had done this on an old theme with CSS – before the gutenberg duotone feature was added.

I can find a lot of information online about removing the feature entirely. That is not what I want to do.

I'm trying to find a way to have the duotone effect removed when the mouse hovers over the image. I had done this on an old theme with CSS – before the gutenberg duotone feature was added.

I can find a lot of information online about removing the feature entirely. That is not what I want to do.

Share Improve this question asked Feb 16, 2024 at 18:24 SteveLambertSteveLambert 2302 silver badges7 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Yes.

[class*="wp-block"][class]:hover > img {
  filter: none;
}

That ruleset works for hover on either Image or Cover blocks but you may want to write less generic selector for it depending on your intent.

本文标签: block editorIs it possible to remove the gutenberg duotone effect on hover