browser: derive support from surrounding versions
[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 dl > dt {
83         float: left;
84         width: 50%;
85         text-align: right;
86 }
87 dl > dd {
88         text-align: left;
89         padding-left: 1em;
90         overflow: hidden;
91 }
92
93 /* "keyboard" (list of keys) */
94
95 ul#rows {margin-top: -5ex} /* top (esc) row fits besides header */
96 li.row2 {margin-left: 7em} /* row offsets relative to ~6em key width */
97 li.row3 {margin-left: 8em}
98 li.row4 {margin-left: 10em} /* should actually align to next key on row0 */
99         /* ...however rows>=1 are shifted a bit, to make space */
100
101 li.row {
102         clear: both; /* start new row block (keyboard row) */
103         padding-top: 1ex;
104 }
105 li.row > ul > li {
106         clear: both; /* start new row (screen row) */
107 } /* css2 selectors ignored by msie<=6 */
108 li.row ul ul {
109         clear: both;
110 } /* css1 alternative as well (doesn't match in gecko for some reason) */
111
112 h3      {display: none} /* semantic details (non-css/js) */
113 li.mode {display: none} /* initially hidden (only show interactively (js)) */
114
115 #rows {
116         width: 82.5em; /*       12 * (2px + 1px + 6.2em + 1px + 2px) + 8em*/
117         padding-right: 72px;
118 }
119 #rows > li {
120         margin-right: -72px;
121 }
122
123 /* individual keys */
124
125 dl.legend dt,
126 ul.keys li {
127         float: left;
128         width: 6.2em;
129         line-height: 2.25ex; /* a little terser (seems to be gecko's default anyway) */
130         height: 4.5ex; /* 2 lines */
131         overflow: hidden;
132         margin: 0 2px -1px;
133         text-align: center;
134         border: 1px solid #000;
135         border-radius: 4px;
136         -moz-border-radius: 4px;
137 }
138 ul.keys li b {
139         float: left;
140         font-size: 200%;
141         line-height: 2.5ex; /* inherits otherwise */
142         padding-left: 2px;
143 }
144 ul.keys.omni li { /* omni-present esc */
145         width: 8.5em;
146 }
147
148 /* fine tuning of special occurrences */
149
150 ul.keys li b[title] { /* mnemonic hover */
151         cursor: help;
152 }
153 ul.keys li[onclick]:hover { /* link */
154         cursor: pointer;
155 }
156 ul.keys li a { /* key link */
157         color: inherit;
158         text-decoration: none;
159         display: block;
160         height: 100%;
161 }
162
163 ul.keys.meta li b,
164 ul.keys.ctrl li b,
165 ul.keys.lead li b { /* char with ctrl or leading key */
166         font-size: 100%; /* space is too limited for 2+ double-sized chars */
167         line-height: 5ex; /* keep double height though */
168 }
169 ul.keys.meta li b small,
170 ul.keys.ctrl li b small { /* meta key indicator */
171         font-size: 70%;
172         font-weight: normal; /* nice and subtle */
173 }
174
175 /* tables */
176
177 table {
178         border-collapse: collapse;
179 }
180 th, td {
181         border-color: #778;
182         border: 1px solid #888;
183         background: #DDD;
184 }
185 thead th, td {
186         text-align: center;
187 }
188
189 /* character table */
190
191 .glyphs thead th, .glyphs td {
192         width: 1.6em; /* regular interval */
193 }
194 .glyphs tbody td {
195         font-size: 112%;
196 }
197 .glyphs.big tbody td {
198         font-size: 200%;
199 }
200 .glyphs .glyphs {
201         margin: 0.5ex 0;
202 }
203 .glyphs .glyphs td {
204         font-size: 100%;
205 }
206
207 /* table headers */
208
209 th,
210 thead td {
211         border: 0;
212         background: transparent !important;
213 }
214 .glyphs thead td {
215         width: auto; /* no glyph cells in header */
216 }
217 th {
218         padding: 0 0.2em;
219 }
220 .diinfo th {
221         font-size: 50%; /* mostly insignificant here */
222         font-weight: normal;
223 }
224 .diinfo tbody th {
225         text-align: right; /* variable width so keep near cells */
226         padding: 0 0.5em;
227 }
228
229 /* digraphs map */
230
231 table.dimap {
232         table-layout: fixed; /* prevent resizing, notably in msie6 */
233 }
234 .dimap thead th, .dimap td {
235         /* below-maximum size (but still average enough to be regular) so we can fit more */
236         width: 1.2em; /* msie only looks at the first row */
237         min-width: 1em; /* prevents gecko from restricting to page width */
238 }
239 .dimap th {
240         text-align: center; /* row headers are also glyph-sized */
241 }
242
243 .mapped tbody, .mapped colgroup,
244 .dimap tbody, .dimap colgroup {
245         border: 2px double #888; /* major character group grid */
246 }
247 .mapped tbody,
248 .dimap tbody {
249         border-width: 2px 0; /* horizontal group dividers */
250 }
251 .mapped colgroup,
252 .dimap colgroup {
253         border-width: 0 2px; /* vertical divides */
254 }
255
256 /* digraph selection */
257
258 .diinfo {
259         -moz-column-width: 24em;
260 }
261 .diinfo > div {
262         overflow: hidden;
263 }
264
265 /* glyph cell overlay (digraph labels) */
266
267 .glyphs.dilabel td {
268         padding: 0;
269         padding-bottom: 1.1ex; /* reserve space for label */
270         vertical-align: bottom;
271 }
272 .glyphs small {
273         font-size: 50%;
274         display: block;
275         margin-top: 0.2ex;
276         margin-bottom: -2.2ex; /* take cell padding */
277 }
278 .glyphs small.digraph {
279         background: #000;
280         color: #FFF;
281         opacity: 0.3;
282 }
283 .glyphs small.value {
284         background: #600;
285         color: #FFF;
286         opacity: 0.3;
287 }
288
289 /* character properties */
290
291 .X  {background: #FFF} /* unidentified */
292 #digraphs .Xa {color: #0A0} /* ascii */
293 #digraphs .Xl {color: #070} /* latin1 */
294 #digraphs .Xz {color: #D00} /* proposed */
295
296 .Lm, .Mc, .Me, .Zl, .Zp {background: #F00} /* unstyled */
297
298 /* letter scripts */
299 .Armenian,
300 .Greek    {background: #FFE8CF}
301 .Cyrillic {background: #FFDDA8}
302 .Latin    {background: #FFB}
303 .Aramaic,
304 .Hebrew   {background: #FFD}
305 .Arabic   {background: #EFE}
306 .African  {background: #DED}
307 .Brahmic  {background: #FBB} /* same as number */
308 .Khmer    {background: #FBA}
309 .Hangul,
310 .Syllabic {background: #DEA}
311 .Katakana {background: #DFA}
312 .Hiragana {background: #DFC}
313 .Bopomofo {background: #BFC}
314 .Han      {background: #CFD}
315 .Alpha    {background: #ADA} /* other scripts */
316
317 /* other categories */
318 .Nd, .Nl, .No         {background: #FDD} /* number */
319 .Sc                   {background: #FCD} /* currency */
320 .Sm                   {background: #ECE} /* math */
321 .So                   {background: #DCF} /* symbol */
322 .Pd, .Po, .Pc         {background: #CDF} /* punctuation */
323 .Ps, .Pe, .Pi, .Pf    {background: #BEF} /* quote */
324 .Lm, .Sk              {background: #CEE} /* spacing modifier */
325 .Mn                   {background: #ACC} /* modifier */
326 .Cc, .Cf {color: #666; background: #BBB} /* control */
327 .Zs                   {background: #ACB} /* space */
328 .Zs span              {background: #EEE}
329 .Co                   {background: #DCC} /* private */
330 .Xi, .Cs              {background: #CCC} /* invalid */
331 .Xd                   {color: #844} /* deprecated */
332 .Xr                   {color: #888} /* reserved (digraph reverse or proposal) */
333 .dimap .Xr            {background: #EEE} /* reversed digraph */
334 .ccmap .Xr {opacity:.4}
335
336 /* support levels */
337 .l1 {background: #FDD} /* no, unsupported, other */
338 .l2 {background: #FED} /* partial, restricted, unofficial */
339         /* default u-prop, u-bmp */
340 .l3 {background: #FFD} /* almost, imperfect, common */
341         /* default u-di, u-lat1 */
342 .l4 {background: #EFD} /* yes, supported, ubiquitous, native */
343         /* default u-ascii */
344 .l5 {background: #DFD} /* complete, perfect */
345 .l0 {background: #EEE} /* unknown, omitted */
346 .ex {     color: #888} /* experimental, disfavoured */
347 .u-invalid {background: #BBB} /* invalid, impossible */
348
349 .p0         {opacity: .6}
350 .p0.p       {opacity: 1}
351 .p::after   {content: '!'; color: #F00}
352 .p4::after  {color: #C00}
353 .p3::after  {color: #A00}
354 .p2::after  {color: #800}
355 .p1::after,
356 .p0::after  {color: #000}
357 .p09::after {opacity: .9}
358 .p08::after {opacity: .8}
359 .p07::after {opacity: .7}
360 .p06::after {opacity: .6}
361 .p05::after {opacity: .5}
362 .p04::after {opacity: .4}
363 .p03::after {opacity: .3}
364 .p02::after {opacity: .2}
365 .p01::after {opacity: .1}
366 .p00::after {display: none}
367
368 /* code syntax */
369 .sy-comment    { color: #888 }
370 .sy-constant   { color: #008 }
371 .sy-type,
372 .sy-identifier { color: #804 }
373 .sy-statement  { }
374 .sy-preProc    { }
375 .sy-special    { color: #408 }
376 .sy-error      { font-weight: bold; background-color: #F00; color: #FFF }
377 .sy-todo       { background-color: #FF0 }
378
379 /* hover effects */
380 .u-di,
381 .X:hover {cursor: help}
382 .Greek:hover, .Armenian:hover              {background: #FA8}
383 .Cyrillic:hover                            {background: #FB7}
384 .Latin:hover                               {background: #EE4}
385 .Hebrew:hover, .Aramaic:hover              {background: #FFA}
386 .Arabic:hover                              {background: #CFD}
387 .African:hover                             {background: #BDB}
388 .Syllabic:hover, .Hangul:hover             {background: #CE6}
389 .Katakana:hover                            {background: #BF7}
390 .Hiragana:hover                            {background: #AF8}
391 .Bopomofo:hover                            {background: #8FA}
392 .Brahmic:hover                             {background: #F77}
393 .Khmer:hover                               {background: #F87}
394 .Han:hover                                 {background: #5EB}
395 .Alpha:hover                               {background: #5C5}
396 .Nd:hover, .Nl:hover, .No:hover            {background: #F99} /* number */
397 .Sc:hover                                  {background: #F8C} /* currency */
398 .Sm:hover                                  {background: #F8F} /* math */
399 .So:hover                                  {background: #A8F} /* symbol */
400 .Pd:hover, .Po:hover, .Pc:hover            {background: #8AF} /* punctuation */
401 .Ps:hover, .Pe:hover, .Pi:hover, .Pf:hover {background: #8DF} /* quote */
402 .Lm:hover, .Sk:hover                       {background: #BFF} /* spacing modifier */
403 .Mn:hover                                  {background: #CDE} /* modifier */
404 .Zs:hover                                  {background: #CED} /* space */
405 .Cc:hover, .Cf:hover                       {background: #DDD} /* control */
406 .Co:hover                                  {background: #A77} /* private */
407 .Xr:hover                                  {background: #FFF} /* reserved */
408 .Xa:hover {outline: 1px solid #0F0} /* ascii */
409 .Xl:hover {outline: 1px solid #0C0} /* latin1 */
410 .Xz:hover {outline: 1px solid #F00} /* proposed */
411 .l0:hover                                  {background: #888}
412 .l1:hover                                  {background: #F88}
413 .l2:hover                                  {background: #FC8}
414 .l3:hover                                  {background: #FF8}
415 .l4:hover                                  {background: #CF8}
416 .l5:hover                                  {background: #8F8}
417
418 /* key type colorization */
419
420 .c-sa,
421 .ci,
422 .g0 {background: #BFE} /* cyan: info */
423 .c-na,
424 .pm,
425 .g1 {background: #BFB} /* green: motion */
426 .po,
427 .g2 {background: #DFA} /* greenish: jump (g1+) */
428 .c-af,
429 .co,
430 .g3 {background: #FFA} /* yellow: command */
431 .c-eu,
432 .cp,
433 .g4 {background: #FDA} /* orangish: open (g5-) */
434 .mi,
435 .g5 {background: #FCA} /* orange: insert */
436 .c-as,
437 .mo,
438 .g6 {background: #FCC} /* red: mode */
439 .c-aa,
440 .mv,
441 .g7 {background: #ECE} /* purple: visual (g6+) */
442 .c-oc,
443 .me,
444 .g8 {background: #CCF} /* blue: prefix */
445
446 .c-sa:hover,
447 .ci a:hover, .ci[onclick]:hover,
448 .g0 a:hover, .g0[onclick]:hover {background: #5ED}
449 .c-na:hover,
450 .pm a:hover, .pm[onclick]:hover,
451 .g1 a:hover, .g1[onclick]:hover {background: #7E7}
452 .po a:hover, .po[onclick]:hover,
453 .g2 a:hover, .g2[onclick]:hover {background: #CE6}
454 .c-af:hover,
455 .co a:hover, .co[onclick]:hover,
456 .g3 a:hover, .g3[onclick]:hover {background: #EE4}
457 .c-eu:hover,
458 .cp a:hover, .cp[onclick]:hover,
459 .g4 a:hover, .g4[onclick]:hover {background: #FA6}
460 .mi a:hover, .mi[onclick]:hover,
461 .g5 a:hover, .g5[onclick]:hover {background: #F97}
462 .c-as:hover,
463 .mo a:hover, .mo[onclick]:hover,
464 .g6 a:hover, .g6[onclick]:hover {background: #F88}
465 .c-aa:hover,
466 .mv a:hover, .mv[onclick]:hover,
467 .g7 a:hover, .g7[onclick]:hover {background: #D9D}
468 .c-oc:hover,
469 .me a:hover, .me[onclick]:hover,
470 .g8 a:hover, .g8[onclick]:hover {background: #99F}
471
472 .no {
473         background: #EEE; /* unassigned */
474 }
475 ul.keys li.ni {
476         border: 0;
477         padding: 1px; /* same size as borderlessless keys */
478 }
479
480 dl.legend dt.more,
481 ul.keys li.more b {
482         text-shadow: #F20 0 0 0.1em;
483 }
484 dl.legend dt.more:hover,
485 ul.keys li.more:hover b {
486         text-shadow: #F20 0 0 0.5em, #FC0 0 0 0.2em;
487 }
488 dl.legend dt.ext,
489 ul.keys li.ext {
490         border-style: dashed;
491 }
492 dl.legend dt.new,
493 ul.keys li.new {
494         opacity: .6;
495 }
496
497 /* l/r help columns */
498
499 .help {
500         display: table;
501         width: 100%;
502 }
503 .help > * {
504         display: table-cell;
505         width: 20%;
506         vertical-align: top;
507 }
508
509 .left dl.legend {
510         margin-left: 6.4em; /* a bit over 6.2em to allow for borders+padding (border-sizing would work too) */
511 }
512 .left dl.legend dt {
513         margin-left: -6.4em; /* msie<=6 multiply this by two for some reason */
514         float: left;
515         clear: left;
516 }
517 .left dl.legend dd {
518         float: left; /* align next to dt (except msie<=7 does just the opposite) */
519 }
520 .right dl.legend {
521         margin-right: 6.4em;
522 }
523 .right dl.legend dt {
524         margin-right: -6.4em;
525         float: right;
526         clear: right;
527 }
528 .right dl.legend dd {
529         float: right;
530 }
531 .right {
532         text-align: right;
533 }
534
535 /* help/legend */
536
537 dl.legend dt {
538         margin: 0 0 1px; /* distinct keys */
539         height: auto; /* not key-height */
540         padding: 2px 0;
541         width: auto; /* not center-aligned */
542 }
543 dl.legend dd {
544         margin: 3px 0.4em 0; /* align text (add dt border+padding height) */
545         padding: 0;
546 }
547
548 dl.legend-options dt {
549         background: #CCC;
550 }
551
552 ul.legend-set {
553         clear: right;
554         padding-top: 1ex;
555 }
556 ul.legend-set li {
557         margin: 6px 0; /* similar to dl legends */
558 }
559
560 .legend {
561         margin-top: 1em;
562 }
563 .legend table {
564         width: 100%;
565 }
566 .legend td {
567         padding: 0 0.2em;
568 }
569
570 /* page-specific */
571
572 #browser td > a {
573         text-decoration: none;
574 }
575 #browser td > a:active,
576 #browser td > a:hover {
577         text-decoration: underline;
578 }
579 #browser tr .aside {
580         font-size: 80%;
581         overflow: hidden;
582         height: 0;
583         -webkit-transition: all 1s ease-in;
584         -o-transition: all 1s ease-in;
585         -moz-transition: all 1s ease-in;
586         transition: height 1s ease-in;
587 }
588 #browser tr .aside p {
589         margin: 1ex 0;
590 }
591 #browser tr.target .aside,
592 #browser tr:target .aside {
593         height: auto;
594 }
595 #browser td.X {
596         white-space: nowrap; /* some browsers break on dashes */
597 }
598
599 #browser tr:target > td:first-of-type,
600 #browser tr.focus > td:first-of-type {
601         background: inherit;
602 }
603 #browser tr.focus > td {
604         border-bottom-color: #000;
605 }
606
607 form.aside {
608         position: absolute;
609         top: 3ex;
610         right: 1em;
611 }
612
613 /* printing hints */
614
615 @page {
616         size: landscape;
617         margin: 0;
618 }
619
620 @media print {
621         ul.legend-set {display: none} /* current options only relevant on dynamic media */
622 }
623