Skip to content

Commit

Permalink
Highlight any empty non-void element
Browse files Browse the repository at this point in the history
Instead of blacklisting most likely offending tags, let's whitelist
tags we know cannot be offending.
  • Loading branch information
imbrianj committed Jan 23, 2014
1 parent 8e1fab1 commit efd595f
Showing 1 changed file with 4 additions and 31 deletions.
35 changes: 4 additions & 31 deletions debugCSS.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,7 @@ table[cellspacing]:after,
*:not(img):not(iframe)[width]:after, /* Acceptable for transitional doctypes, but should probably be relegated to CSS */
*:not(img):not(iframe)[height]:after,
*[border]:after,
div:empty:after,
span:empty:after,
p:empty:after,
ul:empty:after,
ol:empty:after,
dl:empty:after,
li:empty:after,
dt:empty:after,
dd:empty:after,
a:empty:after,
*:not(area):not(base):not(br):not(col):not(embed):not(hr):not(iframe):not(img):not(input):empty:after,
a a:after,
img:not([alt]) ~ *:not(area):not(base):not(br):not(col):not(embed):not(hr):not(iframe):not(img):not(input):first-of-type:before,
img:not([src]) ~ *:not(area):not(base):not(br):not(col):not(embed):not(hr):not(iframe):not(img):not(input):first-of-type:before,
Expand Down Expand Up @@ -357,18 +348,9 @@ table[cellspacing]:after,
content: 'Element has inline style';
}

div:empty:after,
span:empty:after,
p:empty:after,
ul:empty:after,
ol:empty:after,
dl:empty:after,
li:empty:after,
dt:empty:after,
dd:empty:after,
a:empty:after {
*:not(area):not(base):not(br):not(col):not(embed):not(hr):not(iframe):not(img):not(input):empty:after {
background: #FFFF88;
content: 'Element has no content. Is this necessary?';
content: 'Element is empty. Is this necessary?';
}

a a:after {
Expand Down Expand Up @@ -703,16 +685,7 @@ table[cellspacing],
*:not(img):not(iframe)[width],
*:not(img):not(iframe)[height],
*[border],
div:empty:after,
span:empty,
p:empty,
ul:empty,
ol:empty,
dl:empty,
li:empty,
dt:empty,
dd:empty,
a:empty,
*:not(area):not(base):not(br):not(col):not(embed):not(hr):not(iframe):not(img):not(input):empty,
img:not([alt]),
a:not([href]),
a[href="#"],
Expand Down

0 comments on commit efd595f

Please sign in to comment.