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