- This topic has 8 replies, 5 voices, and was last updated 3 years, 6 months ago by
David.
-
AuthorPosts
-
September 24, 2022 at 2:03 am #2352251
Yannick
Dear support team,
I had the wild idea to try out the Gutenberg duotone filters, but the CSS classes seem to be missing. I deactivated my child theme, to rule out that I messed something up. I have also deactivated all plugins but it is still not working.
Gutenberg adds the following class to the image, but the filter url does not work. Is this a known bug or some Gutenberg bug? Looking at the Gutenberg Github repo I wasnt able to find a similar issue.
.wp-duotone-var--base-var--accent-3-1 img { filter: url('#wp-duotone-var--base-var--accent-3-1') !important; }Do you have any idea what is happening here?
Kind regards
YannickSeptember 24, 2022 at 11:56 am #2352703Leo
StaffCustomer SupportHi there,
Hmm does the same issue occur when using a Twenty series WP default theme?
Let me know 🙂
September 25, 2022 at 3:06 am #2353013Yannick
Using 2022 it works. I get a CSS class with HEX color values. Sometimes Gutenberg is really weird.
.wp-duotone-0693e3-cf2e2e-7 img { filter: url('#wp-duotone-0693e3-cf2e2e-7') !important; }September 25, 2022 at 3:10 am #2353014Yannick
Funny thing is: The class with HEX values keeps working if I activaed GeneratePress again.
September 25, 2022 at 8:50 pm #2353654Fernando Customer Support
Hi Yannick,
To clarify, is it working as expected now?
September 26, 2022 at 1:27 am #2353790Yannick
Hi Fernando,
it is not working.
The CSS class generated when using 2022 (with HEX values) keeps working when I switch back to GeneratePress.
But the CSS classes generated when using GeneratePress (wp-duotone-var–base-var–accent-3) are still no working.
Kind regards
YannickOctober 2, 2022 at 7:06 pm #2360960Tom
Lead DeveloperLead DeveloperHi there,
My guess here is that the duotone feature isn’t built to work with CSS variables.
If you add a regular hex color value (instead of a CSS variable), does it work in GP?
October 14, 2022 at 6:38 am #2373374Yannick
Hi Tom,
thank you very much for your reply and sorry for my late response.
I did some more testing in GeneratePress and added custom color and they work fine (its rgba values not hex. That shouldnt make a difference).
.wp-duotone-rgb1097979-rgb25207207-12 img { filter: url('#wp-duotone-rgb1097979-rgb25207207-12') !important; }I also looked into the difference between GeneratePress and 2022 in the editor and the problem seems to be the CSS variables. When I use 2022 the color picker modal in the editor shows the hex value of a color, even if it is one of the default colors defined as a variable. When I am using GeneratePress this modal shows the CSS variable which does not work with duotone image (I hope you can understand what I mean).
October 14, 2022 at 7:54 am #2373602David
StaffCustomer SupportHi there,
when creating your Duotone you must use the picker to add the real color value.
You won’t be able to select a GP Global Color from the pallet, as that loads a CSS Variable which is not compatible with the method WP uses to create its duotones. -
AuthorPosts
- You must be logged in to reply to this topic.