logoalt Hacker News

sodapopcantoday at 2:56 PM2 repliesview on HN

This blog's misuse of the external link icon irks me.


Replies

kyle-rbtoday at 3:53 PM

The CSS selector they used (`a[href*="://"]::after`) is meant to only target only external links, but assumes any internal links will be using relative paths like `href="/about"`. The problem is that this site uses absolute URLs (`href="https://hhh.hn/about"`) for its nav links, so every link ends up with an icon.

You could fix this by adding an exception to the CSS rule so it skips links starting with your site's name:

  a[href*="://"]:not([href^="https://hhh.hn"])::after
show 1 reply
hhhtoday at 4:05 PM

will fix it tomorrow