Firefox and the challenge of trying to make visited links clearly visible

May 12, 2021

I tweeted:

I wish I could work out a way in the Stylus Firefox addon to force-style visited links in something distinctive. In theory it's easy; in practice Firefox seems to sharply limit how you can style them these days for privacy, and my attempts so far aren't all that successful.

I frequently read articles on the Internet that have plenty of links to other interesting things, some of which I've read and some of which I haven't and would like to. On normal websites, this is what my very large browser history and the default visual distinction between visited and unvisited links is good for; it tells me what things I haven't read yet. Unfortunately, a steadily increasing number of websites style unvisited and visited links the same, defeating my attempts to see what I've already read. Sometimes they go the extra distance to style links so it's hard to even tell they are links.

With suitable effort, I could definitely use Stylus to create individual styles for every annoying site that made unvisited links have a distinctly different colour the way they're supposed to. But that's a lot of work. What I'd prefer to do is create a single global style, normally not on, that would make unvisited links (and perhaps visited ones) stand out no matter what colours and CSS styling the particular site was already using.

In the old days, this would have been pretty simple. There are a lot of text styles that aren't used much and stand out a lot, such as strike-throughs or heavy underlines. The result wouldn't necessarily look the best, but at least I could see what links I'd already read. Unfortunately, you can't do that any more (for good reasons). These days, only a few things can be set on the CSS :visited selector, mostly colour changes. Changing and setting colours in general is dangerous, especially in a world where so many websites already set them to various unpredictable values that may not be distinct from my new ones.

Given the limitations on what you can set on :visited, I most likely need both an overall distinctive style for a:link and then a complementary modification for :visited. While MDN's Styling links has given me some things to think about, I currently haven't come up with a good styling combination that actually works.

(In the process of poking around MDN, I did discover that in Firefox you can now access the standard colours of visited and unvisited links with the special colour names of LinkText and VisitedText.)

Written on 12 May 2021.
« Errors during SMTP conversations aren't trustworthy, illustrated
The Bourne shell lets you set variables in if expressions »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Wed May 12 00:57:59 2021
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.