Pablo Enoc

Pablo Enoc

Software Writer

Las Vegas, NV

Recent Posts

Pablo Enoc

Pablo Enoc

Software Writer

Las Vegas, NV

re: Do you use :visited on links?

Kev Quirk, Do you use :visited on links?:

I’ve always made the :visited attribute for hyperlinks look the same as links that haven’t been visited, and it seems that it’s the default behaviour across the web.

I was getting ready to draft a response saying how I do… but it looks like I don’t! A few weeks ago I redesigned my blog to use the green sidebar as the main navigation point and on every new design I scrap my old CSS file and start a new one from scratch. And it looks like I missed the visited links color…

So now as I write this I’m thinking what color to make the visited links. I’m a big fan of the default purple value most web browsers use, but dark mode is where I have to really think about it. I’m not a dark mode user at all, I can’t focus at all and I even find dark modes claustrophobic. I’d rather adjust my ambient lighting if I’m going to continue working when it’s dark. But let’s add some color to the visited links on this blog.

Let’s C-x p f to jump to style.css. Ahh, now I remember why I didn’t add it! As I look at my stylesheet I notice I’m using a purple color for code blocks in dark mode, and I didn’t want those colors to clash.

A few tweaks… and there it is! Purple for visited links. Some links of course I want them to stay the same color even when visited (like the ones in the navigation bar) so I added some rules for them. And I updated the color of code blocks in dark mode too.

Reply via e-mail