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