font: save queried character numbers in include
[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 .row0 ul.keys 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         -webkit-column-width: 24em;
267         column-width: 24em;
268 }
269 .diinfo > div {
270         overflow: hidden;
271         column-break-inside: avoid;
272         -webkit-column-break-inside: avoid;
273         position: relative; z-index: 1; /* webkit bug */
274 }
275
276 /* glyph cell overlay (digraph labels) */
277
278 .glyphs.dilabel td {
279         padding: 0;
280         padding-bottom: 1.1ex; /* reserve space for label */
281         vertical-align: bottom;
282 }
283 .glyphs small {
284         font-size: 50%;
285         display: block;
286         margin-top: 0.2ex;
287         margin-bottom: -2.2ex; /* take cell padding */
288 }
289 .glyphs small.digraph {
290         background: #000;
291         color: #FFF;
292         opacity: 0.3;
293 }
294 .glyphs small.value {
295         background: #600;
296         color: #FFF;
297         opacity: 0.3;
298 }
299
300 /* character properties */
301
302 .X  {background: #FFF} /* unidentified */
303 #digraphs .Xa {color: #0A0} /* ascii */
304 #digraphs .Xl {color: #070} /* latin1 */
305 #digraphs .Xz {color: #D00} /* proposed */
306
307 .Lm, .Mc, .Me, .Zl, .Zp {background: #F00} /* unstyled */
308 .X > span               {background: #888} /* invisible contents */
309
310 /* letter scripts */
311 .Armenian,
312 .Greek    {background: #FFE8CF}
313 .Cyrillic {background: #FFDDA8}
314 .Latin    {background: #FFB}
315 .Aramaic,
316 .Hebrew   {background: #FFD}
317 .Arabic   {background: #EFE}
318 .African  {background: #DED}
319 .Brahmic  {background: #FBB} /* same as number */
320 .Khmer    {background: #FBA}
321 .Hangul,
322 .Syllabic {background: #DEA}
323 .Katakana {background: #DFA}
324 .Hiragana {background: #DFC}
325 .Bopomofo {background: #BFC}
326 .Han      {background: #CFD}
327 .Alpha    {background: #ADA} /* other scripts */
328
329 /* other categories */
330 .Nd, .Nl, .No         {background: #FDD} /* number */
331 .Sc                   {background: #FCD} /* currency */
332 .Sm                   {background: #ECE} /* math */
333 .So                   {background: #DCF} /* symbol */
334 .Pd, .Po, .Pc         {background: #CDF} /* punctuation */
335 .Ps, .Pe, .Pi, .Pf    {background: #BEF} /* quote */
336 .Lm, .Sk              {background: #CEE} /* spacing modifier */
337 .Mn                   {background: #ACC} /* modifier */
338 .Cc, .Cf {color: #666; background: #BBB} /* control */
339 .Zs                   {background: #ACB} /* space */
340 .Co                   {background: #DCC} /* private */
341 .Xi, .Cs              {background: #CCC} /* invalid */
342 .Xd                   {color: #844} /* deprecated */
343 .Xr                   {color: #888} /* reserved (digraph reverse or proposal) */
344 .dimap .Xr            {background: #EEE} /* reversed digraph */
345 .ccmap .Xr {opacity:.4}
346
347 /* support levels */
348 .l1 {background: #FDD} /* no, unsupported, other */
349 .l2 {background: #FED} /* partial, restricted, unofficial */
350         /* default u-prop, u-bmp */
351 .l3 {background: #FFD} /* almost, imperfect, common */
352         /* default u-di, u-lat1 */
353 .l4 {background: #EFD} /* yes, supported, ubiquitous, native */
354         /* default u-ascii */
355 .l5 {background: #DFD} /* complete, perfect */
356 .l0 {background: #EEE} /* unknown, omitted */
357 .ex {     color: #888} /* experimental, disfavoured */
358 .u-invalid {background: #BBB} /* invalid, impossible */
359
360 .p0         {opacity: .6}
361 .p0.p       {opacity: 1}
362 .p::after   {content: '!'; color: #F00}
363 .p4::after  {color: #C00}
364 .p3::after  {color: #A00}
365 .p2::after  {color: #800}
366 .p1::after,
367 .p0::after  {color: #000}
368 .p09::after {opacity: .9}
369 .p08::after {opacity: .8}
370 .p07::after {opacity: .7}
371 .p06::after {opacity: .6}
372 .p05::after {opacity: .5}
373 .p04::after {opacity: .4}
374 .p03::after {opacity: .3}
375 .p02::after {opacity: .2}
376 .p01::after {opacity: .1}
377 .p00::after {display: none}
378
379 /* code syntax */
380 .sy-comment    { color: #888 }
381 .sy-constant   { color: #008 }
382 .sy-type,
383 .sy-identifier { color: #804 }
384 .sy-statement  { }
385 .sy-preProc    { }
386 .sy-special    { color: #408 }
387 .sy-error      { font-weight: bold; background-color: #F00; color: #FFF }
388 .sy-todo       { background-color: #FF0 }
389
390 /* hover effects */
391 .u-di,
392 .X:hover {cursor: help}
393 .X:hover > span                            {background: #FFF} /* whitespace marker */
394 .Greek:hover, .Armenian:hover              {background: #FA8}
395 .Cyrillic:hover                            {background: #FB7}
396 .Latin:hover                               {background: #EE4}
397 .Hebrew:hover, .Aramaic:hover              {background: #FFA}
398 .Arabic:hover                              {background: #CFD}
399 .African:hover                             {background: #BDB}
400 .Syllabic:hover, .Hangul:hover             {background: #CE6}
401 .Katakana:hover                            {background: #BF7}
402 .Hiragana:hover                            {background: #AF8}
403 .Bopomofo:hover                            {background: #8FA}
404 .Brahmic:hover                             {background: #F77}
405 .Khmer:hover                               {background: #F87}
406 .Han:hover                                 {background: #5EB}
407 .Alpha:hover                               {background: #5C5}
408 .Nd:hover, .Nl:hover, .No:hover            {background: #F99} /* number */
409 .Sc:hover                                  {background: #F8C} /* currency */
410 .Sm:hover                                  {background: #F8F} /* math */
411 .So:hover                                  {background: #A8F} /* symbol */
412 .Pd:hover, .Po:hover, .Pc:hover            {background: #8AF} /* punctuation */
413 .Ps:hover, .Pe:hover, .Pi:hover, .Pf:hover {background: #8DF} /* quote */
414 .Lm:hover, .Sk:hover                       {background: #BFF} /* spacing modifier */
415 .Mn:hover                                  {background: #CDE} /* modifier */
416 .Zs:hover                                  {background: #CED} /* space */
417 .Cc:hover, .Cf:hover                       {background: #DDD} /* control */
418 .Co:hover                                  {background: #A77} /* private */
419 .Xr:hover                                  {background: #FFF} /* reserved */
420 .Xa:hover {outline: 1px solid #0F0} /* ascii */
421 .Xl:hover {outline: 1px solid #0C0} /* latin1 */
422 .Xz:hover {outline: 1px solid #F00} /* proposed */
423 .l0:hover                                  {background: #888}
424 .l1:hover                                  {background: #F88}
425 .l2:hover                                  {background: #FC8}
426 .l3:hover                                  {background: #FF8}
427 .l4:hover                                  {background: #CF8}
428 .l5:hover                                  {background: #8F8}
429
430 /* key type colorization */
431
432 .c-sa,
433 .ci,
434 .g0 {background: #BFE} /* cyan: info */
435 .c-na,
436 .pm,
437 .g1 {background: #BFB} /* green: motion */
438 .po,
439 .g2 {background: #DFA} /* greenish: jump (g1+) */
440 .c-af,
441 .co,
442 .g3 {background: #FFA} /* yellow: command */
443 .c-eu,
444 .cp,
445 .g4 {background: #FDA} /* orangish: open (g5-) */
446 .mi,
447 .g5 {background: #FCA} /* orange: insert */
448 .c-as,
449 .mo,
450 .g6 {background: #FCC} /* red: mode */
451 .c-aa,
452 .mv,
453 .g7 {background: #ECE} /* purple: visual (g6+) */
454 .c-oc,
455 .me,
456 .g8 {background: #CCF} /* blue: prefix */
457
458 .c-sa:hover,
459 .ci a:hover, .ci[onclick]:hover,
460 .g0 a:hover, .g0[onclick]:hover {background: #5ED}
461 .c-na:hover,
462 .pm a:hover, .pm[onclick]:hover,
463 .g1 a:hover, .g1[onclick]:hover {background: #7E7}
464 .po a:hover, .po[onclick]:hover,
465 .g2 a:hover, .g2[onclick]:hover {background: #CE6}
466 .c-af:hover,
467 .co a:hover, .co[onclick]:hover,
468 .g3 a:hover, .g3[onclick]:hover {background: #EE4}
469 .c-eu:hover,
470 .cp a:hover, .cp[onclick]:hover,
471 .g4 a:hover, .g4[onclick]:hover {background: #FA6}
472 .mi a:hover, .mi[onclick]:hover,
473 .g5 a:hover, .g5[onclick]:hover {background: #F97}
474 .c-as:hover,
475 .mo a:hover, .mo[onclick]:hover,
476 .g6 a:hover, .g6[onclick]:hover {background: #F88}
477 .c-aa:hover,
478 .mv a:hover, .mv[onclick]:hover,
479 .g7 a:hover, .g7[onclick]:hover {background: #D9D}
480 .c-oc:hover,
481 .me a:hover, .me[onclick]:hover,
482 .g8 a:hover, .g8[onclick]:hover {background: #99F}
483
484 .no {
485         background: #EEE; /* unassigned */
486 }
487 ul.keys li.ni {
488         border: 0;
489         padding: 1px; /* same size as borderlessless keys */
490 }
491
492 dl.legend dt.more,
493 ul.keys li.more b {
494         text-shadow: #F20 0 0 0.1em;
495 }
496 dl.legend dt.more:hover,
497 ul.keys li.more:hover b {
498         text-shadow: #F20 0 0 0.5em, #FC0 0 0 0.2em;
499 }
500 dl.legend dt.ext,
501 ul.keys li.ext {
502         border-style: dashed;
503 }
504 dl.legend dt.new,
505 ul.keys li.new {
506         opacity: .6;
507 }
508
509 /* l/r help columns */
510
511 .help {
512         display: table;
513         width: 100%;
514 }
515 .help > * {
516         display: table-cell;
517         width: 20%;
518         vertical-align: top;
519 }
520
521 .left dl.legend {
522         margin-left: 6.4em; /* a bit over 6.2em to allow for borders+padding (border-sizing would work too) */
523 }
524 .left dl.legend dt {
525         margin-left: -6.4em; /* msie<=6 multiply this by two for some reason */
526         float: left;
527         clear: left;
528 }
529 .left dl.legend dd {
530         float: left; /* align next to dt (except msie<=7 does just the opposite) */
531 }
532 .right dl.legend {
533         margin-right: 6.4em;
534 }
535 .right dl.legend dt {
536         margin-right: -6.4em;
537         float: right;
538         clear: right;
539 }
540 .right dl.legend dd {
541         float: right;
542 }
543 .right {
544         text-align: right;
545 }
546
547 /* help/legend */
548
549 dl.legend dt {
550         margin: 0 0 1px; /* distinct keys */
551         height: auto; /* not key-height */
552         padding: 2px 0;
553 }
554 dl.legend dd {
555         margin: 3px 0.4em 0; /* align text (add dt border+padding height) */
556         padding: 0;
557 }
558
559 dl.legend-options dt {
560         background: #CCC;
561 }
562
563 ul.legend-set {
564         clear: right;
565         padding-top: 1ex;
566 }
567 ul.legend-set li {
568         margin: 6px 0; /* similar to dl legends */
569 }
570
571 .legend {
572         margin-top: 1em;
573 }
574 .legend table {
575         width: 100%;
576 }
577 .legend td {
578         padding: 0 0.2em;
579 }
580
581 /* page-specific */
582
583 #browser td > a {
584         text-decoration: none;
585 }
586 #browser td > a:active,
587 #browser td > a:hover {
588         text-decoration: underline;
589 }
590 #browser tr .aside {
591         font-size: 80%;
592         overflow: hidden;
593         height: 0;
594         -webkit-transition: all 1s ease-in;
595         -o-transition: all 1s ease-in;
596         -moz-transition: all 1s ease-in;
597         transition: height 1s ease-in;
598 }
599 #browser tr .aside p {
600         margin: 1ex 0;
601 }
602 #browser tr.target .aside,
603 #browser tr:target .aside {
604         height: auto;
605 }
606 #browser td.X {
607         white-space: nowrap; /* some browsers break on dashes */
608 }
609
610 #browser tr:target > td:first-of-type,
611 #browser tr.focus > td:first-of-type {
612         background: inherit;
613 }
614 #browser tr.focus > td {
615         border-bottom-color: #000;
616 }
617
618 form.aside {
619         position: absolute;
620         top: 3ex;
621         right: 1em;
622 }
623
624 /* printing hints */
625
626 @page {
627         size: landscape;
628         margin: 0;
629 }
630
631 @media print {
632         ul.legend-set {display: none} /* current options only relevant on dynamic media */
633 }
634