Revisiting The :visited State For Links

If you have a number of links on a page, sometimes you might want to indicate that some of them have been visited by a user, while others haven't. That’s what we’d usually use :visited for, yet (for privacy reasons) browsers strictly limit which styles you can apply using this pseudo-class and how they can be used. So, if you do want to style visited links differently, how would you do it?
Pushing The Limits With CSS Blend Modes
Well, there are some techniques. You could style visited links with SVG by filling in the color of the SVG icon on :visited. Or you could use CSS blend-mode using a shade of gray as the background to achieve semi-transparency. Or use double tags and hide the duplicate from screen readers. Or, if you feel experimental, show and hide things with border-color. There are quirky options out there, and CSSWG is committed to finding a solution. If you choose to use :visited, be cautious as it might not work reliably in the future, and you’re potentially exposing customer’s data. (vf)
From our sponsor

Build Your Bot Expertise on Discover.bot

Join bot developers and enthusiasts of all skill levels to learn and build a community resource. Find trade tips, read industry trends, and gain insights on tools, platforms and frameworks for your first or your fiftieth bot build. Read more.
two awesome developers discussing some stuff 
Revisiting The :visited State For Links Revisiting The :visited State For Links Reviewed by JohnBlogger on 8:59 AM Rating: 5

No comments: