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