Last active
August 12, 2020 09:05
-
-
Save moeriki/2989f748dd4a17b553cd89326f997338 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Find images with missing alt attributes */ | |
img:not([alt]) { | |
outline: 2px dotted red; | |
} | |
/* Potential tabindex problems */ | |
[tabindex]:not([tabindex="0"], [tabindex="-1"]) { | |
outline: 2px dotted red; | |
} | |
/* Links that go nowhere */ | |
a:is(:not([href]), [href=""], [href="#"]) { | |
outline: 2px dotted red; | |
} | |
/* Invalid list elements */ | |
:is(ul,ol) > *:not(li) { | |
outline: 2px dotted red; | |
} | |
/* Images without width and height */ | |
img:not([width]):not([height]) { | |
filter: blur(20px); | |
} | |
/* Headers out of order (i.e. h2 before h1, etc.) | |
Result: dotted blue outline | |
*/ | |
h2 ~ h1, | |
h3 ~ h1, | |
h4 ~ h1, | |
h5 ~ h1, | |
h6 ~ h1, | |
h3 ~ h2, | |
h4 ~ h2, | |
h5 ~ h2, | |
h6 ~ h2, | |
h4 ~ h3, | |
h5 ~ h3, | |
h6 ~ h3, | |
h5 ~ h4, | |
h6 ~ h4, | |
h6 ~ h5 { | |
outline: 2px dotted red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment