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