Skip to content

Commit 8fd1dd1

Browse files
committed
Bring to parity with yahoo branch
1 parent b4e8702 commit 8fd1dd1

1 file changed

Lines changed: 148 additions & 29 deletions

File tree

‎debugCSS.css‎

Lines changed: 148 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,21 @@ table th:not([scope]):after,
3737
table thead td:after,
3838
table > tbody:first-child:after,
3939
table > 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,
4242
table > *:not(thead):not(tfoot):not(tbody):not(tr):not(colgroup):not(caption):after,
4343
table[align]:after,
4444
table[bgcolor]:after,
4545
table[border]:after,
4646
table[cellpadding]:after,
4747
table[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,
4951
img:not([alt]):after,
52+
img:not([src]):after,
53+
img[src=""]:after,
54+
img[src="#"]:after,
5055
a:not([href]):after,
5156
a[href="#"]:after,
5257
a[href*=javascript\:]:after,
@@ -62,24 +67,46 @@ h3 div:after,
6267
h4 div:after,
6368
h5 div:after,
6469
h6 div:after,
65-
a div:after,
6670
span 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,
6873
html[xmlns] a h2:after,
6974
html[xmlns] a h3:after,
7075
html[xmlns] a h4:after,
7176
html[xmlns] a h5:after,
7277
html[xmlns] a h6:after,
73-
ol > *:not(li),
74-
ul > *:not(li),
78+
ol > *:not(li):after,
79+
ul > *:not(li):after,
7580
dl > *:not(dt):not(dd):after,
7681
form > *:not(fieldset):after,
77-
fieldset *:not(legend):first-child:after,
82+
fieldset > *:not(legend):first-child:after,
7883
iframe: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,
79104
center:after,
80105
u:after,
81106
font:after,
82107
map:after,
108+
br + *:not(br):before,
109+
br + br + *:before,
83110
b:after,
84111
i:after,
85112
blink:after,
@@ -117,7 +144,7 @@ table > tr:after {
117144

118145
table 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

123150
table 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,
151178
table[border]:after,
152179
table[cellpadding]:after,
153180
table[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+
164200
a[href="#"]:after,
165201
a:not([href]):after {
166202
background: #FFFF88;
@@ -196,8 +232,8 @@ h3 div:after,
196232
h4 div:after,
197233
h5 div:after,
198234
h6 div:after,
199-
a div:after,
200235
span div:after,
236+
html[xmlns] a div:after,
201237
html[xmlns] a h1:after,
202238
html[xmlns] a h2:after,
203239
html[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+
237301
center:after,
238302
u:after,
239303
font: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+
250324
b:after,
251325
i: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

285350
table > tr,
@@ -290,7 +355,9 @@ table[bgcolor],
290355
table[border],
291356
table[cellpadding],
292357
table[cellspacing],
293-
table[width],
358+
*[width],
359+
*[height],
360+
*[border],
294361
img:not([alt]),
295362
a:not([href]),
296363
a[href="#"],
@@ -307,8 +374,8 @@ h3 div,
307374
h4 div,
308375
h5 div,
309376
h6 div,
310-
a div,
311377
span div,
378+
html[xmlns] a div,
312379
html[xmlns] a h1,
313380
html[xmlns] a h2,
314381
html[xmlns] a h3,
@@ -319,10 +386,62 @@ ol > *:not(li),
319386
ul > *:not(li),
320387
dl > *:not(dt):not(dd),
321388
iframe: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"],
322409
center,
323410
u,
324411
font,
325412
blink,
326413
marquee {
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

Comments
 (0)