50e12f2998a0fbaf952bd49ad5ed123ce5033656
[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 /* character table */
156
157 li table {
158         float: left;
159         position: relative; /* prevents buggy hovering if table-caption present in gecko */
160 }
161
162 table.glyphs {
163         border-collapse: collapse;
164 }
165 .glyphs thead th, .glyphs td {
166         text-align: center;
167         width: 1.6em; /* regular interval */
168 }
169 .glyphs th, .glyphs td {
170         border-color: #778;
171         border: 1px solid #888;
172         background: #DDD;
173 }
174 .glyphs tbody td {
175         font-size: 112%;
176 }
177 .glyphs.big tbody td {
178         font-size: 200%;
179 }
180 .glyphs .glyphs {
181         margin: 0.5ex 0;
182 }
183 .glyphs .glyphs td {
184         font-size: 100%;
185 }
186
187 /* table headers */
188
189 .glyphs th,
190 .glyphs thead td {
191         border: 0;
192         background: transparent !important;
193 }
194 .glyphs thead td {
195         width: auto; /* no glyph cells in header */
196 }
197 .glyphs th {
198         padding: 0 0.2em;
199 }
200 .diinfo .glyphs th {
201         font-size: 50%; /* mostly insignificant here */
202         font-weight: normal;
203 }
204 .diinfo .glyphs tbody th {
205         text-align: right; /* variable width so keep near cells */
206         padding: 0 0.5em;
207 }
208
209 /* digraphs map */
210
211 table.glyphs.dimap {
212         table-layout: fixed; /* prevent resizing, notably in msie6 */
213 }
214 .glyphs.dimap thead th, .glyphs.dimap td {
215         /* below-maximum size (but still average enough to be regular) so we can fit more */
216         width: 1.2em; /* msie only looks at the first row */
217         min-width: 1em; /* prevents gecko from restricting to page width */
218 }
219 .glyphs.dimap th {
220         text-align: center; /* row headers are also glyph-sized */
221 }
222
223 .glyphs.dimap tbody, .glyphs.dimap colgroup {
224         border: 2px double #888; /* major character group grid */
225 }
226 .glyphs.dimap tbody {
227         border-width: 2px 0; /* horizontal group dividers */
228 }
229 .glyphs.dimap colgroup {
230         border-width: 0 2px; /* vertical divides */
231 }
232
233 /* digraph selection */
234
235 .diinfo {
236         -moz-column-width: 24em;
237 }
238 .diinfo > div {
239         overflow: hidden;
240 }
241
242 .diinfo table.glyphs {
243         margin: 1ex 1ex 2ex;
244         float: left;
245 }
246
247 /* glyph cell overlay (digraph labels) */
248
249 .glyphs.dilabel td {
250         padding: 0;
251         padding-bottom: 1.1ex; /* reserve space for label */
252         vertical-align: bottom;
253 }
254 .glyphs small {
255         font-size: 50%;
256         display: block;
257         margin-top: 0.2ex;
258         margin-bottom: -2.2ex; /* take cell padding */
259 }
260 .glyphs small.digraph {
261         background: #000;
262         color: #FFF;
263         opacity: 0.3;
264 }
265 .glyphs small.value {
266         background: #600;
267         color: #FFF;
268         opacity: 0.3;
269 }
270
271 /* character properties */
272
273 td.X  {background: #FFF} /* unidentified */
274 #digraphs td.Xa {color: #0A0} /* ascii */
275 #digraphs td.Xl {color: #070} /* latin1 */
276 #digraphs   .Xz {color: #D00} /* proposed */
277
278 td.Lm, td.Mc, td.Me, td.Zl, td.Zp {background: #F00} /* unstyled */
279
280 /* letter scripts */
281 td.Armenian,
282 td.Greek    {background: #FFE8CF}
283 td.Cyrillic {background: #FFDDA8}
284 td.Latin    {background: #FFB}
285 td.Aramaic,
286 td.Hebrew   {background: #FFD}
287 td.Arabic   {background: #EFE}
288 td.African  {background: #DED}
289 td.Brahmic  {background: #FBB} /* same as number */
290 td.Khmer    {background: #FBA}
291 td.Hangul,
292 td.Syllabic {background: #DEA}
293 td.Katakana {background: #DFA}
294 td.Hiragana {background: #DFC}
295 td.Bopomofo {background: #BFC}
296 td.Han      {background: #CFD}
297 td.Alpha    {background: #ADA} /* other scripts */
298
299 /* other categories */
300 td.Nd, td.Nl, td.No        {background: #FDD} /* number */
301 td.Sc                      {background: #FCD} /* currency */
302 td.Sm                      {background: #ECE} /* math */
303 td.So                      {background: #DCF} /* symbol */
304 td.Pd, td.Po, td.Pc        {background: #CDF} /* punctuation */
305 td.Ps, td.Pe, td.Pi, td.Pf {background: #BEF} /* quote */
306 td.Lm, td.Sk               {background: #CEE} /* spacing modifier */
307 td.Mn                      {background: #ACC} /* modifier */
308 td.Cc, td.Cf  {color: #666; background: #BBB} /* control */
309 td.Zs                      {background: #ACB} /* space */
310 td.Zs span                 {background: #EEE}
311 td.Co                      {background: #A99} /* private */
312 td.Xi, td.Cs               {background: #CCC} /* invalid */
313 td.Xd                      {color: #844} /* deprecated */
314 td.Xr                      {color: #888} /* reserved (digraph reverse or proposal) */
315 .dimap td.Xr               {background: #EEE} /* reversed digraph */
316 .ccmap td.Xr {opacity:.4}
317
318 /* implementation-based alternatives */
319 td.di-b       {background: #FDD} /* bmp */
320 td.di-d       {background: #FFD} /* rfc-1345 digraph */
321 td.di-prop    {background: #FED} /* proposed digraph */
322 td.di-a       {background: #EFD} /* ascii */
323 td.di-rare    {background: #EEE} /* disfavoured */
324 td.di-invalid {background: #BBB} /* impossible */
325
326 /* continents */
327 td.c-af       {background: #FFC}
328 td.c-eu       {background: #FDC}
329 td.c-as       {background: #FDD}
330 td.c-oc       {background: #EEDDF4}
331 td.c-aa       {background: #E3E8FF}
332 td.c-sa       {background: #DFF}
333 td.c-na       {background: #DFD}
334
335 /* code syntax */
336 .sy-comment    { color: #888 }
337 .sy-constant   { color: #008 }
338 .sy-type,
339 .sy-identifier { color: #804 }
340 .sy-statement  { }
341 .sy-preProc    { }
342 .sy-special    { color: #408 }
343 .sy-error      { font-weight: bold; background-color: #F00; color: #FFF }
344 .sy-todo       { background-color: #FF0 }
345
346 /* hover effects */
347 td.di-d,
348 td.X:hover {cursor: help}
349 td.Greek:hover, td.Armenian:hover                  {background: #FA8}
350 td.Cyrillic:hover                                  {background: #FB7}
351 td.Latin:hover                                     {background: #EE4}
352 td.Hebrew:hover, td.Aramaic:hover                  {background: #FFA}
353 td.Arabic:hover                                    {background: #CFD}
354 td.African:hover                                   {background: #BDB}
355 td.Syllabic:hover, td.Hangul:hover                 {background: #CE6}
356 td.Katakana:hover                                  {background: #BF7}
357 td.Hiragana:hover                                  {background: #AF8}
358 td.Bopomofo:hover                                  {background: #8FA}
359 td.Brahmic:hover                                   {background: #F77}
360 td.Khmer:hover                                     {background: #F87}
361 td.Han:hover                                       {background: #5EB}
362 td.Alpha:hover                                     {background: #5C5}
363 td.Nd:hover, td.Nl:hover, td.No:hover              {background: #F99} /* number */
364 td.Sc:hover                                        {background: #F8C} /* currency */
365 td.Sm:hover                                        {background: #F8F} /* math */
366 td.So:hover                                        {background: #A8F} /* symbol */
367 td.Pd:hover, td.Po:hover, td.Pc:hover              {background: #8AF} /* punctuation */
368 td.Ps:hover, td.Pe:hover, td.Pi:hover, td.Pf:hover {background: #8DF} /* quote */
369 td.Lm:hover, td.Sk:hover                           {background: #BFF} /* spacing modifier */
370 td.Mn:hover                                        {background: #CDE} /* modifier */
371 td.Zs:hover                                        {background: #CED} /* space */
372 td.Cc:hover, td.Cf:hover                           {background: #DDD} /* control */
373 td.Co:hover                                        {background: #A77} /* private */
374 td.Xr:hover                                        {background: #FFF} /* reserved */
375 td.Xa:hover {outline: 1px solid #0F0} /* ascii */
376 td.Xl:hover {outline: 1px solid #0C0} /* latin1 */
377 td.Xz:hover {outline: 1px solid #F00} /* proposed */
378 td.di-rare:hover                                   {background: #BBB}
379 td.di-b:hover                                      {background: #F88}
380 td.di-d:hover                                      {background: #FF8}
381 td.di-prop:hover                                   {background: #FC8}
382 td.di-a:hover                                      {background: #CF8}
383
384 /* key type colorization */
385
386 .pm {background: #BFB}   /* motion */
387 .po {background: #DFA}   /* window */
388 .co {background: #FFA}   /* command */
389 .ci {background: #BFE}   /* info */
390 .cp {background: #FDA}   /* TODO */
391 .mi {background: #FCA}   /* insert mode */
392 .mo {background: #FCC}   /* mode */
393 .mv {background: #ECE}   /* visual mode */
394 .me {background: #CCF}   /* key mode */
395
396 .pm[onclick]:hover {background: #7E7}
397 .po[onclick]:hover {background: #CE6}
398 .ci[onclick]:hover {background: #5ED}
399 .mi[onclick]:hover {background: #F97}
400 .mo[onclick]:hover {background: #F88}
401 .me[onclick]:hover {background: #99F}
402 .mv[onclick]:hover {background: #D9D}
403 .co[onclick]:hover {background: #EE4}
404
405 .no {
406         background: #EEE;
407 }
408 ul.keys li.ni {
409         border: 0;
410         padding: 1px; /* same size as borderlessless keys */
411 }
412
413 dl.legend dt.ext,
414 ul.keys li.ext {
415         border-style: dashed;
416 }
417 dl.legend dt.new,
418 ul.keys li.new {
419         opacity: .6;
420 }
421
422 /* l/r help columns */
423
424 .help {
425         display: table;
426         width: 100%;
427 }
428 .help > * {
429         display: table-cell;
430         width: 20%;
431         vertical-align: top;
432 }
433
434 .left dl.legend {
435         margin-left: 6.4em; /* a bit over 6.2em to allow for borders+padding (border-sizing would work too) */
436 }
437 .left dl.legend dt {
438         margin-left: -6.4em; /* msie<=6 multiply this by two for some reason */
439         float: left;
440         clear: left;
441 }
442 .left dl.legend dd {
443         float: left; /* align next to dt (except msie<=7 does just the opposite) */
444 }
445 .right dl.legend {
446         margin-right: 6.4em;
447 }
448 .right dl.legend dt {
449         margin-right: -6.4em;
450         float: right;
451         clear: right;
452 }
453 .right dl.legend dd {
454         float: right;
455 }
456 .right {
457         text-align: right;
458 }
459
460 /* help/legend */
461
462 dl.legend dt {
463         margin: 0 0 1px; /* distinct keys */
464         height: auto; /* not key-height */
465         padding: 2px 0;
466 }
467 dl.legend dd {
468         margin: 3px 0.4em 0; /* align text (add dt border+padding height) */
469 }
470
471 dl.legend-options dt {
472         background: #CCC;
473 }
474
475 ul.legend-set {
476         clear: right;
477         padding-top: 1ex;
478 }
479 ul.legend-set li {
480         margin: 6px 0; /* similar to dl legends */
481 }
482
483 .legend {
484         margin-top: 1em;
485 }
486 .legend table {
487         width: 100%;
488 }
489 .legend td {
490         padding: 0 0.2em;
491 }
492
493 /* printing hints */
494
495 @page {
496         size: landscape;
497         margin: 0;
498 }
499
500 @media print {
501         ul.legend-set {display: none} /* current options only relevant on dynamic media */
502 }
503