Skip to content

Instantly share code, notes, and snippets.

@mrkpatchaa
Last active June 29, 2020 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrkpatchaa/a6de8dbeafc93494dacc6e0c5d00a406 to your computer and use it in GitHub Desktop.
Save mrkpatchaa/a6de8dbeafc93494dacc6e0c5d00a406 to your computer and use it in GitHub Desktop.
Accessibility and security in CSS #css
/* Unsecure target _blank */
a[target$="blank"]:not([rel*="noopener"]):not([rel*="noreferrer"]) {
outline: 2px dotted red;
}
/* Links going nowhere */
a:is(:not([href]), [href=""], [href="#"]) {
outline: 2px dotted red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment