Skip to content

Commit 57039a0

Browse files
committed
Highlight any empty non-void element
Instead of blacklisting most likely offending tags, let's whitelist tags we know cannot be offending.
1 parent 57bf957 commit 57039a0

1 file changed

Lines changed: 4 additions & 31 deletions

File tree

‎debugCSS.css‎

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,7 @@ table[cellspacing]:after,
5959
*:not(img):not(iframe)[width]:after, /* Acceptable for transitional doctypes, but should probably be relegated to CSS */
6060
*:not(img):not(iframe)[height]:after,
6161
*[border]:after,
62-
div:empty:after,
63-
span:empty:after,
64-
p:empty:after,
65-
ul:empty:after,
66-
ol:empty:after,
67-
dl:empty:after,
68-
li:empty:after,
69-
dt:empty:after,
70-
dd:empty:after,
71-
a:empty:after,
62+
*:not(area):not(base):not(br):not(col):not(embed):not(hr):not(iframe):not(img):not(input):empty:after,
7263
a a:after,
7364
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,
7465
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,
@@ -357,18 +348,9 @@ table[cellspacing]:after,
357348
content: 'Element has inline style';
358349
}
359350

360-
div:empty:after,
361-
span:empty:after,
362-
p:empty:after,
363-
ul:empty:after,
364-
ol:empty:after,
365-
dl:empty:after,
366-
li:empty:after,
367-
dt:empty:after,
368-
dd:empty:after,
369-
a:empty:after {
351+
*:not(area):not(base):not(br):not(col):not(embed):not(hr):not(iframe):not(img):not(input):empty:after {
370352
background: #FFFF88;
371-
content: 'Element has no content. Is this necessary?';
353+
content: 'Element is empty. Is this necessary?';
372354
}
373355

374356
a a:after {
@@ -703,16 +685,7 @@ table[cellspacing],
703685
*:not(img):not(iframe)[width],
704686
*:not(img):not(iframe)[height],
705687
*[border],
706-
div:empty:after,
707-
span:empty,
708-
p:empty,
709-
ul:empty,
710-
ol:empty,
711-
dl:empty,
712-
li:empty,
713-
dt:empty,
714-
dd:empty,
715-
a:empty,
688+
*:not(area):not(base):not(br):not(col):not(embed):not(hr):not(iframe):not(img):not(input):empty,
716689
img:not([alt]),
717690
a:not([href]),
718691
a[href="#"],

0 commit comments

Comments
 (0)