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