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