chars: query overflow error as debug message
[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 caption aside {
32         position: absolute;
33         margin-left: 1ex;
34         font-weight: normal;
35         display: inline;
36         font-size: 91%; /* 100% */
37         margin-top: .3ex; /* align with 110% baseline */
38 }
39
40 hr {
41         clear: both;
42         visibility: hidden;
43         height: 2ex;
44         margin: 0;
45 }
46
47 .section ul {
48         margin-bottom: 1ex;
49 }
50 .section h2 {
51         margin: 0 1ex;
52         clear: both;
53 }
54 .section table {
55         float: left;
56         position: relative; /* prevents buggy hovering in table if caption present in gecko */
57         margin: 1ex 1ex 2ex;
58 }
59 .section .section {
60         float: left;
61 }
62 #charset .section table {
63         margin: -0.5ex 0 1ex; /* headers provide sufficient spacing already */
64 }
65
66 p {
67         margin: 1ex 0 1em;
68 }
69 p.aside {
70         font-size: 80%;
71 }
72 p.footer {
73         margin: 1em 0 0;
74         clear: both;
75 }
76 .help + .footer {
77         margin: 0;
78 }
79
80 .error {
81         background: #F00;
82         background: rgba(255, 0, 0, .8);
83         color: #FFF;
84         border: 2px solid #000;
85         border-width: 2px 0;
86         padding: 1em;
87         margin: 2ex auto;
88         clear: both;
89 }
90 .error > * {
91         margin-bottom: 1ex;
92 }
93 .error > *:last-child {
94         margin-bottom: 0;
95 }
96
97 ul {
98         margin: 0;
99         padding: 0;
100         list-style: none;
101 }
102
103 pre {
104         text-align: left;
105         margin: 2ex auto;
106         white-space: pre-wrap;
107         overflow-wrap: break-word;
108 }
109 body > pre {
110         width: 78ch;
111         tab-size: 4;
112         -moz-tab-size: 4;
113         padding: 0 1em;
114         border-width: 0 1px;
115         border-style: solid;
116         white-space: pre;
117 }
118
119 h2 small {
120         position: absolute; /* side note; do not influence alignment */
121         margin-left: 1em;
122 }
123
124 dl > dt {
125         float: left;
126         width: 50%;
127         text-align: right;
128 }
129 dl > dd {
130         text-align: left;
131         padding-left: 1em;
132         overflow: hidden;
133 }
134
135 /* "keyboard" (list of keys) */
136
137 #rows {margin-top: -5ex} /* top (esc) row fits besides header */
138 .row2 {margin-left: 7em} /* row offsets relative to ~6em key width */
139 .row3 {margin-left: 8em}
140 .row4 {margin-left: 10em} /* should actually align to next key on row1 */
141         /* ...however rows>=1 are shifted a bit, to make space */
142
143 table.keys tr {
144         clear: both; /* start new row (screen row) */
145         display: block;
146 }
147 table.keys tbody {
148         /* start new row block (keyboard row) */
149         clear: both;
150         padding-top: 1ex;
151         display: block;
152 }
153
154 table.keys th,
155 h3      {display: none} /* semantic details (non-css/js) */
156 .keys .mode {display: none} /* initially hidden (only show interactively (js)) */
157
158 table.keys {
159         display: block;
160         width: 82.5em; /* 12 * td(2px + 1px + 6.2em + 1px + 2px) + 8em */
161 //      padding-right: 72px;
162         border-spacing: 0;
163         border-collapse: collapse;
164 }
165 table.keys > * {
166         margin-right: -72px;
167 }
168
169 /* individual keys */
170
171 dl.legend dt,
172 .keys td {
173         float: left;
174         width: 6.2em;
175         line-height: 2.25ex; /* a little terser (seems to be gecko's default anyway) */
176         height: 4.5ex; /* 2 lines */
177         overflow: hidden;
178         margin: 0 2px -1px;
179         padding: 0;
180         text-align: center;
181         border: 1px solid #000;
182         border-radius: 4px;
183         -moz-border-radius: 4px;
184         text-transform-variation: text;
185 }
186 .keys td b {
187         float: left;
188         font-size: 200%;
189         line-height: 2.5ex; /* inherits otherwise */
190         padding-left: 2px;
191 }
192 .keys .row0 td { /* omni-present esc */
193         width: 8.5em;
194 }
195
196 /* fine tuning of special occurrences */
197
198 .keys td b[title] { /* mnemonic hover */
199         cursor: help;
200 }
201 .keys td[onclick]:hover { /* link */
202         cursor: pointer;
203 }
204 .keys td a { /* key link */
205         color: inherit;
206         text-decoration: none;
207         display: block;
208         height: 100%;
209 }
210
211 .keys .meta td b,
212 .keys .ctrl td b,
213 .keys .lead td b { /* char with ctrl or leading key */
214         font-size: 100%; /* space is too limited for 2+ double-sized chars */
215         line-height: 5ex; /* keep double height though */
216 }
217 .keys .meta td b small,
218 .keys .ctrl td b small { /* meta key indicator */
219         font-size: 70%;
220         font-weight: normal; /* nice and subtle */
221 }
222
223 /* tables */
224
225 table {
226         border-collapse: collapse;
227 }
228 th, td {
229         border-color: #778;
230         border: 1px solid #888;
231         background: #DDD;
232 }
233 thead th, td {
234         text-align: center;
235 }
236
237 td.joind {
238         border-bottom: none;
239 }
240 td.joinu {
241         /* first cell determines border width for entire row */
242         border-top-color: transparent;
243 }
244 td.joinr {
245         border-right: none;
246 }
247 td.joinl {
248         border-left: none;
249 }
250
251 /* character table */
252
253 .glyphs thead th, .glyphs td {
254         width: 1.6em; /* regular interval */
255 }
256 .glyphs tbody td {
257         font-size: 112%;
258 }
259 .glyphs.big tbody td {
260         font-size: 200%;
261 }
262 .glyphs .glyphs {
263         margin: 0.5ex 0; /* nested in legend */
264 }
265 .glyphs .glyphs td {
266         font-size: 100%;
267 }
268
269 .cover td {
270         min-width: 2.5ex; /* square cells */
271 }
272
273 /* table headers */
274
275 th,
276 tfoot td,
277 thead td {
278         border-width: 0;
279         background: transparent;
280 }
281 .glyphs thead td {
282         width: auto; /* no glyph cells in header */
283 }
284 .glyphs caption {
285         margin-left: 2.2em; /* 1ex + offset head column (1.6em + 0.4em) / 110% */
286                 /* adjusted insignificant -.2em to fit wide contents on /charset/mac */
287 }
288 th {
289         padding: 0 0.2em;
290 }
291 .diinfo th {
292         font-size: 50%; /* mostly insignificant here */
293         font-weight: normal;
294 }
295 .diinfo tbody th {
296         text-align: right; /* variable width so keep near cells */
297         padding: 0 0.5em;
298 }
299 .cat {
300         font-size: 70%;
301         text-transform: uppercase;
302 }
303 tfoot .cat th {
304         border-top: 1px solid #888;
305 }
306
307 /* colour map */
308
309 table.color td {
310         border: 1px solid #555;
311         font-weight: normal;
312         padding: 0 8px;
313 }
314 table.color td samp {
315         margin: 0 -8px 0 8px;
316         font-family: inherit;
317         float: right;
318 }
319 table.color td samp ~ samp {
320 }
321 table.color td samp small {
322         font: 100% monospace;
323         padding: 0 .5ex;
324 }
325
326 /* digraphs map */
327
328 table.dimap {
329         table-layout: fixed; /* prevent resizing, notably in msie6 */
330 }
331 .dimap thead th, .dimap td {
332         /* below-maximum size (but still average enough to be regular) so we can fit more */
333         width: 1.2em; /* msie only looks at the first row */
334         min-width: 1em; /* prevents gecko from restricting to page width */
335 }
336 .dimap th {
337         text-align: center; /* row headers are also glyph-sized */
338 }
339
340 .mapped tbody, .mapped colgroup,
341 .dimap tbody, .dimap colgroup {
342         border: 2px double #888; /* major character group grid */
343 }
344 .mapped tbody,
345 .dimap tbody {
346         border-width: 2px 0; /* horizontal group dividers */
347 }
348 .mapped colgroup,
349 .dimap colgroup {
350         border-width: 0 2px; /* vertical divides */
351 }
352
353 /* digraph selection */
354
355 .diinfo {
356         -moz-column-width: 24em;
357         -webkit-column-width: 24em;
358         column-width: 24em;
359 }
360 .diinfo > div {
361         overflow: hidden;
362         column-break-inside: avoid;
363         -webkit-column-break-inside: avoid;
364         position: relative; z-index: 1; /* webkit bug */
365 }
366
367 /* glyph cell overlay (digraph labels) */
368
369 .glyphs.dilabel td {
370         padding: 0;
371         padding-bottom: 1.1ex; /* reserve space for label */
372         vertical-align: bottom;
373 }
374 .glyphs.dilabel small {
375         font-size: 50%;
376         display: block;
377         margin-top: 0.2ex;
378         margin-bottom: -2.2ex; /* take cell padding */
379 }
380 .glyphs.dilabel small.digraph {
381         background: #000;
382         color: #FFF;
383         opacity: 0.3;
384 }
385 .glyphs.dilabel small.value {
386         background: #600;
387         color: #FFF;
388         opacity: 0.3;
389 }
390
391 /* character properties */
392
393 .X  {background: #FFF} /* unidentified */
394 .Mc, .Me, .Zl, .Zp      {background: #F00} /* unstyled */
395 .X > span               {background: #898; background: rgba(0, 0, 0, .25)} /* invisible contents */
396
397 /* letter scripts */
398 .Armenian,
399 .Greek    {background: #FFE8CF}
400 .Cyrillic {background: #FFDDA8}
401 .Latin    {background: #FFB}
402 .Aramaic,
403 .Hebrew   {background: #FFD}
404 .Arabic   {background: #EFE}
405 .African  {background: #DED}
406 .Brahmic  {background: #FBB} /* same as number */
407 .Khmer    {background: #FBA}
408 .Hangul,
409 .Syllabic {background: #DEA}
410 .Katakana {background: #DFA}
411 .Hiragana {background: #DFC}
412 .Bopomofo {background: #BFC}
413 .Han      {background: #CFD}
414 .Alpha    {background: #ADA} /* other scripts */
415
416 /* other categories */
417 .Nd, .Nl, .No         {background: #FDD} /* number */
418 .Sc                   {background: #FCD} /* currency */
419 .Sm                   {background: #ECE} /* math */
420 .So                   {background: #DCF} /* symbol */
421 .Pd, .Po, .Pc         {background: #CDF} /* punctuation */
422 .Ps, .Pe, .Pi, .Pf    {background: #BEF} /* quote */
423 .Lm, .Sk              {background: #CEE} /* spacing modifier */
424 .Mn                   {background: #ACC} /* modifier */
425 .Cc, .Cf {color: #666; background: #BBB} /* control */
426 .Zs                   {background: #ACB} /* space */
427 .Co, .Xi.Co           {background: #DCC} /* private */
428 .Xi, .Cs              {background: #CCC} /* invalid */
429 .Xd                   {color: #844} /* deprecated */
430 .Xr                   {color: #888} /* reserved (digraph reverse or proposal) */
431 .dimap .Xr            {background: #EEE} /* reversed digraph */
432 .ccmap .Xr {opacity:.4}
433
434 /* support levels */
435 .l1 {background: #FDD} /* no, unsupported, other */
436 .l2 {background: #FED} /* partial, restricted, unofficial */
437         /* default u-prop, u-bmp */
438 .l3 {background: #FFD} /* almost, imperfect, common */
439         /* default u-di, u-lat1 */
440 .l4 {background: #EFD} /* yes, supported, ubiquitous, native */
441         /* default u-ascii */
442 .l5 {background: #DFD} /* complete, perfect */
443 .l0 {background: #EEE} /* unknown, omitted */
444 .ex {     color: #888; color: rgba(0, 0, 0, .5)} /* experimental, disfavoured */
445 .u-invalid {background: #BBB} /* invalid, impossible */
446
447 /* foreground representation */
448 #digraphs .u-l3 {color: #080} /* partial */
449 #digraphs .u-l3.ex {color: #4C0} /* experimental */
450 #digraphs .u-l2 {color: #A44; color: rgba(128, 0, 0, .6)} /* unofficial proposal */
451 #digraphs .u-l1 {color: #D00; color: rgba(255, 0, 0, .8)} /* minimal or invalid */
452
453 /* support percentage (browser cells) */
454 .p0         {opacity: .6}
455 .p0.p       {opacity: 1}
456 .p::after   {content: '!'; color: #F00}
457 .p4::after  {color: #C00}
458 .p3::after  {color: #A00}
459 .p2::after  {color: #800}
460 .p1::after,
461 .p0::after  {color: #000}
462 .p09::after {opacity: .9}
463 .p08::after {opacity: .8}
464 .p07::after {opacity: .7}
465 .p06::after {opacity: .6}
466 .p05::after {opacity: .5}
467 .p04::after {opacity: .4}
468 .p03::after {opacity: .3}
469 .p02::after {opacity: .2}
470 .p01::after {opacity: .1}
471 .p00::after {display: none}
472
473 /* code syntax */
474 .sy-comment    { color: #888 }
475 .sy-constant   { color: #008 }
476 .sy-type,
477 .sy-identifier { color: #804 }
478 .sy-statement  { }
479 .sy-preProc    { }
480 .sy-special    { color: #408 }
481 .sy-error      { font-weight: bold; background-color: #F00; color: #FFF }
482 .sy-todo       { background-color: #FF0 }
483
484 /* boolean alternate */
485 .glyphs b      { font-weight: normal; color: #800 }
486
487 /* hover effects */
488 .X:hover {cursor: help}
489 .X:hover > span                            {background: #FFF} /* whitespace marker */
490 .Greek:hover, .Armenian:hover              {background: #FA8}
491 .Cyrillic:hover                            {background: #FB7}
492 .Latin:hover                               {background: #EE4}
493 .Hebrew:hover, .Aramaic:hover              {background: #FFA}
494 .Arabic:hover                              {background: #CFD}
495 .African:hover                             {background: #BDB}
496 .Syllabic:hover, .Hangul:hover             {background: #CE6}
497 .Katakana:hover                            {background: #BF7}
498 .Hiragana:hover                            {background: #AF8}
499 .Bopomofo:hover                            {background: #8FA}
500 .Brahmic:hover                             {background: #F77}
501 .Khmer:hover                               {background: #F87}
502 .Han:hover                                 {background: #5EB}
503 .Alpha:hover                               {background: #5C5}
504 .Nd:hover, .Nl:hover, .No:hover            {background: #F99} /* number */
505 .Sc:hover                                  {background: #F8C} /* currency */
506 .Sm:hover                                  {background: #F8F} /* math */
507 .So:hover                                  {background: #A8F} /* symbol */
508 .Pd:hover, .Po:hover, .Pc:hover            {background: #8AF} /* punctuation */
509 .Ps:hover, .Pe:hover, .Pi:hover, .Pf:hover {background: #8DF} /* quote */
510 .Lm:hover, .Sk:hover                       {background: #BFF} /* spacing modifier */
511 .Mn:hover                                  {background: #CDE} /* modifier */
512 .Zs:hover                                  {background: #CED} /* space */
513 .Cc:hover, .Cf:hover                       {background: #DDD} /* control */
514 .Co:hover                                  {background: #A77} /* private */
515 .Xr:hover                                  {background: #FFF} /* reserved */
516 .Xi:hover                                  {background: #DDD} /* invalid */
517 .l0:hover                                  {background: #888}
518 .l1:hover                                  {background: #F88}
519 .l2:hover                                  {background: #FC8}
520 .l3:hover                                  {background: #FF8}
521 .l4:hover                                  {background: #CF8}
522 .l5:hover                                  {background: #8F8}
523 .u-l3:hover    {outline: 1px solid #080}
524 .u-l3.ex:hover {outline: 1px solid #8F0}
525 .u-l2:hover    {outline: 1px solid #800}
526 .u-l1:hover    {outline: 1px solid #F00}
527
528 /* key type colorization */
529
530 .c-sa,
531 .g1 {background: #BFE} /* cyan: info */
532 .c-na,
533 .g2 {background: #BFB} /* green: motion */
534 .g3 {background: #DFA} /* greenish: jump (g2+) */
535 .c-af,
536 .g4 {background: #FFA} /* yellow: command */
537 .c-eu,
538 .g5 {background: #FDA} /* orangish: open (g6-) */
539 .g6 {background: #FCA} /* orange: insert */
540 .c-as,
541 .g7 {background: #FCC} /* red: mode */
542 .c-an,
543 .g8 {background: #ECE} /* purple: visual (g7+) */
544 .c-oc,
545 .g9 {background: #CCF} /* blue: prefix */
546
547 .c-sa:hover,
548 .g1 a:hover, .g1[onclick]:hover {background: #5ED}
549 .c-na:hover,
550 .g2 a:hover, .g2[onclick]:hover {background: #7E7}
551 .g3 a:hover, .g3[onclick]:hover {background: #CE6}
552 .c-af:hover,
553 .g4 a:hover, .g4[onclick]:hover {background: #EE4}
554 .c-eu:hover,
555 .g5 a:hover, .g5[onclick]:hover {background: #FA6}
556 .g6 a:hover, .g6[onclick]:hover {background: #F97}
557 .c-as:hover,
558 .g7 a:hover, .g7[onclick]:hover {background: #F88}
559 .c-an:hover,
560 .g8 a:hover, .g8[onclick]:hover {background: #D9D}
561 .c-oc:hover,
562 .g9 a:hover, .g9[onclick]:hover {background: #99F}
563
564 .no {
565         background: #EEE; /* unassigned */
566 }
567 .keys td.ni {
568         border: 0;
569         padding: 1px; /* same size as borderlessless keys */
570         background: none;
571 }
572
573 dl.legend dt.more,
574 .keys td.more b {
575         text-shadow: #F20 0 0 0.1em;
576 }
577 dl.legend dt.more:hover,
578 .keys td.more:hover b {
579         text-shadow: #F20 0 0 0.5em, #FC0 0 0 0.2em;
580 }
581 dl.legend dt.ext,
582 .keys td.ext {
583         border-style: dashed;
584 }
585 dl.legend dt.new,
586 .keys td.new {
587         opacity: .6;
588 }
589
590 /* l/r help columns */
591
592 .help {
593         display: table;
594         width: 100%;
595 }
596 .help > * {
597         display: table-cell;
598         width: 20%;
599         vertical-align: top;
600 }
601
602 .left dl.legend {
603         margin-left: 6.4em; /* a bit over 6.2em to allow for borders+padding (border-sizing would work too) */
604 }
605 .left dl.legend dt {
606         margin-left: -6.4em; /* msie<=6 multiply this by two for some reason */
607         float: left;
608         clear: left;
609 }
610 .left dl.legend dd {
611         float: left; /* align next to dt (except msie<=7 does just the opposite) */
612 }
613 .right dl.legend {
614         margin-right: 6.4em;
615 }
616 .right dl.legend dt {
617         margin-right: -6.4em;
618         float: right;
619         clear: right;
620 }
621 .right dl.legend dd {
622         float: right;
623 }
624 .right {
625         text-align: right;
626 }
627
628 /* help/legend */
629
630 dl.legend dt {
631         margin: 0 0 1px; /* distinct keys */
632         height: auto; /* not key-height */
633         padding: 2px 0;
634 }
635 dl.legend dd {
636         margin: 3px 0.4em 0; /* align text (add dt border+padding height) */
637         padding: 0;
638 }
639
640 dl.legend-options dt {
641         background: #CCC;
642 }
643
644 ul.legend-set {
645         clear: right;
646         padding-top: 1ex;
647 }
648 ul.legend-set li {
649         margin: 6px 0; /* similar to dl legends */
650 }
651
652 .legend {
653         margin-top: 1em;
654 }
655 .legend table {
656         width: 100%;
657 }
658 .legend td {
659         padding: 0 0.2em;
660 }
661
662 /* page-specific */
663
664 #browser td > a {
665         text-decoration: none;
666 }
667 #browser td > a:active,
668 #browser td > a:hover {
669         text-decoration: underline;
670 }
671 #browser tr .aside {
672         font-size: 80%;
673         overflow: hidden;
674         height: 0;
675         -webkit-transition: all 1s ease-in;
676         -o-transition: all 1s ease-in;
677         -moz-transition: all 1s ease-in;
678         transition: height 1s ease-in;
679 }
680 #browser tr .aside p {
681         margin: 1ex 0;
682 }
683 #browser tr.target .aside,
684 #browser tr:target .aside {
685         height: auto;
686 }
687 #browser td.X {
688         white-space: nowrap; /* some browsers break on dashes */
689 }
690
691 #browser tr:target > td:first-of-type,
692 #browser tr.focus > td:first-of-type {
693         background: inherit;
694 }
695 #browser tr.focus > td {
696         border-bottom-color: #000;
697 }
698
699 form.aside {
700         position: absolute;
701         top: 3ex;
702         right: 1em;
703 }
704
705 .family-name {
706         font-variant: small-caps;
707 }
708
709 #index nav {
710         columns: 3;
711         -moz-columns: 3;
712         -webkit-columns: 3;
713 }
714 nav > .section {
715         break-inside: avoid;
716         -webkit-column-break-inside: avoid; /* webkit */
717         page-break-inside: avoid; /* moz */
718         overflow: hidden; /* webkit workaround */
719 }
720 #index nav a {
721         display: inline-block;
722         margin-top: 1em;
723 }
724
725 /* printing hints */
726
727 @page {
728         size: landscape;
729         margin: 0;
730 }
731
732 @media print {
733         ul.legend-set {display: none} /* current options only relevant on dynamic media */
734 }
735
736 /* terse optimisation */
737
738 @media (max-width: 79em) {
739         .keys td {
740                 position: relative; /* hides overflow */
741                 width: 4.5em;
742         }
743         .keys td b,
744         .keys .meta td b,
745         .keys .ctrl td b,
746         .keys .lead td b { /* leading chars always fit */
747                 position: absolute; /* background */
748                 right: 0; /* least overlap in corner */
749                 font-size: 250%;
750                 line-height: 2.5ex;
751                 opacity: .5;
752                 color: #FFF;
753         }
754
755         table.keys {
756                 width: 62.1em; /* 82.5em - 12 * Δtd(6.2em - 4.5em) */
757         }
758         .row2 {margin-left: 5.3em} /* 7em / Δtd(6em : 4.5em) */
759         .row3 {margin-left: 6em}   /* 8em / Δtd */
760         .row4 {margin-left: 7.5em} /* 10em / Δtd */
761
762         @media (max-width: 61em) {
763                 .keys td {
764                         width: 3em;
765                         height: 6.75ex; /* 3 lines */
766                         font-size: 80%;
767                 }
768                 .keys td b,
769                 .keys .meta td b,
770                 .keys .ctrl td b,
771                 .keys .lead td b {
772                         line-height: 4ex;
773                 }
774
775                 table.keys {
776                         width: 37em; /* (12 * td(3em + 6px) + 8em) * 80% */
777                 }
778                 .row2 {margin-left: 3.5em} /* 7em / Δtd(6em : 3em) */
779                 .row3 {margin-left: 4em}   /* 8em / Δtd */
780                 .row4 {margin-left: 5em}   /* 10em / Δtd */
781         }
782
783         @media (max-width: 42em) {
784                 /* flatten right legend column on mobile */
785                 .help > * {
786                         display: table-row;
787                         width: auto;
788                 }
789                 ul.legend-set {
790                         clear: left;
791                 }
792                 .right dl.legend {
793                         margin-right: 0;
794                         margin-left: 6.4em;
795                 }
796                 .right dl.legend dt {
797                         margin-right: 0;
798                         margin-left: -6.4em;
799                         float: left;
800                         clear: left;
801                 }
802                 .right dl.legend dd {
803                         float: left;
804                 }
805         }
806 }
807
808 /*
809 @media screen and (orientation: portrait) and (max-width: 62em) {
810         body table.keys,
811         #rows {
812                 margin-top: 1ex;
813                 transform: rotate(90deg);
814                 transform-origin: top left;
815                 width: 68em;
816                 height: 37em;
817                 margin-left: 40em;
818                 margin-bottom: 30em;
819                 font-size: 80%;
820         }
821 }
822 */