Skip to content

Instantly share code, notes, and snippets.

@StephaneTy-Pro
Created February 4, 2016 09:16
Show Gist options
  • Save StephaneTy-Pro/e5a85678f3dcd808ae0d to your computer and use it in GitHub Desktop.
Save StephaneTy-Pro/e5a85678f3dcd808ae0d to your computer and use it in GitHub Desktop.
treat external link with style
/*Identifier visuellement quand on change de site
le snippets suivant permet d'identifier les liens différemment visuellement
src : 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! */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment