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

Global styles: link color setting #21032

Closed
karmatosed opened this issue Mar 19, 2020 · 7 comments
Closed

Global styles: link color setting #21032

karmatosed opened this issue Mar 19, 2020 · 7 comments
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Needs Dev Ready for, and needs developer efforts

Comments

@karmatosed
Copy link
Member

A common thing to change outside a theme is a link color. When you set that, there is a need to also set hover and active colors. I began exploring what this could look like and a tabbed interface could be an option:

image

In the context of a larger screen that would look like this:

all

@karmatosed karmatosed added Needs Dev Ready for, and needs developer efforts Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Mar 19, 2020
@mtias mtias mentioned this issue Mar 19, 2020
82 tasks
@karmatosed
Copy link
Member Author

To go further, the colors should show by default the theme specified ones. You can then click each and replace with a custom color. There is a reset option to clear all.

If there aren't any theme set colors it should have defaults. My recommendation would be the blue wee use for links, black, white and a grey.

colors

Default suggestions:

Frame 10

@carolinan
Copy link
Contributor

What about the visited links?

@karmatosed
Copy link
Member Author

@carolinan do you think they should have a custom colour or default to a variation (darker/lighter) from another?

@aristath
Copy link
Member

I don't think I've seen a different color used for visited in many, many years!

@carolinan
Copy link
Contributor

When reviewing themes it is most notable when the author sets a default color for all link statuses, then adds color options for links and forgets to apply the color to the visited links.

It might be just fine to apply the "link color" also to the visited link status. But if the visited link is left defaulting to the theme color, all sort of things can happen like white text over white background.

If we look at themes in the theme directory (via wpdirectory.net) , a:active has a larger number than a:visited.
a:active 28294
a:visited 25167

I don't think it is common to add a different color to a:active either, it is usually the same color as hover. That has a bigger impact on buttons with a much larger click area.

The accessibility benefit if the visited link has a different color than the standard link is likely very small because there would need to also be a text decoration change.

@GrimLink
Copy link

@carolinan I don't think the visited pseudo state helps anyone.
It would be better to drop this style from the link styles and other blocks like the button.

In most CSS stacks/frameworks it is not styled anymore.
So I am surprised it is in the Gutenberg blocks, and then also we have the matter of the privacy points around the visited pseudo state.

So to simplify stuff, it would be better to drop the styles for this.

@mtias
Copy link
Member

mtias commented May 23, 2022

Link color is supported as an element now, and other states are being covered by #27075 and #38277.

@mtias mtias closed this as completed May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json Needs Dev Ready for, and needs developer efforts
Projects
None yet
Development

No branches or pull requests

5 participants