@@ -37,16 +37,21 @@ table th:not([scope]):after,
3737table thead td : after ,
3838table > tbody : first-child : after ,
3939table > tbody + tfoot : after ,
40- table > tr : first-child : last -child: after ,
41- table > tbody > tr : first-child : last -child: after ,
40+ table > tr : only -child: after ,
41+ table > tbody > tr : only -child: after ,
4242table > * : not (thead ): not (tfoot ): not (tbody ): not (tr ): not (colgroup ): not (caption ): after ,
4343table [align ]: after ,
4444table [bgcolor ]: after ,
4545table [border ]: after ,
4646table [cellpadding ]: after ,
4747table [cellspacing ]: after ,
48- table [width ]: after ,
48+ * [width ]: after , /* Acceptable for transitional doctypes, but should probably be relegated to CSS */
49+ * [height ]: after ,
50+ * [border ]: after ,
4951img : not ([alt ]): after ,
52+ img : not ([src ]): after ,
53+ img [src = "" ]: after ,
54+ img [src = "#" ]: after ,
5055a : not ([href ]): after ,
5156a [href = "#" ]: after ,
5257a [href *= javascript\: ]: after ,
@@ -62,24 +67,46 @@ h3 div:after,
6267h4 div : after ,
6368h5 div : after ,
6469h6 div : after ,
65- a div : after ,
6670span div : after ,
67- html [xmlns ] a h1 : after , /* Try to select only in XHTML documents (thanks, Thierry). */
71+ html [xmlns ] a div : after , /* Try to select only in XHTML documents (thanks, Thierry). */
72+ html [xmlns ] a h1 : after ,
6873html [xmlns ] a h2 : after ,
6974html [xmlns ] a h3 : after ,
7075html [xmlns ] a h4 : after ,
7176html [xmlns ] a h5 : after ,
7277html [xmlns ] a h6 : after ,
73- ol > * : not (li ),
74- ul > * : not (li ),
78+ ol > * : not (li ): after ,
79+ ul > * : not (li ): after ,
7580dl > * : not (dt ): not (dd ): after ,
7681form > * : not (fieldset ): after ,
77- fieldset * : not (legend ): first-child : after ,
82+ fieldset > * : not (legend ): first-child : after ,
7883iframe : not ([title ]): after ,
84+ * [class ^= "1" ]: after ,
85+ * [class ^= "2" ]: after ,
86+ * [class ^= "3" ]: after ,
87+ * [class ^= "4" ]: after ,
88+ * [class ^= "5" ]: after ,
89+ * [class ^= "6" ]: after ,
90+ * [class ^= "7" ]: after ,
91+ * [class ^= "8" ]: after ,
92+ * [class ^= "9" ]: after ,
93+ * [class ^= "0" ]: after ,
94+ * [id ^= "1" ]: after ,
95+ * [id ^= "2" ]: after ,
96+ * [id ^= "3" ]: after ,
97+ * [id ^= "4" ]: after ,
98+ * [id ^= "5" ]: after ,
99+ * [id ^= "6" ]: after ,
100+ * [id ^= "7" ]: after ,
101+ * [id ^= "8" ]: after ,
102+ * [id ^= "9" ]: after ,
103+ * [id ^= "0" ]: after ,
79104center : after ,
80105u : after ,
81106font : after ,
82107map : after ,
108+ br + * : not (br ): before ,
109+ br + br + * : before ,
83110b : after ,
84111i : after ,
85112blink : after ,
@@ -117,7 +144,7 @@ table > tr:after {
117144
118145table th : not ([scope ]): after {
119146 background : # 88FF88 ;
120- content : 'Should TH have a SCOPE attribute (ROW or COL)?.' ;
147+ content : 'Should TH have a SCOPE attribute (ROW or COL)? OK if using ID and HEADERS .' ;
121148}
122149
123150table thead td : after {
@@ -135,8 +162,8 @@ table > tbody + tfoot:after {
135162 content : 'TBODY should come after TFOOT.' ;
136163}
137164
138- table > tr : first-child : last -child: after ,
139- table > tbody > tr : first-child : last -child: after {
165+ table > tr : only -child: after ,
166+ table > tbody > tr : only -child: after {
140167 background : # 88FF88 ;
141168 content : 'Only one TR in TABLE. Are you using it for layout?' ;
142169}
@@ -151,7 +178,9 @@ table[bgcolor]:after,
151178table [border ]: after ,
152179table [cellpadding ]: after ,
153180table [cellspacing ]: after ,
154- table [width ]: after {
181+ * [width ]: after ,
182+ * [height ]: after ,
183+ * [border ]: after {
155184 background : # FFFF88 ;
156185 content : 'Element has inline style.' ;
157186}
@@ -161,6 +190,13 @@ img:not([alt]):after {
161190 content : 'Image does not have an ALT attribute.' ;
162191}
163192
193+ img : not ([src ]): after ,
194+ img [src = "" ]: after ,
195+ img [src = "#" ]: after {
196+ background : # FF8888 ;
197+ content : 'IMG without proper SRC attribute. Serious implications for some browsers.' ;
198+ }
199+
164200a [href = "#" ]: after ,
165201a : not ([href ]): after {
166202 background : # FFFF88 ;
@@ -196,8 +232,8 @@ h3 div:after,
196232h4 div : after ,
197233h5 div : after ,
198234h6 div : after ,
199- a div : after ,
200235span div : after ,
236+ html [xmlns ] a div : after ,
201237html [xmlns ] a h1 : after ,
202238html [xmlns ] a h2 : after ,
203239html [xmlns ] a h3 : after ,
@@ -224,7 +260,7 @@ form > *:not(fieldset):after {
224260 content : 'Should you be using a FIELDSET?' ;
225261}
226262
227- fieldset * : not (legend ): first-child : after {
263+ fieldset > * : not (legend ): first-child : after {
228264 background : # 88FF88 ;
229265 content : 'Should your FIELDSET be using a LEGEND?' ;
230266}
@@ -234,6 +270,34 @@ iframe:not([title]):after {
234270 content : 'IFRAME lacks TITLE attribute.' ;
235271}
236272
273+ * [class ^= "1" ]: after ,
274+ * [class ^= "2" ]: after ,
275+ * [class ^= "3" ]: after ,
276+ * [class ^= "4" ]: after ,
277+ * [class ^= "5" ]: after ,
278+ * [class ^= "6" ]: after ,
279+ * [class ^= "7" ]: after ,
280+ * [class ^= "8" ]: after ,
281+ * [class ^= "9" ]: after ,
282+ * [class ^= "0" ]: after {
283+ background : # FFFF88 ;
284+ content : 'Class name cannot start with number.' ;
285+ }
286+
287+ * [id ^= "1" ]: after ,
288+ * [id ^= "2" ]: after ,
289+ * [id ^= "3" ]: after ,
290+ * [id ^= "4" ]: after ,
291+ * [id ^= "5" ]: after ,
292+ * [id ^= "6" ]: after ,
293+ * [id ^= "7" ]: after ,
294+ * [id ^= "8" ]: after ,
295+ * [id ^= "9" ]: after ,
296+ * [id ^= "0" ]: after {
297+ background : # FFFF88 ;
298+ content : 'ID cannot start with number.' ;
299+ }
300+
237301center : after ,
238302u : after ,
239303font : after {
@@ -247,6 +311,16 @@ map:after {
247311 content : 'Is MAP appropriate here?' ;
248312}
249313
314+ br + * : not (br ): before {
315+ background : # 88FF88 ;
316+ content : 'Is BR appropriate here?' ;
317+ }
318+
319+ br + br + * : before {
320+ background : # 88FF88 ;
321+ content : 'Should you be using a P tag?' ;
322+ }
323+
250324b : after ,
251325i : after {
252326 background : # 88FF88 ;
@@ -267,19 +341,10 @@ marquee:after {
267341 element so it's easy to spot. Use outline instead of border to avoid
268342 messing with the document flow.
269343*/
270-
271- table : not ([summary ]),
272- table th : not ([scope ]),
273- table thead td ,
274- table > tr : first-child : last-child ,
275- table > tbody > tr : first-child : last-child ,
276- table > tbody : first-child ,
277- form > * : not (fieldset ),
278- fieldset * : not (legend ): first-child ,
279- map ,
280- b ,
281- i {
282- outline : 5px solid # 88FF88 ;
344+ img : not ([src ]),
345+ img [src = "" ],
346+ img [src = "#" ] {
347+ outline : 5px solid # FF8888 ;
283348}
284349
285350table > tr ,
@@ -290,7 +355,9 @@ table[bgcolor],
290355table [border ],
291356table [cellpadding ],
292357table [cellspacing ],
293- table [width ],
358+ * [width ],
359+ * [height ],
360+ * [border ],
294361img : not ([alt ]),
295362a : not ([href ]),
296363a [href = "#" ],
@@ -307,8 +374,8 @@ h3 div,
307374h4 div ,
308375h5 div ,
309376h6 div ,
310- a div ,
311377span div ,
378+ html [xmlns ] a div ,
312379html [xmlns ] a h1 ,
313380html [xmlns ] a h2 ,
314381html [xmlns ] a h3 ,
@@ -319,10 +386,62 @@ ol > *:not(li),
319386ul > * : not (li ),
320387dl > * : not (dt ): not (dd ),
321388iframe : not ([title ]),
389+ * [class ^= "1" ],
390+ * [class ^= "2" ],
391+ * [class ^= "3" ],
392+ * [class ^= "4" ],
393+ * [class ^= "5" ],
394+ * [class ^= "6" ],
395+ * [class ^= "7" ],
396+ * [class ^= "8" ],
397+ * [class ^= "9" ],
398+ * [class ^= "0" ],
399+ * [id ^= "1" ],
400+ * [id ^= "2" ],
401+ * [id ^= "3" ],
402+ * [id ^= "4" ],
403+ * [id ^= "5" ],
404+ * [id ^= "6" ],
405+ * [id ^= "7" ],
406+ * [id ^= "8" ],
407+ * [id ^= "9" ],
408+ * [id ^= "0" ],
322409center ,
323410u ,
324411font ,
325412blink ,
326413marquee {
327414 outline : 5px solid # FFFF88 ;
415+ }
416+
417+ table : not ([summary ]),
418+ table th : not ([scope ]),
419+ table thead td ,
420+ table > tr : first-child : last-child ,
421+ table > tbody > tr : first-child : last-child ,
422+ table > tbody : first-child ,
423+ form > * : not (fieldset ),
424+ fieldset > * : not (legend ): first-child ,
425+ map ,
426+ br ,
427+ b ,
428+ i {
429+ outline : 5px solid # 88FF88 ;
430+ }
431+
432+ /*********/
433+ /* EXTRA */
434+ /*********/
435+
436+ /* Stuff that helps in developing / debugging, but don't quite fit anywhere
437+ else.
438+ */
439+
440+ body > img : only-child {
441+ background-image : url (data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAgMAAAAOFJJnAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAlQTFRF/+Pj2tra2dnZ4Z9gVgAAAHxJREFUGBkFwUGKxDAQBDB9shqcuw2T/3TAc5+A95UruZv+IoNqvEWCavLFDB2M5vPgGpyFNOcB80cPJMxgHhLkQ4IxuBorpDA3Y+MazEfC2+gwgnOxHnSogb15F1JcGxmkcBb1AwlVqCIHadZGwt+NGmQhD1lIuB+scOUfnCk3BP0u5SsAAAAASUVORK5CYII=);
442+ border : 50px solid rgba (0 , 0 , 0 , 0.08 );
443+ box-shadow : 0 0 10px rgba (0 , 0 , 0 , 0.3 );
444+ display : block;
445+ margin : 1em auto;
446+ padding : 0 ;
328447}
0 commit comments