termcol: 256-colour tables (like 88)
[sheet.git] / base.css
1 /* media features */
2
3 @import url(terse.css) all and (max-width: 80em);
4
5 @import url(mono.css) all and (monochrome);
6
7 /* general */
8
9 body {
10         background: #FFF;
11         color: #000;
12         font-size: 90%;
13 }
14 a, a:visited {
15         color: #000;
16         text-decoration: underline;
17 }
18 a:active, a:hover {
19         color: #00F;
20         text-decoration: none;
21 }
22
23 /* common sections */
24
25 h1, h2 {
26         text-align: center;
27         font-size: 200%;
28         margin: 0;
29 }
30 h2, caption {
31         font-size: 125%;
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 .diinfo h2 {
46         margin: 0 1ex;
47         clear: both;
48         font-size: 110%;
49         text-align: left;
50 }
51
52 p {
53         text-align: center;
54         margin: 1ex 0 1em;
55 }
56 p.aside {
57         font-size: 80%;
58 }
59 p.footer {
60         margin: 1em 0 0;
61 }
62 .help + .footer {
63         margin: 0;
64 }
65
66 ul {
67         margin: 0;
68         padding: 0;
69         list-style: none;
70 }
71
72 #source {
73         text-align: center;
74 }
75 #source pre {
76         display: inline-block;
77         text-align: left;
78 }
79
80 /* "keyboard" (list of keys) */
81
82 ul#rows {margin-top: -5ex} /* top (esc) row fits besides header */
83 li.row1 {margin-left: 7em} /* row offsets relative to ~6em key width */
84 li.row2 {margin-left: 8em}
85 li.row3 {margin-left: 10em} /* should actually align to next key on row0 */
86         /* ...however rows>=1 are shifted a bit, to make space */
87
88 li.row {
89         clear: both; /* start new row block (keyboard row) */
90         padding-top: 1ex;
91 }
92 li.row > ul > li {
93         clear: both; /* start new row (screen row) */
94 } /* css2 selectors ignored by msie<=6 */
95 li.row ul ul {
96         clear: both;
97 } /* css1 alternative as well (doesn't match in gecko for some reason) */
98
99 h3      {display: none} /* semantic details (non-css/js) */
100 li.mode {display: none} /* initially hidden (only show interactively (js)) */
101
102 #rows {
103         width: 82.5em; /*       12 * (2px + 1px + 6.2em + 1px + 2px) + 8em*/
104         padding-right: 72px;
105 }
106 #rows > li {
107         margin-right: -72px;
108 }
109
110 /* individual keys */
111
112 dl.legend dt,
113 ul.keys li {
114         float: left;
115         width: 6.2em;
116         line-height: 2.25ex; /* a little terser (seems to be gecko's default anyway) */
117         height: 4.5ex; /* 2 lines */
118         overflow: hidden;
119         margin: 0 2px -1px;
120         text-align: center;
121         border: 1px solid #000;
122         border-radius: 4px;
123         -moz-border-radius: 4px;
124 }
125 ul.keys li b {
126         float: left;
127         font-size: 200%;
128         line-height: 2.5ex; /* inherits otherwise */
129         padding-left: 2px;
130 }
131 ul.keys.omni li { /* omni-present esc */
132         width: 8.5em;
133 }
134
135 /* fine tuning of special occurrences */
136
137 ul.keys li b[title] { /* mnemonic hover */
138         cursor: help;
139 }
140 ul.keys li[onclick]:hover { /* link */
141         cursor: pointer;
142 }
143 ul.keys.meta li b,
144 ul.keys.ctrl li b,
145 ul.keys.lead li b { /* char with ctrl or leading key */
146         font-size: 100%; /* space is too limited for 2+ double-sized chars */
147         line-height: 5ex; /* keep double height though */
148 }
149 ul.keys.meta li b small,
150 ul.keys.ctrl li b small { /* meta key indicator */
151         font-size: 70%;
152         font-weight: normal; /* nice and subtle */
153 }
154
155 /* tables */
156
157 li table {
158         float: left;
159         position: relative; /* prevents buggy hovering if table-caption present in gecko */
160 }
161
162 table {
163         border-collapse: collapse;
164 }
165 th, td {
166         border-color: #778;
167         border: 1px solid #888;
168         background: #DDD;
169 }
170 thead th, td {
171         text-align: center;
172 }
173
174 /* character table */
175
176 .glyphs thead th, .glyphs td {
177         width: 1.6em; /* regular interval */
178 }
179 .glyphs tbody td {
180         font-size: 112%;
181 }
182 .glyphs.big tbody td {
183         font-size: 200%;
184 }
185 .glyphs .glyphs {
186         margin: 0.5ex 0;
187 }
188 .glyphs .glyphs td {
189         font-size: 100%;
190 }
191
192 /* table headers */
193
194 th,
195 thead td {
196         border: 0;
197         background: transparent !important;
198 }
199 .glyphs thead td {
200         width: auto; /* no glyph cells in header */
201 }
202 th {
203         padding: 0 0.2em;
204 }
205 .diinfo th {
206         font-size: 50%; /* mostly insignificant here */
207         font-weight: normal;
208 }
209 .diinfo tbody th {
210         text-align: right; /* variable width so keep near cells */
211         padding: 0 0.5em;
212 }
213
214 /* digraphs map */
215
216 table.glyphs.dimap {
217         table-layout: fixed; /* prevent resizing, notably in msie6 */
218 }
219 .glyphs.dimap thead th, .glyphs.dimap td {
220         /* below-maximum size (but still average enough to be regular) so we can fit more */
221         width: 1.2em; /* msie only looks at the first row */
222         min-width: 1em; /* prevents gecko from restricting to page width */
223 }
224 .glyphs.dimap th {
225         text-align: center; /* row headers are also glyph-sized */
226 }
227
228 .glyphs.dimap tbody, .glyphs.dimap colgroup {
229         border: 2px double #888; /* major character group grid */
230 }
231 .glyphs.dimap tbody {
232         border-width: 2px 0; /* horizontal group dividers */
233 }
234 .glyphs.dimap colgroup {
235         border-width: 0 2px; /* vertical divides */
236 }
237
238 /* digraph selection */
239
240 .diinfo {
241         -moz-column-width: 24em;
242 }
243 .diinfo > div {
244         overflow: hidden;
245 }
246
247 .diinfo table.glyphs {
248         margin: 1ex 1ex 2ex;
249         float: left;
250 }
251
252 /* glyph cell overlay (digraph labels) */
253
254 .glyphs.dilabel td {
255         padding: 0;
256         padding-bottom: 1.1ex; /* reserve space for label */
257         vertical-align: bottom;
258 }
259 .glyphs small {
260         font-size: 50%;
261         display: block;
262         margin-top: 0.2ex;
263         margin-bottom: -2.2ex; /* take cell padding */
264 }
265 .glyphs small.digraph {
266         background: #000;
267         color: #FFF;
268         opacity: 0.3;
269 }
270 .glyphs small.value {
271         background: #600;
272         color: #FFF;
273         opacity: 0.3;
274 }
275
276 /* character properties */
277
278 td.X  {background: #FFF} /* unidentified */
279 #digraphs td.Xa {color: #0A0} /* ascii */
280 #digraphs td.Xl {color: #070} /* latin1 */
281 #digraphs   .Xz {color: #D00} /* proposed */
282
283 td.Lm, td.Mc, td.Me, td.Zl, td.Zp {background: #F00} /* unstyled */
284
285 /* letter scripts */
286 td.Armenian,
287 td.Greek    {background: #FFE8CF}
288 td.Cyrillic {background: #FFDDA8}
289 td.Latin    {background: #FFB}
290 td.Aramaic,
291 td.Hebrew   {background: #FFD}
292 td.Arabic   {background: #EFE}
293 td.African  {background: #DED}
294 td.Brahmic  {background: #FBB} /* same as number */
295 td.Khmer    {background: #FBA}
296 td.Hangul,
297 td.Syllabic {background: #DEA}
298 td.Katakana {background: #DFA}
299 td.Hiragana {background: #DFC}
300 td.Bopomofo {background: #BFC}
301 td.Han      {background: #CFD}
302 td.Alpha    {background: #ADA} /* other scripts */
303
304 /* other categories */
305 td.Nd, td.Nl, td.No        {background: #FDD} /* number */
306 td.Sc                      {background: #FCD} /* currency */
307 td.Sm                      {background: #ECE} /* math */
308 td.So                      {background: #DCF} /* symbol */
309 td.Pd, td.Po, td.Pc        {background: #CDF} /* punctuation */
310 td.Ps, td.Pe, td.Pi, td.Pf {background: #BEF} /* quote */
311 td.Lm, td.Sk               {background: #CEE} /* spacing modifier */
312 td.Mn                      {background: #ACC} /* modifier */
313 td.Cc, td.Cf  {color: #666; background: #BBB} /* control */
314 td.Zs                      {background: #ACB} /* space */
315 td.Zs span                 {background: #EEE}
316 td.Co                      {background: #A99} /* private */
317 td.Xi, td.Cs               {background: #CCC} /* invalid */
318 td.Xd                      {color: #844} /* deprecated */
319 td.Xr                      {color: #888} /* reserved (digraph reverse or proposal) */
320 .dimap td.Xr               {background: #EEE} /* reversed digraph */
321 .ccmap td.Xr {opacity:.4}
322
323 /* implementation-based alternatives */
324 td.di-b       {background: #FDD} /* bmp */
325 td.di-d       {background: #FFD} /* rfc-1345 digraph */
326 td.di-prop    {background: #FED} /* proposed digraph */
327 td.di-a       {background: #EFD} /* ascii */
328 td.di-rare    {background: #EEE} /* disfavoured */
329 td.di-invalid {background: #BBB} /* impossible */
330
331 /* continents */
332 td.c-af       {background: #FFC}
333 td.c-eu       {background: #FDC}
334 td.c-as       {background: #FDD}
335 td.c-oc       {background: #EEDDF4}
336 td.c-aa       {background: #E3E8FF}
337 td.c-sa       {background: #DFF}
338 td.c-na       {background: #DFD}
339
340 /* code syntax */
341 .sy-comment    { color: #888 }
342 .sy-constant   { color: #008 }
343 .sy-type,
344 .sy-identifier { color: #804 }
345 .sy-statement  { }
346 .sy-preProc    { }
347 .sy-special    { color: #408 }
348 .sy-error      { font-weight: bold; background-color: #F00; color: #FFF }
349 .sy-todo       { background-color: #FF0 }
350
351 /* hover effects */
352 td.di-d,
353 td.X:hover {cursor: help}
354 td.Greek:hover, td.Armenian:hover                  {background: #FA8}
355 td.Cyrillic:hover                                  {background: #FB7}
356 td.Latin:hover                                     {background: #EE4}
357 td.Hebrew:hover, td.Aramaic:hover                  {background: #FFA}
358 td.Arabic:hover                                    {background: #CFD}
359 td.African:hover                                   {background: #BDB}
360 td.Syllabic:hover, td.Hangul:hover                 {background: #CE6}
361 td.Katakana:hover                                  {background: #BF7}
362 td.Hiragana:hover                                  {background: #AF8}
363 td.Bopomofo:hover                                  {background: #8FA}
364 td.Brahmic:hover                                   {background: #F77}
365 td.Khmer:hover                                     {background: #F87}
366 td.Han:hover                                       {background: #5EB}
367 td.Alpha:hover                                     {background: #5C5}
368 td.Nd:hover, td.Nl:hover, td.No:hover              {background: #F99} /* number */
369 td.Sc:hover                                        {background: #F8C} /* currency */
370 td.Sm:hover                                        {background: #F8F} /* math */
371 td.So:hover                                        {background: #A8F} /* symbol */
372 td.Pd:hover, td.Po:hover, td.Pc:hover              {background: #8AF} /* punctuation */
373 td.Ps:hover, td.Pe:hover, td.Pi:hover, td.Pf:hover {background: #8DF} /* quote */
374 td.Lm:hover, td.Sk:hover                           {background: #BFF} /* spacing modifier */
375 td.Mn:hover                                        {background: #CDE} /* modifier */
376 td.Zs:hover                                        {background: #CED} /* space */
377 td.Cc:hover, td.Cf:hover                           {background: #DDD} /* control */
378 td.Co:hover                                        {background: #A77} /* private */
379 td.Xr:hover                                        {background: #FFF} /* reserved */
380 td.Xa:hover {outline: 1px solid #0F0} /* ascii */
381 td.Xl:hover {outline: 1px solid #0C0} /* latin1 */
382 td.Xz:hover {outline: 1px solid #F00} /* proposed */
383 td.di-rare:hover                                   {background: #BBB}
384 td.di-b:hover                                      {background: #F88}
385 td.di-d:hover                                      {background: #FF8}
386 td.di-prop:hover                                   {background: #FC8}
387 td.di-a:hover                                      {background: #CF8}
388
389 /* key type colorization */
390
391 .pm {background: #BFB}   /* motion */
392 .po {background: #DFA}   /* window */
393 .co {background: #FFA}   /* command */
394 .ci {background: #BFE}   /* info */
395 .cp {background: #FDA}   /* TODO */
396 .mi {background: #FCA}   /* insert mode */
397 .mo {background: #FCC}   /* mode */
398 .mv {background: #ECE}   /* visual mode */
399 .me {background: #CCF}   /* key mode */
400
401 .pm[onclick]:hover {background: #7E7}
402 .po[onclick]:hover {background: #CE6}
403 .ci[onclick]:hover {background: #5ED}
404 .mi[onclick]:hover {background: #F97}
405 .mo[onclick]:hover {background: #F88}
406 .me[onclick]:hover {background: #99F}
407 .mv[onclick]:hover {background: #D9D}
408 .co[onclick]:hover {background: #EE4}
409
410 .no {
411         background: #EEE;
412 }
413 ul.keys li.ni {
414         border: 0;
415         padding: 1px; /* same size as borderlessless keys */
416 }
417
418 dl.legend dt.ext,
419 ul.keys li.ext {
420         border-style: dashed;
421 }
422 dl.legend dt.new,
423 ul.keys li.new {
424         opacity: .6;
425 }
426
427 /* l/r help columns */
428
429 .help {
430         display: table;
431         width: 100%;
432 }
433 .help > * {
434         display: table-cell;
435         width: 20%;
436         vertical-align: top;
437 }
438
439 .left dl.legend {
440         margin-left: 6.4em; /* a bit over 6.2em to allow for borders+padding (border-sizing would work too) */
441 }
442 .left dl.legend dt {
443         margin-left: -6.4em; /* msie<=6 multiply this by two for some reason */
444         float: left;
445         clear: left;
446 }
447 .left dl.legend dd {
448         float: left; /* align next to dt (except msie<=7 does just the opposite) */
449 }
450 .right dl.legend {
451         margin-right: 6.4em;
452 }
453 .right dl.legend dt {
454         margin-right: -6.4em;
455         float: right;
456         clear: right;
457 }
458 .right dl.legend dd {
459         float: right;
460 }
461 .right {
462         text-align: right;
463 }
464
465 /* help/legend */
466
467 dl.legend dt {
468         margin: 0 0 1px; /* distinct keys */
469         height: auto; /* not key-height */
470         padding: 2px 0;
471 }
472 dl.legend dd {
473         margin: 3px 0.4em 0; /* align text (add dt border+padding height) */
474 }
475
476 dl.legend-options dt {
477         background: #CCC;
478 }
479
480 ul.legend-set {
481         clear: right;
482         padding-top: 1ex;
483 }
484 ul.legend-set li {
485         margin: 6px 0; /* similar to dl legends */
486 }
487
488 .legend {
489         margin-top: 1em;
490 }
491 .legend table {
492         width: 100%;
493 }
494 .legend td {
495         padding: 0 0.2em;
496 }
497
498 /* printing hints */
499
500 @page {
501         size: landscape;
502         margin: 0;
503 }
504
505 @media print {
506         ul.legend-set {display: none} /* current options only relevant on dynamic media */
507 }
508