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