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