You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Create a new website on WordPress.com
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.
Create a new Post
Add a paragraph
Add some text into a paragraph, and create a link.
Choose a color in Block Settings > Color > Link Color.
Check the front-end - link is be colored, as expected.
Return to Post editor, select the same paragraph, add Text Color to it: Block Settings > Color > Text Color.
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.
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:
The text was updated successfully, but these errors were encountered:
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
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:
The text was updated successfully, but these errors were encountered: