- This topic has 13 replies, 4 voices, and was last updated 3 years, 7 months ago by
Ying.
-
AuthorPosts
-
February 10, 2022 at 11:11 am #2113127
Gabriel
I added a separator block to the page and set a color on it. I can see the color change in the backend but not in the frontend. Lookin at it though DevTools that the color of he <hr> tag is overridden by .has-text-color in the generate-style-inline-css <style> tag. I have not been able to reproduce in a separate site unfortunately. Any idea what could be the cause of this?
Added a link in private information.
February 10, 2022 at 11:12 am #2113131Leo
StaffCustomer SupportHi there,
Can you clear and disable your caching plugin first?
February 10, 2022 at 2:14 pm #2113372Gabriel
Done
February 10, 2022 at 3:46 pm #2113465Leo
StaffCustomer SupportWhich separator (1-4) are you referring to here?
https://www.screencast.com/t/hPhZAN5j2EPFebruary 10, 2022 at 9:34 pm #2113708Gabriel
The first one. It is the only one that is a <hr> tag. The rest are container borders.
February 10, 2022 at 9:56 pm #2113715Fernando Customer Support
Hi Gabriel,
Do you have a Global color with variable named “text” in Appearance > Customize > Colors.
See this for reference: https://share.getcloudapp.com/nOu92qe0
By WordPress default, the Separator block has a has-text-color class which in turn, if a color “text” is set, could override the color you set to it.
If you wish to override this via CSS, here is a code you may try:
hr.wp-block-separator { color: var(--primary) !important; }Here is an article with regards to adding CSS: https://docs.generatepress.com/article/adding-css/
Hope this helps! 🙂
February 11, 2022 at 12:06 am #2113814Gabriel
Wow thanks. I could never have figured that out. What I ended up doing is renaming the variable to –contrast. Seems that this is indeed a side effect of Gutenberg since GeneratePress doesn’t have a variable called –text out of the box.
I opened an issue at the Gutenberg repository.
February 11, 2022 at 12:34 am #2113853Fernando Customer Support
You’re welcome! Glad I was able to help! Feel free to reach out anytime if you’ll need assistance with anything else. 🙂
September 20, 2022 at 11:27 pm #2349095Gabriel
The Gutenberg team has concluded that this is a problem with GeneratePress and not WordPress or Gutenberg. Maybe someone from GeneratePress can comment on this? https://github.com/WordPress/gutenberg/issues/38729#issuecomment-1252421916
September 20, 2022 at 11:41 pm #2349102Fernando Customer Support
Can you share the link to the site once more for reference?
September 21, 2022 at 12:45 am #2349170Gabriel
At the link in private information you can see that there’s a separator block that has its background set to the
--contrastcolor variable. But because another color variable with the name--textexists, it gets the overridden by the background color of thehas-text-colorCSS class.September 21, 2022 at 10:48 am #2349833Ying
StaffCustomer SupportThe only solution I can think of is to change the name of the
textglobal color.In the meantime, I don’t think the separater block is needed, as you can add borders to the GB container and headline blocks.
September 22, 2022 at 1:30 am #2350327Gabriel
Thanks. I understand that there are workarounds for this. Just trying to figure out whether this is a bug in GP or Gutenberg.
I opened a GitHub issue with GeneratePress.
September 22, 2022 at 9:42 am #2350854Ying
StaffCustomer SupportThanks for reporting this to us.
-
AuthorPosts
- You must be logged in to reply to this topic.