Skip to content
This repository has been archived by the owner on Jun 10, 2023. It is now read-only.

Weird colors on visited links, in Chrome #283

Open
thomasjsn opened this issue Mar 7, 2022 · 2 comments
Open

Weird colors on visited links, in Chrome #283

thomasjsn opened this issue Mar 7, 2022 · 2 comments

Comments

@thomasjsn
Copy link
Contributor

thomasjsn commented Mar 7, 2022

I'm suddenly seeing weird colors on visited links, in Chrome and Edge. Happens on both my desktop and mobile.

image

It also happens on the demo site, but in light mode. May have something to do with the default coloring scheme.

image

It doesn't happen in Firefox, and I can't say I've seen it before in Chrome. Looking at the CSS I can't see any reason why the color is off.

Bug in Chrome? Strange...

@thomasjsn
Copy link
Contributor Author

It seems to be the color: inherit that is causing the strange behavior. The problem goes away if I set the colors to var(--color) instead of inherit.

@thomasjsn
Copy link
Contributor Author

thomasjsn commented Mar 8, 2022

I suspect the user agent stylesheet is the cause of the problem:

a:-webkit-any-link {
    color: -webkit-link;
    cursor: pointer;
    text-decoration: underline;
}

Making the color inherit color: -webkit-link; instead of the root element.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant