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