Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Varia Themes: Cover block - text changes color upon editing anything on the same page #5181

Closed
goblinartificer opened this issue Dec 6, 2021 · 12 comments · Fixed by #5557
Closed
Labels
[Pri] High [Theme] Varia Triaged User Report This issue was created following a WordPress customer report

Comments

@goblinartificer
Copy link

Quick summary

Multiple users have reported that on live sites using the Cover block, the text has previously been white, and has since changed to grey or black (an unreadable color) after another unrelated element is edited.

  • No change in the HTML of the block in Gutenberg seems to exist.
  • The block looks the same with white text in the editor, it's the live view that has a different color.
  • In the CSS, the only thing that is different is that the has-background-dim class is moved down one level from .wp-block-cover to .wp-block-cover__gradient-background. It seems like color: var(--wp--preset--color--background); is set for both, though, so I have no idea what's happening there. All blocks inside still use inherit to get text color.

Steps to reproduce

  1. On a site with existing Cover block templates with text in them (I used the Maywood default homepage in my test), activate Hever.
  2. Make any change at all to anything on the page with the cover blocks in the editor.

What you expected to happen

The text should stay white, as it does in the editor.

What actually happened

The text goes dark grey or black and is unreadable on a dark-overlay image.

Context

Most recently, 33065416-hc (AT) Also in 28882174-hc (Simple). Test site is available at hgshdfhasdfwerfas.wordpress.co ⁠— all I did to get that color change to trigger was change the Welcome to Maywood H3 to a H4.

Simple, Atomic or both?

Simple, Atomic

Theme-specific issue?

Both these sites are on Hever, but it might be broader than that! I haven't tested other themes.

Browser, operating system and other notes

No response

Reproducibility

Consistent

Severity

Some (< 50%)

Available workarounds?

Yes, easy to implement

Workaround details

Manually setting text color works, but it's not an easy alternative for sites with lots of cover images.

@retnonindya
Copy link

This happens on the wpcourses.com website too. Editing any elements but Cover block on the page causes the text color on the Cover block to change too.

Site: Atomic
Theme: Stratford (I think this happens on Varia child themes?)

@Robertght
Copy link

Hey!

I tried to replicate this using Hever, Maywood and Geologist on my end, but I had no luck.

Could you give it a second shot and if it still happens could you share a screen capture?

@chad1008
Copy link

chad1008 commented Dec 8, 2021

I'm able to reproduce in Hever:

  1. Create a new post.
  2. Add a cover block using an image from media library.
  3. Note the placeholder text color - it was a light grey in my test, almost white.
  4. Add some text to the cover block and note the color - it was white in my test.
  5. Publish the post and view your block on the front end, noting the color - it was black in my test.

I was also able to reproduce this locally with Hever (downloaded from WPcom) activated, so this isn't WPcom specific. In this case I created the cover block on a default theme (Twenty Twenty if I recall correctly) which worked fine. I then edited the same post, added a paragraph block, and updated. This caused the color on the front end to change from white (matching the editor) to dark grey/black.

I was also able to reproduce on another Varia child (Stratford). I was not able to reproduce when testing on some non-Varia child themes, so that may be worth investigating as others have noted.

So, TLDR of my testing:

  • On Varia children the cover block placeholder and text will appear light/white in the editor, but dark/black/grey on the front end. Editing a page with an existing cover block will cause the front end color to change to dark/black/grey.
  • One other themes (specifically Blockbase children I've tested) use dark font in both the editor and on the front end, so it may be that the lighter in-editor coloring is connected to the source of this issue. That seems to be the part that's different across the board.

@Robertght
Copy link

Thank you for testing this @chad1008 !

After a few runs on my end as well, this appears to be theme-specific(especially Varia based).

@jeffikus should we add this to the theme's repo?

@upwardmomentum84
Copy link

This also happened on an AT site running the theme Appetite in 33137529-hc.

@jordesign jordesign changed the title Cover block: text changes color upon editing anything on the same page Varia Themes: Cover block - text changes color upon editing anything on the same page Dec 9, 2021
@jordesign
Copy link
Contributor

jordesign commented Dec 9, 2021

Doing some further testing on this - and shifting over to the themes repo as this seems related to Varia themes handling of colors in Cover blocks

@jordesign jordesign transferred this issue from Automattic/wp-calypso Dec 9, 2021
@jordesign
Copy link
Contributor

This issue is sounding really similar to #4993 - which is caused by the default text color for elements within Cover Blocks not matching within the editor and the front-end. It is as though the default text color for all blocks is changed to dark grrey.

In that issue the problem is seen when first editing content in pages (compared to updating pages in this issue). In these cases my hypothesis is that the blocks were using the default color already.

I suspect the same issue is at play - something about updating the page updateds the html/css definitions so the default color changes.

@eduardozulian
Copy link
Member

Also reported in 4687419-zen

@jordesign It seems like we're getting several issues that overlap so I'd like to understand if setting a high priority here would make sense. :)

@formosattic
Copy link

Other reports from Automattic/wp-calypso#60272:

  • 4702178-zd-woothemes
  • 33772054-hc 4706374-zen

@Robertght
Copy link

I'd like to point out that in the above case the fonts were not applied either.

@csabarakasz
Copy link

I wanted to leave a comment here that this 4706374-zd-woothemes ticket was most likely not a bug, but a custom CSS that was added by the user and we didn't know about it, until now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Pri] High [Theme] Varia Triaged User Report This issue was created following a WordPress customer report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants