sample: delineate preformatted block
[sheet.git] / base.css
1 /* general */
2
3 body {
4         background: #FFF;
5         color: #000;
6         font-size: 90%;
7         text-align: center;
8 }
9 a, a:visited {
10         color: #000;
11         text-decoration: underline;
12 }
13 a:active, a:hover {
14         color: #00F;
15         text-decoration: none;
16 }
17
18 /* common sections */
19
20 h1, h2 {
21         font-size: 200%;
22         margin: 0;
23 }
24 h2, caption {
25         font-size: 110%;
26         font-weight: bold;
27 }
28 caption {
29         margin: 1ex;
30 }
31 caption aside {
32         position: absolute;
33         margin-left: 1ex;
34         font-weight: normal;
35         display: inline;
36 }
37
38 hr {
39         clear: both;
40         visibility: hidden;
41         height: 2ex;
42         margin: 0;
43 }
44
45 .section ul {
46         margin-bottom: 1ex;
47 }
48 .section h2 {
49         margin: 0 1ex;
50         clear: both;
51 }
52 .section table {
53         float: left;
54         position: relative; /* prevents buggy hovering in table if caption present in gecko */
55         margin: 1ex 1ex 2ex;
56 }
57 .section .section {
58         float: left;
59 }
60 #charset .section table {
61         margin: -0.5ex 0 1ex; /* headers provide sufficient spacing already */
62 }
63
64 p {
65         margin: 1ex 0 1em;
66 }
67 p.aside {
68         font-size: 80%;
69 }
70 p.footer {
71         margin: 1em 0 0;
72         clear: both;
73 }
74 .help + .footer {
75         margin: 0;
76 }
77
78 .error {
79         background: #F00;
80         background: rgba(255, 0, 0, .8);
81         color: #FFF;
82         border: 2px solid #000;
83         border-width: 2px 0;
84         padding: 1em;
85         margin: 2ex auto;
86         clear: both;
87 }
88 .error > * {
89         margin-bottom: 1ex;
90 }
91 .error > *:last-child {
92         margin-bottom: 0;
93 }
94
95 ul {
96         margin: 0;
97         padding: 0;
98         list-style: none;
99 }
100
101 pre {
102         display: inline-block;
103         text-align: left;
104 }
105 #sample > pre {
106         width: 78ch;
107         padding: 0 1em;
108         border-width: 0 1px;
109         border-style: solid;
110 }
111
112 h2 small {
113         position: absolute; /* side note; do not influence alignment */
114         margin-left: 1em;
115 }
116
117 dl > dt {
118         float: left;
119         width: 50%;
120         text-align: right;
121 }
122 dl > dd {
123         text-align: left;
124         padding-left: 1em;
125         overflow: hidden;
126 }
127
128 /* "keyboard" (list of keys) */
129
130 #rows {margin-top: -5ex} /* top (esc) row fits besides header */
131 .row2 {margin-left: 7em} /* row offsets relative to ~6em key width */
132 .row3 {margin-left: 8em}
133 .row4 {margin-left: 10em} /* should actually align to next key on row0 */
134         /* ...however rows>=1 are shifted a bit, to make space */
135
136 table.keys tr {
137         clear: both; /* start new row (screen row) */
138         display: block;
139 }
140 table.keys tbody {
141         /* start new row block (keyboard row) */
142         clear: both;
143         padding-top: 1ex;
144         display: block;
145 }
146
147 table.keys th,
148 h3      {display: none} /* semantic details (non-css/js) */
149 .keys .mode {display: none} /* initially hidden (only show interactively (js)) */
150
151 table.keys {
152         display: block;
153         width: 82.5em; /*       12 * (2px + 1px + 6.2em + 1px + 2px) + 8em*/
154 //      padding-right: 72px;
155         border-spacing: 0;
156         border-collapse: collapse;
157 }
158 table.keys > * {
159         margin-right: -72px;
160 }
161
162 /* individual keys */
163
164 dl.legend dt,
165 .keys td {
166         float: left;
167         width: 6.2em;
168         line-height: 2.25ex; /* a little terser (seems to be gecko's default anyway) */
169         height: 4.5ex; /* 2 lines */
170         overflow: hidden;
171         margin: 0 2px -1px;
172         padding: 0;
173         text-align: center;
174         border: 1px solid #000;
175         border-radius: 4px;
176         -moz-border-radius: 4px;
177         text-transform-variation: text;
178 }
179 .keys td b {
180         float: left;
181         font-size: 200%;
182         line-height: 2.5ex; /* inherits otherwise */
183         padding-left: 2px;
184 }
185 .keys .row0 td { /* omni-present esc */
186         width: 8.5em;
187 }
188
189 /* fine tuning of special occurrences */
190
191 .keys td b[title] { /* mnemonic hover */
192         cursor: help;
193 }
194 .keys td[onclick]:hover { /* link */
195         cursor: pointer;
196 }
197 .keys td a { /* key link */
198         color: inherit;
199         text-decoration: none;
200         display: block;
201         height: 100%;
202 }
203
204 .keys .meta td b,
205 .keys .ctrl td b,
206 .keys .lead td b { /* char with ctrl or leading key */
207         font-size: 100%; /* space is too limited for 2+ double-sized chars */
208         line-height: 5ex; /* keep double height though */
209 }
210 .keys .meta td b small,
211 .keys .ctrl td b small { /* meta key indicator */
212         font-size: 70%;
213         font-weight: normal; /* nice and subtle */
214 }
215
216 /* tables */
217
218 table {
219         border-collapse: collapse;
220 }
221 th, td {
222         border-color: #778;
223         border: 1px solid #888;
224         background: #DDD;
225 }
226 thead th, td {
227         text-align: center;
228 }
229
230 td.joind {
231         border-bottom: none;
232 }
233 td.joinu {
234         /* first cell determines border width for entire row */
235         border-top-color: transparent;
236 }
237 td.joinr {
238         border-right: none;
239 }
240 td.joinl {
241         border-left: none;
242 }
243
244 /* character table */
245
246 .glyphs thead th, .glyphs td {
247         width: 1.6em; /* regular interval */
248 }
249 .glyphs tbody td {
250         font-size: 112%;
251 }
252 .glyphs.big tbody td {
253         font-size: 200%;
254 }
255 .glyphs .glyphs {
256         margin: 0.5ex 0; /* nested in legend */
257 }
258 .glyphs .glyphs td {
259         font-size: 100%;
260 }
261
262 .cover td {
263         min-width: 2.5ex; /* square cells */
264 }
265
266 /* table headers */
267
268 th,
269 tfoot td,
270 thead td {
271         border-width: 0;
272         background: transparent;
273 }
274 .glyphs thead td {
275         width: auto; /* no glyph cells in header */
276 }
277 th {
278         padding: 0 0.2em;
279 }
280 .diinfo th {
281         font-size: 50%; /* mostly insignificant here */
282         font-weight: normal;
283 }
284 .diinfo tbody th {
285         text-align: right; /* variable width so keep near cells */
286         padding: 0 0.5em;
287 }
288 .cat {
289         font-size: 70%;
290         text-transform: uppercase;
291 }
292 tfoot .cat th {
293         border-top: 1px solid #888;
294 }
295
296 /* colour map */
297
298 table.color td {
299         border: 1px solid #555;
300         font-weight: normal;
301         padding: 0 8px;
302 }
303 table.color td samp {
304         margin: 0 -8px 0 8px;
305         font-family: inherit;
306         float: right;
307 }
308 table.color td samp ~ samp {
309 }
310 table.color td samp small {
311         font: 100% monospace;
312         padding: 0 .5ex;
313 }
314
315 /* digraphs map */
316
317 table.dimap {
318         table-layout: fixed; /* prevent resizing, notably in msie6 */
319 }
320 .dimap thead th, .dimap td {
321         /* below-maximum size (but still average enough to be regular) so we can fit more */
322         width: 1.2em; /* msie only looks at the first row */
323         min-width: 1em; /* prevents gecko from restricting to page width */
324 }
325 .dimap th {
326         text-align: center; /* row headers are also glyph-sized */
327 }
328
329 .mapped tbody, .mapped colgroup,
330 .dimap tbody, .dimap colgroup {
331         border: 2px double #888; /* major character group grid */
332 }
333 .mapped tbody,
334 .dimap tbody {
335         border-width: 2px 0; /* horizontal group dividers */
336 }
337 .mapped colgroup,
338 .dimap colgroup {
339         border-width: 0 2px; /* vertical divides */
340 }
341
342 /* digraph selection */
343
344 .diinfo {
345         -moz-column-width: 24em;
346         -webkit-column-width: 24em;
347         column-width: 24em;
348 }
349 .diinfo > div {
350         overflow: hidden;
351         column-break-inside: avoid;
352         -webkit-column-break-inside: avoid;
353         position: relative; z-index: 1; /* webkit bug */
354 }
355
356 /* glyph cell overlay (digraph labels) */
357
358 .glyphs.dilabel td {
359         padding: 0;
360         padding-bottom: 1.1ex; /* reserve space for label */
361         vertical-align: bottom;
362 }
363 .glyphs.dilabel small {
364         font-size: 50%;
365         display: block;
366         margin-top: 0.2ex;
367         margin-bottom: -2.2ex; /* take cell padding */
368 }
369 .glyphs.dilabel small.digraph {
370         background: #000;
371         color: #FFF;
372         opacity: 0.3;
373 }
374 .glyphs.dilabel small.value {
375         background: #600;
376         color: #FFF;
377         opacity: 0.3;
378 }
379
380 /* character properties */
381
382 .X  {background: #FFF} /* unidentified */
383 .Mc, .Me, .Zl, .Zp      {background: #F00} /* unstyled */
384 .X > span               {background: #898; background: rgba(0, 0, 0, .25)} /* invisible contents */
385
386 /* letter scripts */
387 .Armenian,
388 .Greek    {background: #FFE8CF}
389 .Cyrillic {background: #FFDDA8}
390 .Latin    {background: #FFB}
391 .Aramaic,
392 .Hebrew   {background: #FFD}
393 .Arabic   {background: #EFE}
394 .African  {background: #DED}
395 .Brahmic  {background: #FBB} /* same as number */
396 .Khmer    {background: #FBA}
397 .Hangul,
398 .Syllabic {background: #DEA}
399 .Katakana {background: #DFA}
400 .Hiragana {background: #DFC}
401 .Bopomofo {background: #BFC}
402 .Han      {background: #CFD}
403 .Alpha    {background: #ADA} /* other scripts */
404
405 /* other categories */
406 .Nd, .Nl, .No         {background: #FDD} /* number */
407 .Sc                   {background: #FCD} /* currency */
408 .Sm                   {background: #ECE} /* math */
409 .So                   {background: #DCF} /* symbol */
410 .Pd, .Po, .Pc         {background: #CDF} /* punctuation */
411 .Ps, .Pe, .Pi, .Pf    {background: #BEF} /* quote */
412 .Lm, .Sk              {background: #CEE} /* spacing modifier */
413 .Mn                   {background: #ACC} /* modifier */
414 .Cc, .Cf {color: #666; background: #BBB} /* control */
415 .Zs                   {background: #ACB} /* space */
416 .Co, .Xi.Co           {background: #DCC} /* private */
417 .Xi, .Cs              {background: #CCC} /* invalid */
418 .Xd                   {color: #844} /* deprecated */
419 .Xr                   {color: #888} /* reserved (digraph reverse or proposal) */
420 .dimap .Xr            {background: #EEE} /* reversed digraph */
421 .ccmap .Xr {opacity:.4}
422
423 /* support levels */
424 .l1 {background: #FDD} /* no, unsupported, other */
425 .l2 {background: #FED} /* partial, restricted, unofficial */
426         /* default u-prop, u-bmp */
427 .l3 {background: #FFD} /* almost, imperfect, common */
428         /* default u-di, u-lat1 */
429 .l4 {background: #EFD} /* yes, supported, ubiquitous, native */
430         /* default u-ascii */
431 .l5 {background: #DFD} /* complete, perfect */
432 .l0 {background: #EEE} /* unknown, omitted */
433 .ex {     color: #888; color: rgba(0, 0, 0, .5)} /* experimental, disfavoured */
434 .u-invalid {background: #BBB} /* invalid, impossible */
435
436 /* foreground representation */
437 #digraphs .u-l3 {color: #080} /* partial */
438 #digraphs .u-l3.ex {color: #4C0} /* experimental */
439 #digraphs .u-l2 {color: #A44; color: rgba(128, 0, 0, .6)} /* unofficial proposal */
440 #digraphs .u-l1 {color: #D00; color: rgba(255, 0, 0, .8)} /* minimal or invalid */
441
442 /* support percentage (browser cells) */
443 .p0         {opacity: .6}
444 .p0.p       {opacity: 1}
445 .p::after   {content: '!'; color: #F00}
446 .p4::after  {color: #C00}
447 .p3::after  {color: #A00}
448 .p2::after  {color: #800}
449 .p1::after,
450 .p0::after  {color: #000}
451 .p09::after {opacity: .9}
452 .p08::after {opacity: .8}
453 .p07::after {opacity: .7}
454 .p06::after {opacity: .6}
455 .p05::after {opacity: .5}
456 .p04::after {opacity: .4}
457 .p03::after {opacity: .3}
458 .p02::after {opacity: .2}
459 .p01::after {opacity: .1}
460 .p00::after {display: none}
461
462 /* code syntax */
463 .sy-comment    { color: #888 }
464 .sy-constant   { color: #008 }
465 .sy-type,
466 .sy-identifier { color: #804 }
467 .sy-statement  { }
468 .sy-preProc    { }
469 .sy-special    { color: #408 }
470 .sy-error      { font-weight: bold; background-color: #F00; color: #FFF }
471 .sy-todo       { background-color: #FF0 }
472
473 /* boolean alternate */
474 .glyphs b      { font-weight: normal; color: #800 }
475
476 /* hover effects */
477 .X:hover {cursor: help}
478 .X:hover > span                            {background: #FFF} /* whitespace marker */
479 .Greek:hover, .Armenian:hover              {background: #FA8}
480 .Cyrillic:hover                            {background: #FB7}
481 .Latin:hover                               {background: #EE4}
482 .Hebrew:hover, .Aramaic:hover              {background: #FFA}
483 .Arabic:hover                              {background: #CFD}
484 .African:hover                             {background: #BDB}
485 .Syllabic:hover, .Hangul:hover             {background: #CE6}
486 .Katakana:hover                            {background: #BF7}
487 .Hiragana:hover                            {background: #AF8}
488 .Bopomofo:hover                            {background: #8FA}
489 .Brahmic:hover                             {background: #F77}
490 .Khmer:hover                               {background: #F87}
491 .Han:hover                                 {background: #5EB}
492 .Alpha:hover                               {background: #5C5}
493 .Nd:hover, .Nl:hover, .No:hover            {background: #F99} /* number */
494 .Sc:hover                                  {background: #F8C} /* currency */
495 .Sm:hover                                  {background: #F8F} /* math */
496 .So:hover                                  {background: #A8F} /* symbol */
497 .Pd:hover, .Po:hover, .Pc:hover            {background: #8AF} /* punctuation */
498 .Ps:hover, .Pe:hover, .Pi:hover, .Pf:hover {background: #8DF} /* quote */
499 .Lm:hover, .Sk:hover                       {background: #BFF} /* spacing modifier */
500 .Mn:hover                                  {background: #CDE} /* modifier */
501 .Zs:hover                                  {background: #CED} /* space */
502 .Cc:hover, .Cf:hover                       {background: #DDD} /* control */
503 .Co:hover                                  {background: #A77} /* private */
504 .Xr:hover                                  {background: #FFF} /* reserved */
505 .Xi:hover                                  {background: #DDD} /* invalid */
506 .l0:hover                                  {background: #888}
507 .l1:hover                                  {background: #F88}
508 .l2:hover                                  {background: #FC8}
509 .l3:hover                                  {background: #FF8}
510 .l4:hover                                  {background: #CF8}
511 .l5:hover                                  {background: #8F8}
512 .u-l3:hover    {outline: 1px solid #080}
513 .u-l3.ex:hover {outline: 1px solid #8F0}
514 .u-l2:hover    {outline: 1px solid #800}
515 .u-l1:hover    {outline: 1px solid #F00}
516
517 /* key type colorization */
518
519 .c-sa,
520 .g1 {background: #BFE} /* cyan: info */
521 .c-na,
522 .g2 {background: #BFB} /* green: motion */
523 .g3 {background: #DFA} /* greenish: jump (g2+) */
524 .c-af,
525 .g4 {background: #FFA} /* yellow: command */
526 .c-eu,
527 .g5 {background: #FDA} /* orangish: open (g6-) */
528 .g6 {background: #FCA} /* orange: insert */
529 .c-as,
530 .g7 {background: #FCC} /* red: mode */
531 .c-an,
532 .g8 {background: #ECE} /* purple: visual (g7+) */
533 .c-oc,
534 .g9 {background: #CCF} /* blue: prefix */
535
536 .c-sa:hover,
537 .g1 a:hover, .g1[onclick]:hover {background: #5ED}
538 .c-na:hover,
539 .g2 a:hover, .g2[onclick]:hover {background: #7E7}
540 .g3 a:hover, .g3[onclick]:hover {background: #CE6}
541 .c-af:hover,
542 .g4 a:hover, .g4[onclick]:hover {background: #EE4}
543 .c-eu:hover,
544 .g5 a:hover, .g5[onclick]:hover {background: #FA6}
545 .g6 a:hover, .g6[onclick]:hover {background: #F97}
546 .c-as:hover,
547 .g7 a:hover, .g7[onclick]:hover {background: #F88}
548 .c-an:hover,
549 .g8 a:hover, .g8[onclick]:hover {background: #D9D}
550 .c-oc:hover,
551 .g9 a:hover, .g9[onclick]:hover {background: #99F}
552
553 .no {
554         background: #EEE; /* unassigned */
555 }
556 .keys td.ni {
557         border: 0;
558         padding: 1px; /* same size as borderlessless keys */
559         background: none;
560 }
561
562 dl.legend dt.more,
563 .keys td.more b {
564         text-shadow: #F20 0 0 0.1em;
565 }
566 dl.legend dt.more:hover,
567 .keys td.more:hover b {
568         text-shadow: #F20 0 0 0.5em, #FC0 0 0 0.2em;
569 }
570 dl.legend dt.ext,
571 .keys td.ext {
572         border-style: dashed;
573 }
574 dl.legend dt.new,
575 .keys td.new {
576         opacity: .6;
577 }
578
579 /* l/r help columns */
580
581 .help {
582         display: table;
583         width: 100%;
584 }
585 .help > * {
586         display: table-cell;
587         width: 20%;
588         vertical-align: top;
589 }
590
591 .left dl.legend {
592         margin-left: 6.4em; /* a bit over 6.2em to allow for borders+padding (border-sizing would work too) */
593 }
594 .left dl.legend dt {
595         margin-left: -6.4em; /* msie<=6 multiply this by two for some reason */
596         float: left;
597         clear: left;
598 }
599 .left dl.legend dd {
600         float: left; /* align next to dt (except msie<=7 does just the opposite) */
601 }
602 .right dl.legend {
603         margin-right: 6.4em;
604 }
605 .right dl.legend dt {
606         margin-right: -6.4em;
607         float: right;
608         clear: right;
609 }
610 .right dl.legend dd {
611         float: right;
612 }
613 .right {
614         text-align: right;
615 }
616
617 /* help/legend */
618
619 dl.legend dt {
620         margin: 0 0 1px; /* distinct keys */
621         height: auto; /* not key-height */
622         padding: 2px 0;
623 }
624 dl.legend dd {
625         margin: 3px 0.4em 0; /* align text (add dt border+padding height) */
626         padding: 0;
627 }
628
629 dl.legend-options dt {
630         background: #CCC;
631 }
632
633 ul.legend-set {
634         clear: right;
635         padding-top: 1ex;
636 }
637 ul.legend-set li {
638         margin: 6px 0; /* similar to dl legends */
639 }
640
641 .legend {
642         margin-top: 1em;
643 }
644 .legend table {
645         width: 100%;
646 }
647 .legend td {
648         padding: 0 0.2em;
649 }
650
651 /* page-specific */
652
653 #browser td > a {
654         text-decoration: none;
655 }
656 #browser td > a:active,
657 #browser td > a:hover {
658         text-decoration: underline;
659 }
660 #browser tr .aside {
661         font-size: 80%;
662         overflow: hidden;
663         height: 0;
664         -webkit-transition: all 1s ease-in;
665         -o-transition: all 1s ease-in;
666         -moz-transition: all 1s ease-in;
667         transition: height 1s ease-in;
668 }
669 #browser tr .aside p {
670         margin: 1ex 0;
671 }
672 #browser tr.target .aside,
673 #browser tr:target .aside {
674         height: auto;
675 }
676 #browser td.X {
677         white-space: nowrap; /* some browsers break on dashes */
678 }
679
680 #browser tr:target > td:first-of-type,
681 #browser tr.focus > td:first-of-type {
682         background: inherit;
683 }
684 #browser tr.focus > td {
685         border-bottom-color: #000;
686 }
687
688 form.aside {
689         position: absolute;
690         top: 3ex;
691         right: 1em;
692 }
693
694 .family-name {
695         font-variant: small-caps;
696 }
697
698 #index nav {
699         columns: 3;
700         -moz-columns: 3;
701         -webkit-columns: 3;
702 }
703 nav > .section {
704         break-inside: avoid;
705         -webkit-column-break-inside: avoid; /* webkit */
706         page-break-inside: avoid; /* moz */
707 }
708 #index nav a {
709         display: inline-block;
710         margin-top: 1em;
711 }
712
713 /* printing hints */
714
715 @page {
716         size: landscape;
717         margin: 0;
718 }
719
720 @media print {
721         ul.legend-set {display: none} /* current options only relevant on dynamic media */
722 }
723