/ Gists / External links only CSS
On gists

External links only CSS

CSS CSS trick

external-links.css Raw #

/* https://davidwalsh.name/external-links-css */

/* long version */
a[href^="http://"]:not([href*="mysite.com"]),
a[href^="https://"]:not([href*="mysite.com"]), 
a[href^="//"]:not([href*="mysite.com"]), {
    
}
/* shorter version! */
a[href*="//"]:not([href*="mysite.com"]) {
    /* external link styles, use :before or :after if you want! */
}

solution-2.css Raw #

/* https://stackoverflow.com/questions/5379752/css-style-external-links */

a[href^="http://"]:not([href*="example.com"]):after,
a[href^="https://"]:not([href*="example.com"]):after{
    content: " (EXTERNAL)" 
}