Skip to content

Instantly share code, notes, and snippets.

@mrkpatchaa
Last active June 29, 2020 06:28
Show Gist options
  • 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