panr / hugo-theme-hello-friend

Pretty basic theme for Hugo that covers all of the essentials. All you have to do is start typing!
https://github.com/panr/hugo-theme-hello-friend/
MIT License
1.06k stars 1.22k forks source link

Weird colors on visited links, in Chrome #283

Open thomasjsn opened 2 years ago

thomasjsn commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.