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