style: common setup for floating tables
[sheet.git] / base.css
index d726d0ee93e09bc1da0dcba8247ea5640dc8b10a..bfce8a2568bc3164dca2ae7364c8069e5be20861 100644 (file)
--- a/base.css
+++ b/base.css
@@ -10,6 +10,7 @@ body {
        background: #FFF;
        color: #000;
        font-size: 90%;
+       text-align: center;
 }
 a, a:visited {
        color: #000;
@@ -23,12 +24,11 @@ a:active, a:hover {
 /* common sections */
 
 h1, h2 {
-       text-align: center;
        font-size: 200%;
        margin: 0;
 }
 h2, caption {
-       font-size: 125%;
+       font-size: 110%;
        font-weight: bold;
 }
 caption {
@@ -42,15 +42,20 @@ hr {
        margin: 0;
 }
 
-.diinfo h2 {
+.section h2 {
        margin: 0 1ex;
        clear: both;
-       font-size: 110%;
-       text-align: left;
+}
+.section table {
+       float: left;
+       position: relative; /* prevents buggy hovering in table if caption present in gecko */
+       margin: 1ex 1ex 2ex;
+}
+#charset .section table {
+       margin: -0.5ex 0 1ex; /* headers provide sufficient spacing already */
 }
 
 p {
-       text-align: center;
        margin: 1ex 0 1em;
 }
 p.aside {
@@ -69,6 +74,11 @@ ul {
        list-style: none;
 }
 
+#source pre {
+       display: inline-block;
+       text-align: left;
+}
+
 /* "keyboard" (list of keys) */
 
 ul#rows {margin-top: -5ex} /* top (esc) row fits besides header */
@@ -91,6 +101,14 @@ li.row ul ul {
 h3      {display: none} /* semantic details (non-css/js) */
 li.mode {display: none} /* initially hidden (only show interactively (js)) */
 
+#rows {
+       width: 82.5em; /*       12 * (2px + 1px + 6.2em + 1px + 2px) + 8em*/
+       padding-right: 72px;
+}
+#rows > li {
+       margin-right: -72px;
+}
+
 /* individual keys */
 
 dl.legend dt,
@@ -136,56 +154,56 @@ ul.keys.ctrl li b small { /* meta key indicator */
        font-weight: normal; /* nice and subtle */
 }
 
-/* character table */
+/* tables */
 
-li table {
-       float: left;
-       position: relative; /* prevents buggy hovering if table-caption present in gecko */
-}
-
-table.glyphs {
+table {
        border-collapse: collapse;
 }
-.glyphs thead th, .glyphs td {
-       text-align: center;
-       width: 1.6em; /* regular interval */
-}
-.glyphs th, .glyphs td {
+th, td {
        border-color: #778;
        border: 1px solid #888;
        background: #DDD;
 }
+thead th, td {
+       text-align: center;
+}
+
+/* character table */
+
+.glyphs thead th, .glyphs td {
+       width: 1.6em; /* regular interval */
+}
 .glyphs tbody td {
        font-size: 112%;
 }
+.glyphs.big tbody td {
+       font-size: 200%;
+}
 .glyphs .glyphs {
        margin: 0.5ex 0;
 }
 .glyphs .glyphs td {
        font-size: 100%;
 }
-.glyphs.charmap tbody td {
-       font-size: 200%;
-}
 
 /* table headers */
 
-.glyphs th,
-.glyphs thead td {
+th,
+thead td {
        border: 0;
        background: transparent !important;
 }
 .glyphs thead td {
        width: auto; /* no glyph cells in header */
 }
-.glyphs th {
+th {
        padding: 0 0.2em;
 }
-.diinfo .glyphs th {
+.diinfo th {
        font-size: 50%; /* mostly insignificant here */
        font-weight: normal;
 }
-.diinfo .glyphs tbody th {
+.diinfo tbody th {
        text-align: right; /* variable width so keep near cells */
        padding: 0 0.5em;
 }
@@ -223,11 +241,6 @@ table.glyphs.dimap {
        overflow: hidden;
 }
 
-.diinfo table.glyphs {
-       margin: 1ex 1ex 2ex;
-       float: left;
-}
-
 /* glyph cell overlay (digraph labels) */
 
 .glyphs.dilabel td {
@@ -316,6 +329,17 @@ td.c-aa       {background: #E3E8FF}
 td.c-sa       {background: #DFF}
 td.c-na       {background: #DFD}
 
+/* code syntax */
+.sy-comment    { color: #888 }
+.sy-constant   { color: #008 }
+.sy-type,
+.sy-identifier { color: #804 }
+.sy-statement  { }
+.sy-preProc    { }
+.sy-special    { color: #408 }
+.sy-error      { font-weight: bold; background-color: #F00; color: #FFF }
+.sy-todo       { background-color: #FF0 }
+
 /* hover effects */
 td.di-d,
 td.X:hover {cursor: help}
@@ -366,6 +390,8 @@ td.di-a:hover                                      {background: #CF8}
 .mv {background: #ECE}   /* visual mode */
 .me {background: #CCF}   /* key mode */
 
+.pm[onclick]:hover {background: #7E7}
+.po[onclick]:hover {background: #CE6}
 .ci[onclick]:hover {background: #5ED}
 .mi[onclick]:hover {background: #F97}
 .mo[onclick]:hover {background: #F88}