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