Skip to content

Instantly share code, notes, and snippets.

@jonathansousa
Created June 27, 2012 23:06
Show Gist options
  • Select an option

  • Save jonathansousa/3007475 to your computer and use it in GitHub Desktop.

Select an option

Save jonathansousa/3007475 to your computer and use it in GitHub Desktop.
CSS: Diagnostics 2
div:empty, span:empty,
li:empty, p:empty,
td:empty, th:empty {padding: 0.5em; background: yellow;}
*[style], font, center {outline: 5px solid red;}
*[class=""], *[id=""] {outline: 5px dotted red;}
img[alt=""] {border: 3px dotted red;}
img:not([alt]) {border: 5px solid red;}
img[title=""] {outline: 3px dotted fuchsia;}
img:not([title]) {outline: 5px solid fuchsia;}
table:not([summary]) {outline: 5px solid red;}
table[summary=""] {outline: 3px dotted red;}
th {border: 2px solid red;}
th[scope="col"], th[scope="row"] {border: none;}
a[href]:not([title]) {border: 5px solid red;}
a[title=""] {outline: 3px dotted red;}
a[href="#"] {background: lime;}
a[href=""] {background: fuchsia;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment