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

Link-text color issue in paragraph block #40219

Closed
KAJALwp opened this issue Apr 11, 2022 · 9 comments
Closed

Link-text color issue in paragraph block #40219

KAJALwp opened this issue Apr 11, 2022 · 9 comments
Labels
Needs Testing Needs further testing to be confirmed. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Regression Related to a regression in the latest release

Comments

@KAJALwp
Copy link

KAJALwp commented Apr 11, 2022

Description

When I try to add text-color in paragraph block, It is only reflect with normal text and the link-text is shows default text-color. But when I add the background color for this it is reflected with normal as well link-text also.
For better understanding I provide the video attachment link.

Step-by-step reproduction instructions

  1. Go to editor
  2. Add paragraph block
  3. enter text and select any text for giving link
  4. add link for text
  5. Go to sidebar Color option
  6. Choose Text color for paragraph
  7. Choose Background color for paragraph

Screenshots, screen recording, code snippet

https://screencast-o-matic.com/watch/c3fXjiVqdGb

Environment info

WordPress version: 5.9.3
Google chrome version: Version 100.0.4896.75 (Official Build) (arm64)
OS Version: Mac 12.3.1
Gutenberg Plugin Version: 12.9.0

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@carolinan
Copy link
Contributor

carolinan commented Apr 11, 2022

Hi
I am not able to reproduce this in Twenty Twenty-Two, Twenty Nineteen, or in my own custom theme (classic).
Are you able to reproduce this problem with other themes than Twenty Twenty-One?

The following CSS from Twenty Twenty-One is overriding the selected link color,
but --wp--style--color--link does not exist so it falls back to the primary color.

.has-background .has-link-color a,
.editor-styles-wrapper .has-background.has-link-color a {
    color: var(--wp--style--color--link, var(--global--color-primary));
}

If I remember correctly, --wp--style--color--link was supported for classic themes that had add_theme_support('experimental-link-color'). (like TT1)

I am not sure when it was removed, if it was intentional, or how classic themes can support the link color now.
Pinging @oandregal who might know.

@ndiego
Copy link
Member

ndiego commented Apr 11, 2022

Hi @KAJALwp, I believe this is an issue that might be isolated to the Twenty Twenty-One theme as @carolinan mentions above. Below is my test using the Twenty Twenty-Two theme and all is working as expected. Not that the Link color setting is hidden by default in the "View options" menu. You need to enable that to change the link color.

link-testing

@KAJALwp
Copy link
Author

KAJALwp commented Apr 12, 2022

Hello @ndiego

I have tried to enable Link color setting which is hidden by default in the "View options" menu to change the link color. When I try to add background color for paragraph block link-text color is removed and shows default text-color and also after that Link color is not working properly in Theme Twenty Twenty-one.
For better understanding I provide video attachment link.

Video URL: https://screencast-o-matic.com/watch/c3flQVVqMYD

Thanks

@carolinan
Copy link
Contributor

carolinan commented Apr 12, 2022

@KAJALwp Are you able to reproduce this problem with other themes than Twenty Twenty-One?
I am asking because if the problem is limited to Twenty Twenty-One, we need to solve it in the theme and not in Gutenberg.

@carolinan carolinan added the Needs Testing Needs further testing to be confirmed. label Apr 12, 2022
@KAJALwp
Copy link
Author

KAJALwp commented Apr 12, 2022

Hello @carolinan

I have checked the Twenty-Twenty and Twenty Twenty-Two theme and I can't reproduce this issue in Twenty Twenty-Two theme. but there is no separate option for Link-text color in Twenty-Twenty theme in the "View Option" menu and it's working fine with Text color option.

Thanks

@carolinan
Copy link
Contributor

I found that it was once fixed by #30452, but I still don't know if this is a regression or intentional.

@carolinan carolinan added the [Type] Regression Related to a regression in the latest release label Apr 14, 2022
@KAJALwp
Copy link
Author

KAJALwp commented Aug 22, 2022

Hello @carolinan ,

When I try to add text-color in paragraph block, It is only reflect with normal text and the link-text is shows default text-color. But it is reflected properly in front-side.

For better understanding I provide the video attachment link.
https://share.cleanshot.com/2XsvZxjD1Oh4sLvLR7AB

Environment info
WordPress version: 6.0.1
Google chrome version: 104.0.5112.79 (Official Build) (arm64)
OS Version: Monterey 12.4
Theme: Twenty Twenty
Gutenberg Plugin Version: 13.3.0

Thanks

@carolinan
Copy link
Contributor

The link color option was removed from classic themes. I have asked during meetings but there has been no interest in adding it back.
#41857

@github-actions github-actions bot added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Sep 22, 2022
@kathrynwp
Copy link

Given @carolinan's comment above, as well as their note on the issue they linked to,

The missing link color support can now be re-added by adding #43337 to the theme.

...I'm going ahead and closing this one out, since it looks like nothing further is going to be done on the Gutenberg side.

@kathrynwp kathrynwp closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Testing Needs further testing to be confirmed. [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

No branches or pull requests

4 participants