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