/[suikacvs]/test/html-webhacc/cc-style.css
Suika

Contents of /test/html-webhacc/cc-style.css

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.30 - (hide annotations) (download) (as text)
Sat Aug 16 07:42:20 2008 UTC (16 years, 3 months ago) by wakaba
Branch: MAIN
Changes since 1.29: +34 -30 lines
File MIME type: text/css
++ ChangeLog	16 Aug 2008 07:38:01 -0000
	* cc-script.js: Support for #index- fragment identifiers.

	* cc-style.css: Prety styling for reformatted sources.
	Support for new version of manifest dump sections.

	* error-description-source.xml: Support for Whatpm::CacheManifest,
	Whatpm::CSS::SelectorsParser, Whatpm::CSS::MediaQueryParser,
	and Whatpm::CSS::Parser errors.  Support for l10n of cache
	manifest dump sections.

2008-08-16  Wakaba  <wakaba@suika.fam.cx>

++ html/WebHACC/Language/ChangeLog	16 Aug 2008 07:42:17 -0000
	* CSS.pm, CacheManifest.pm, HTML.pm, XML.pm: Use ->url attribute to
	obtain the URL of the document.

	* CacheManifest.pm (generate_structure_dump_section): It is
	now i18n'ed.  In addition, since URLs are tend to be long,
	tables for fallback entries are replaced by |dd| entries and
	paragraphs.  "No entry" message is now handled by catalog,
	rather than CSS.

2008-08-16  Wakaba  <wakaba@suika.fam.cx>

++ html/WebHACC/ChangeLog	16 Aug 2008 07:39:54 -0000
	* Input.pm (Subdocument new): Invoke superclass's new method
	such that |urls| attribute is initialized.

	* Result.pm (add_error): Use ->url attribute to obtain
	the URL of the document.  No longer output |text| argument,
	since all error types except for those used in the WebIDL module
	are now defined in the catalog.

2008-08-16  Wakaba  <wakaba@suika.fam.cx>

1 wakaba 1.1 @import '/www/style/html/xoxo.css';
2    
3 wakaba 1.2 .section {
4     display: block;
5     margin: 1em;
6     border: #800080 1px solid;
7     padding: 0.5em 1em;
8     }
9    
10 wakaba 1.10 dt, strong, th {
11 wakaba 1.2 font-weight: bolder;
12     font-family: sans-serif;
13     }
14     dt:after {
15     content: ":";
16     }
17    
18 wakaba 1.5 h1 {
19     font-weight: bolder;
20     font-family: sans-serif;
21     font-size: 180%;
22     }
23    
24 wakaba 1.25 h2, h3, h4, h5, h6, th {
25 wakaba 1.5 font-weight: bolder;
26     font-family: sans-serif;
27     font-size: 100%;
28     background-color: #fff0f0;
29     color: black;
30     }
31    
32 wakaba 1.25 h2, h3, h4, h5, h6 {
33 wakaba 1.26 margin: 0 0 0 -1em;
34 wakaba 1.25 padding: 0.3em 1em;
35     }
36    
37 wakaba 1.27 .section[id$=transfer-errors] h2,
38     .section[id$=transfer-errors] h3,
39     .section[id$=transfer-errors] h4,
40     .section[id$=transfer-errors] h5,
41     .section[id$=transfer-errors] h6 {
42     padding-left: 40px;
43     background-image: url(icons/transfer-32);
44     background-repeat: no-repeat;
45     background-position: 6px center;
46     min-height: 32px;
47     }
48    
49     .section[id$=parse-errors] h2,
50     .section[id$=parse-errors] h3,
51     .section[id$=parse-errors] h4,
52     .section[id$=parse-errors] h5,
53     .section[id$=parse-errors] h6 {
54     padding-left: 40px;
55     background-image: url(icons/syntax-32);
56     background-repeat: no-repeat;
57     background-position: 6px center;
58     min-height: 32px;
59     }
60    
61     .section[id$=document-errors] h2,
62     .section[id$=document-errors] h3,
63     .section[id$=document-errors] h4,
64     .section[id$=document-errors] h5,
65     .section[id$=document-errors] h6 {
66     padding-left: 40px;
67     background-image: url(icons/structure-32);
68     background-repeat: no-repeat;
69     background-position: 6px center;
70     min-height: 32px;
71     }
72    
73 wakaba 1.2 .tree-text q, .tree-cdata q, .tree-comment q {
74     display: block;
75     }
76    
77     q:before, q:after {
78     content: "";
79     }
80    
81 wakaba 1.10
82 wakaba 1.1 #nav-items {
83     display: block;
84     position: fixed;
85     top: 0.5em;
86     right: 0.5em;
87     width: auto;
88     height: auto;
89     font-size: 90%;
90     background-color: #f4fff4;
91     color: black;
92     padding: 0;
93     line-height: 1.1;
94     }
95    
96     #nav-items li {
97     display: block;
98     list-style: none;
99     margin: 0;
100     border-style: none;
101     padding: 0;
102     text-align: center;
103     }
104    
105     #nav-items li a[href] {
106     display: block;
107     border-style: none;
108     color: inherit;
109     text-decoration: none;
110     }
111    
112 wakaba 1.22 body[data-scripted] #nav-items {
113     display: none;
114     }
115    
116 wakaba 1.3 img {
117     border-style: none;
118     }
119    
120 wakaba 1.4 code {
121     font-family: "Courier New", "Courier", monospace;
122     letter-spacing: 0.1em;
123     background-color: transparent;
124     color: orangered;
125 wakaba 1.7 white-space: -moz-pre-wrap;
126     white-space: pre-wrap;
127 wakaba 1.4 }
128    
129 wakaba 1.30 pre > code:empty:after {
130     content: " "; /* such that a line box is rendered */
131     }
132    
133 wakaba 1.13 .example {
134     background-color: #ececff;
135     }
136    
137     pre.example {
138     margin-left: 1em;
139     margin-right: 1em;
140     padding: 0.2em 0.5em;
141     }
142    
143     .example.bad {
144     background-color: #fff7f7;
145     }
146    
147     code.example.bad {
148     color: inherit;
149     background-color: #ffeeee;
150     }
151    
152     h3 code.example.bad {
153     color: orangered;
154     background-color: transparent;
155     }
156    
157     pre.example::before {
158     content: "Example";
159     display: block;
160     color: #b0b0ff;
161     background-color: transparent;
162     font-weight: bolder;
163     font-family: sans-serif;
164     }
165    
166     pre.example.html::before {
167     content: "HTML Example";
168     }
169    
170     pre.example.xml::before {
171     content: "XML Example";
172     }
173    
174     pre.example.manifest::before {
175     content: "Cache Manifest Example";
176     }
177    
178     pre.example.bad::before {
179     content: "Bad Example";
180     color: #ffc1c1;
181     }
182    
183     pre.example.bad.html::before {
184     content: "HTML Bad Example";
185     }
186    
187     pre.example.bad.xml::before {
188     content: "XML Bad Example";
189     }
190    
191     pre.example.bad.manifest::before {
192     content: "Cache Manifest Bad Example";
193     }
194    
195 wakaba 1.9 .rfc2119 {
196     border-style: none;
197     text-transform: lowercase;
198     font-variant: small-caps;
199     font-style: normal;
200     text-decoration: none;
201     font-weight: normal;
202     font-family: sans-serif;
203     }
204    
205    
206 wakaba 1.11 /* dl.switch from WHATWG specification style sheet */
207    
208     dl.switch {
209     padding-left: 2em;
210     }
211    
212     dl.switch dt {
213     display: block;
214     text-indent: -1.5em;
215     font-weight: bolder;
216     font-family: sans-serif;
217     font-style: normal;
218     }
219    
220     dl.switch dt:before {
221     content: '\21AA';
222     padding: 0 0.5em 0 0;
223     display: inline-block;
224     width: 1em;
225     text-align: right;
226     line-height: 0.5em;
227     }
228    
229     dl.switch dt:after {
230     content: " :";
231     }
232    
233 wakaba 1.19 mark {
234     background-color: #ffff4d;
235     }
236    
237 wakaba 1.22 /* Tab navigation */
238    
239 wakaba 1.29 body[data-scripted] {
240     min-width: 400px; /* body > nav's left is 300px */
241     /* min-height is set to .section */
242     }
243    
244 wakaba 1.23 body[data-scripted] > h1,
245 wakaba 1.24 body[data-scripted] > #input > h2,
246     body[data-scripted] .section.subdoc > h2,
247     body[data-scripted] .section.subdoc > h3,
248     body[data-scripted] .section.subdoc > h4,
249     body[data-scripted] .section.subdoc > h5,
250     body[data-scripted] .section.subdoc > h6 {
251 wakaba 1.22 font-size: 100%;
252 wakaba 1.23 margin: 0;
253 wakaba 1.29 padding: 0 17.5px; /* h1 > img's width is 265px */
254 wakaba 1.22 }
255    
256 wakaba 1.24 body[data-scripted] > #input > h2,
257     body[data-scripted] .section.subdoc > h2,
258     body[data-scripted] .section.subdoc > h3,
259     body[data-scripted] .section.subdoc > h4,
260     body[data-scripted] .section.subdoc > h5,
261     body[data-scripted] .section.subdoc > h6 {
262 wakaba 1.29 float: left;
263     margin: 0 0.5em 0 -1em;
264 wakaba 1.25 padding: 0.3em 1em;
265 wakaba 1.23 border: thin hidden;
266 wakaba 1.25 background-color: #fff0f0;
267     color: black;
268 wakaba 1.23 }
269    
270 wakaba 1.22 nav {
271     display: block;
272     }
273    
274 wakaba 1.23 .section nav {
275     margin-left: 1em;
276     }
277    
278 wakaba 1.22 nav ul {
279     margin: 0;
280     padding: 1em 0 0 0;
281     }
282    
283 wakaba 1.24 #input nav ul,
284     .section.subdoc nav ul {
285 wakaba 1.23 padding-top: 0;
286     }
287    
288 wakaba 1.22 nav ul li {
289     display: inline;
290     margin: 0;
291     padding: 0 0.3em 0 0;
292     line-height: 2;
293     }
294    
295     nav a {
296     display: inline;
297     padding: 0.1em 0.3em;
298     text-decoration: none;
299     color: inherit;
300     border: thin outset gray;
301     -moz-border-radius: 0.2em;
302     min-width: 4em;
303     text-align: center;
304     }
305    
306     nav [data-active] a {
307     border-style: inset;
308     background-color: #C0C0C0;
309     }
310    
311 wakaba 1.27 nav a[href$=transfer-errors] {
312     padding-left: 20px;
313     background-image: url(icons/transfer-16);
314     background-repeat: no-repeat;
315     background-position: 2px center;
316     min-height: 16px;
317     }
318    
319     nav a[href$=parse-errors] {
320     padding-left: 20px;
321     background-image: url(icons/syntax-16);
322     background-repeat: no-repeat;
323     background-position: 2px center;
324     min-height: 16px;
325     }
326    
327     nav a[href$=document-errors] {
328     padding-left: 20px;
329     background-image: url(icons/structure-16);
330     background-repeat: no-repeat;
331     background-position: 2px center;
332     min-height: 16px;
333     }
334    
335 wakaba 1.22 .section {
336     clear: both;
337     }
338    
339 wakaba 1.29 body > nav {
340     position: absolute;
341     top: 0;
342     height: 100px; /* h1 > img's height is 90px */
343     left: 300px; /* h1 > img's width is 265px */
344     right: 0;
345     min-width: 100px; /* body's min-width is 400px */
346     overflow: auto;
347     }
348    
349     .section > nav {
350     /*
351     height: 2em;
352     max-height: 2em; *//* hn's line + padding-top + padding-bottom = 1.6em */
353     overflow: auto;
354     min-width: 5em;
355    
356     position: relative;
357     z-index: 1000; /* such that scrollbars are clickable */
358     white-space: nowrap; /* Firefox does not show vertical scrollbar,
359     because there is a floated hn element... */
360     }
361    
362 wakaba 1.23 body[data-scripted] > .section,
363 wakaba 1.24 body[data-scripted] > #input > .section,
364     body[data-scripted] .section.subdoc > .section {
365 wakaba 1.22 position: absolute;
366 wakaba 1.23 top: 100px; /* h1 > img's height is 90px */
367 wakaba 1.22 bottom: 0;
368     left: 0;
369     right: 0;
370 wakaba 1.23 min-height: 10em;
371 wakaba 1.22 overflow: auto;
372     }
373    
374 wakaba 1.24 body[data-scripted] > #input > .section,
375     body[data-scripted] .section.subdoc > .section {
376 wakaba 1.23 top: 2em;
377     }
378    
379     /* details widgets */
380    
381     .details .legend {
382     font-weight: bolder;
383     }
384    
385     .details .legend:after {
386     content: "...";
387     }
388    
389     .details.open .legend:after,
390     body:not([data-scripted]) .details.default .legend:after {
391     content: ":";
392     }
393    
394     body[data-scripted] .details .legend {
395     cursor: pointer;
396     }
397    
398     body[data-scripted] .details > div {
399     display: none;
400     }
401    
402     /* Data input forms */
403    
404     input[type=url] {
405     width: 90%;
406     min-width: 30em;
407     }
408    
409     textarea {
410     width: 95%;
411     min-width: 30em;
412     height: 20em;
413     }
414    
415 wakaba 1.30 /* Source codes taken from the input document or reformatted source */
416 wakaba 1.25
417 wakaba 1.30 /* q, */ .source li, .dump pre {
418 wakaba 1.25 white-space: pre;
419     white-space: -moz-pre-wrap;
420     white-space: pre-wrap;
421     }
422    
423 wakaba 1.30 q, .source ol, .dump pre {
424 wakaba 1.25 background-color: #f0f0ff;
425     color: black;
426     line-height: 1.5;
427     }
428    
429 wakaba 1.30 .dump pre > code {
430     color: inherit;
431     background-color: transparent;
432     }
433    
434 wakaba 1.25 /* Document dumps */
435    
436     .dump > ol {
437     margin-left: 0;
438     padding-left: 0;
439     }
440    
441     .dump > ol > li {
442     /* display: block;
443     list-style: none;
444     margin-left: 0;
445     padding-left: 0; */
446     }
447    
448     .dump > ol /* ol */ {
449     margin-left: 1em;
450     padding-left: 0;
451     }
452    
453     .dump ol /*ol*/ li {
454     margin-left: 0;
455     padding-left: 0.4em;
456     }
457    
458     .dump ul.attributes {
459     margin-left: 3em;
460     padding: 0;
461     }
462    
463     .dump ul.attributes li {
464     display: inline;
465     list-style: none;
466     margin: 0 2em 0 0;
467     padding: 0;
468     text-indent: 0;
469     font-size: 90%;
470     }
471    
472     q:after {
473     content: " "; /* Make white-space-only quotations visible */
474     white-space: pre;
475     }
476    
477 wakaba 1.30 dd.no-entry:lang(en) {
478     font-style: italic;
479     }
480    
481     dd.manifest-fallbacks + dd.manifest-fallbacks {
482     margin-top: 1em;
483     }
484    
485     dd.manifest-fallbacks p {
486     margin: 0;
487     text-indent: 0;
488     }
489    
490     dd.manifest-fallbacks > p + p {
491     text-indent: -1em;
492     }
493    
494     dd.manifest-fallbacks > p + p:before {
495     content: "\21B3 ";
496     }
497    
498 wakaba 1.25 /* Errors */
499    
500     .errors dt {
501     background-image: none;
502     background-position: left center;
503     background-repeat: no-repeat;
504     padding-left: 20px; /* icons/*-16.png */
505     min-height: 16px;
506     }
507    
508     .errors dd {
509     margin-left: 0;
510     padding-left: 60px;
511     min-height: 32px; /* large-*.png files' height */
512     background-position: 20px center;
513     background-repeat: no-repeat;
514     }
515    
516     .level-m, .level-s {
517     background-image: url(large-stop);
518     /* TODO: we need an image for SHOULD-level errors */
519     }
520    
521     .level-w {
522     background-image: url(large-alert);
523     }
524    
525     .level-i {
526     background-image: url(large-info);
527     }
528    
529     .level-u {
530     background-image: none;
531     }
532    
533     dt.level-u {
534     margin: 0.2em 0 0 0;
535 wakaba 1.27 border: blue 0.2em solid;
536 wakaba 1.25 border-bottom-style: none;
537     padding-top: 0.2em;
538     padding-right: 0.2em;
539     padding-bottom: 0;
540 wakaba 1.27 background-color: #e1e1ff;
541     color: black;
542 wakaba 1.25 }
543    
544     dd.level-u {
545     margin: 0 0 0.2em;
546 wakaba 1.27 border: blue 0.2em solid;
547 wakaba 1.25 border-top-style: none;
548     padding-right: 0.2em;
549     padding-bottom: 0.2em;
550     padding-top: 0;
551 wakaba 1.27 background-color: #e1e1ff;
552     color: black;
553 wakaba 1.25 }
554    
555     dt.layer-transfer {
556     background-image: url(icons/transfer-16);
557     }
558    
559     dt.layer-encode,
560     dt.layer-charset {
561     background-image: url(icons/char-16);
562     /* TODO: We need different images for these layers */
563     }
564    
565     dt.layer-syntax {
566     background-image: url(icons/syntax-16);
567     }
568    
569     dt.layer-structure {
570     background-image: url(icons/structure-16);
571     }
572    
573     dt.layer-semantics {
574     background-image: url(icons/semantics-16);
575     }
576    
577 wakaba 1.27 .errors dl:empty {
578     display: none;
579     }
580    
581     .errors .no-errors {
582     text-indent: 0;
583     }
584    
585     .errors .no-errors:lang(en) {
586     font-style: italic;
587     }
588    
589 wakaba 1.25 /* List of IDs */
590    
591     #identifiers dd,
592     [id$="-identifiers"] dd {
593     margin-left: 20px;
594     padding-left: 20px;
595     min-height: 20px;
596     }
597    
598     #identifiers dd + dd,
599     [id$="-identifiers"] dd + dd {
600     background-image: url(error);
601     background-position: center left;
602     background-repeat: no-repeat;
603     }
604    
605 wakaba 1.26 /* Result paragraph */
606 wakaba 1.25
607 wakaba 1.26 .result-para {
608 wakaba 1.25 margin-left: 20px;
609     padding-left: 40px;
610     min-height: 32px;
611 wakaba 1.26 background-color: none;
612 wakaba 1.25 background-position: center left;
613     background-repeat: no-repeat;
614 wakaba 1.26 padding-top: 0.2em;
615     padding-bottom: 0.2em;
616     padding-right: 1em;
617     }
618    
619     .result-para.no-error {
620     background-image: url(ok);
621     background-color: #ddffdd;
622     color: black;
623 wakaba 1.25 }
624 wakaba 1.26
625     .result-para.must-errors,
626     .result-para.should-errors {
627 wakaba 1.25 background-image: url(large-stop);
628 wakaba 1.26 /* TODO: Use different image for should-errors */
629 wakaba 1.25 }
630    
631 wakaba 1.26 /* See "Result summary table" for background color of
632     .must-errors and .should-errors */
633    
634     .result-para.uncertain {
635 wakaba 1.27 border: blue 0.2em solid;
636 wakaba 1.26 background-color: #e1e1ff;
637     color: black;
638     background-image: none;
639 wakaba 1.25 }
640    
641 wakaba 1.26 /* Result summary table */
642 wakaba 1.25
643 wakaba 1.26 .result table {
644     margin-left: auto;
645     margin-right: auto;
646     border: 4px solid #800080;
647     border-collapse: collapse;
648 wakaba 1.25 }
649    
650 wakaba 1.26 .result tbody,
651     .result colgroup {
652     border: 4px solid #800080;
653 wakaba 1.25 }
654    
655 wakaba 1.26 .result tbody > tr:first-child > th {
656     border-bottom-width: 2px;
657 wakaba 1.25 }
658 wakaba 1.26
659     .result tr.total > * {
660     border-top-width: 2px;
661 wakaba 1.25 }
662    
663 wakaba 1.26 .result td.subrow {
664     border-right-width: 2px;
665 wakaba 1.25 }
666    
667 wakaba 1.26 .result th,
668     .result td.subrow,
669     .result .uncertain td.subrow {
670 wakaba 1.25 background-color: #fff0f0;
671     color: black;
672     }
673    
674 wakaba 1.26 .result th,
675     .result td {
676 wakaba 1.25 border: 1px solid #800080;
677     padding: 0.2em 0.5em;
678     text-align: center;
679     empty-cells: show;
680     }
681    
682 wakaba 1.26 .result td.subrow {
683     border-top-style: hidden;
684     }
685    
686     .result .uncertain td {
687 wakaba 1.25 background-color: #e1e1ff;
688     color: black;
689     }
690    
691 wakaba 1.26 .result .must-errors,
692     .result .uncertain .must-errors {
693 wakaba 1.25 background-color: #ffcece;
694     color: black;
695     }
696    
697 wakaba 1.26 .result .should-errors,
698     .result .uncertain .should-errors {
699 wakaba 1.25 background-color: #e1e1ff;
700     color: black;
701     }
702    
703 wakaba 1.26 .result tfoot .total strong {
704     font-size: 150%;
705     }
706    
707     .result thead > tr > th:first-child + th {
708     background-image: url(error);
709     background-repeat: no-repeat;
710     background-position: 2px center;
711     padding-left: 20px; /* error.png's width is 16px */
712     }
713    
714     .result thead > tr > th:first-child + th + th {
715     background-image: url(error); /* TODO: SHOULD image */
716     background-repeat: no-repeat;
717     background-position: 2px center;
718     padding-left: 20px; /* error.png's width is 16px */
719     }
720    
721     .result thead > tr > th:first-child + th + th + th {
722     background-image: url(alert);
723     background-repeat: no-repeat;
724     background-position: 2px center;
725     padding-left: 20px; /* alert.png's width is 16px */
726     }
727    
728     .result thead > tr > th:first-child + th + th + th + th {
729     background-image: url(info);
730     background-repeat: no-repeat;
731     background-position: 2px center;
732     padding-left: 20px; /* info.png's width is 16px */
733     }
734    
735     .result thead + tbody > tr:first-child + tr > th {
736     background-image: url(icons/transfer-16);
737     background-repeat: no-repeat;
738     background-position: 2px center;
739     padding-left: 20px; /* background-image's width is 16px */
740     }
741    
742     .result thead + tbody > tr:first-child + tr + tr > th {
743     background-image: url(icons/char-16); /* TODO: new image */
744     background-repeat: no-repeat;
745     background-position: 2px center;
746     padding-left: 20px; /* background-image's width is 16px */
747     }
748    
749     .result thead + tbody > tr:first-child + tr + tr + tr > th {
750     background-image: url(icons/char-16);
751     background-repeat: no-repeat;
752     background-position: 2px center;
753     padding-left: 20px; /* background-image's width is 16px */
754     }
755    
756     .result thead + tbody > tr:first-child + tr + tr + tr + tr > th {
757     background-image: url(icons/syntax-16);
758     background-repeat: no-repeat;
759     background-position: 2px center;
760     padding-left: 20px; /* background-image's width is 16px */
761 wakaba 1.25 }
762    
763 wakaba 1.26 .result thead + tbody > tr:first-child + tr + tr + tr + tr + tr > th {
764     background-image: url(icons/structure-16);
765     background-repeat: no-repeat;
766     background-position: 2px center;
767     padding-left: 20px; /* background-image's width is 16px */
768 wakaba 1.25 }
769    
770 wakaba 1.26 .result thead + tbody > tr:first-child + tr + tr + tr + tr + tr + tr > th {
771     background-image: url(icons/semantics-16);
772     background-repeat: no-repeat;
773     background-position: 2px center;
774     padding-left: 20px; /* background-image's width is 16px */
775     }
776 wakaba 1.25
777 wakaba 1.1 /*
778    
779 wakaba 1.19 Copyright 2007-2008 Wakaba <w@suika.fam.cx>.
780 wakaba 1.1
781     This library is free software; you can redistribute it
782     and/or modify it under the same terms as Perl itself.
783    
784 wakaba 1.30 $Date: 2008/08/15 17:51:03 $
785 wakaba 1.1
786     */

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24