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