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

Post Editor: Text Color resets Link Color #54158

Closed
MaksimUrasov opened this issue Jun 30, 2021 · 1 comment
Closed

Post Editor: Text Color resets Link Color #54158

MaksimUrasov opened this issue Jun 30, 2021 · 1 comment
Labels
Needs triage Ticket needs to be triaged [Type] Bug

Comments

@MaksimUrasov
Copy link

MaksimUrasov commented Jun 30, 2021

In Post/Page Editor, if the Paragraph Block has set the Text Color, then Link Color resets to default color despite there is a chosen color.
Text Color and Link Colors are these:

Steps to reproduce the behavior

  1. Create a new website on WordPress.com
  2. Use the Twenty-Twenty-One Theme. Another theme like Hever does not have this bug. Maybe it is the Theme problem? Could not check that, because the self-hosted wordpress+Twenty-Twenty-One theme does not have a Link Color option at all. Installing the Gutenberg plugin activates a Link Color option, but it works without this bug. One small difference I have noticed is explained below.
  3. Create a new Post
  4. Add a paragraph
  5. Add some text into a paragraph, and create a link.
  6. Choose a color in Block Settings > Color > Link Color.
  7. Check the front-end - link is be colored, as expected.
  8. Return to Post editor, select the same paragraph, add Text Color to it: Block Settings > Color > Text Color.
  9. Check the result on the front-end: Expected to see the same result as shown in the Editor screen, but on the front-end, I see changed Text Color, and the Link Color reset to the default color.

What I expected to happen

Expect to change the Text Color and Link Color to the chosen values.

What actually happened

If the Text Color is selected, then Link Color resets to the default theme color.

Browser / OS version

Chome 91.0.4472.114; Win 10 (10.0.19042 Build 19042)

Is this specific to the applied theme? Which one?

Yes, to the Twenty-Twenty-One

Does this happen on simple or atomic sites or both?

Simple

Is there any console output or error text?

Yes, explained below

Level of impact (Does it block purchases? Does it affect more than just one site?)

Reproducibility (Consistent, Intermittent) Leave empty for consistent.

Screenshot / Video: If applicable, add screenshots to help explain your problem.

POSSIBLE REASONS

What I can see in the inspection tool is below:

After I add the Link Color, a new style element is being added after the Paragraph:
<style>.wp-elements-60dc328970c26 a{color:var(--wp--preset--color--white); !important;}</style>
But the !important rule in the <a> element is not recognized by browser: "Unknown property name". I suppose that is because the semicolon left in the <style> element before the !important rule.
While I have tested the same issue in self-hosted WP + TT1 + Gutenberg = all worked fine, and the only difference I found was eliminated the above mentioned, semicolon as showed here:

@MaksimUrasov MaksimUrasov added [Type] Bug Needs triage Ticket needs to be triaged labels Jun 30, 2021
@jordesign
Copy link
Contributor

Closing this as stale - with 3 years worth of Gutenberg updates in the interim a new issue can be opened if the bug is recorded again.

@jordesign jordesign closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs triage Ticket needs to be triaged [Type] Bug
Projects
None yet
Development

No branches or pull requests

2 participants