0

stegrainer.com · 15d · discuss

Today I learned about the CSS pseudo-selector :any-link. It can be used to match any anchor element with an href link, whether that link has been visited or not. In other words, it’s a useful shorthand instead of referencing both the :link and :visited pseudo selectors for combined styles. Apparently this pseudo-selector has been around and widely supported since January 2020, but I only just heard about it today. Maybe I’m not the only one.In the old days, I would define basic link styles like this, using the classic LoVeHAte mnemonic. a { base styles } a:link { unvisited styles...