charset: center table captions on glyph cells only
authorMischa POSLAWSKY <perl@shiar.org>
Fri, 16 Mar 2018 20:31:46 +0000 (21:31 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 21 Apr 2018 16:29:28 +0000 (18:29 +0200)
Assume all tables with class glyphs have a header column which is styled
outside the rest of the body, so offset this width to appear centered.

base.css

index 919f64e889db570613b097b39c066eb5a533c7fe..8703c83f9f59bb945e80581bb154525a34d01f87 100644 (file)
--- a/base.css
+++ b/base.css
@@ -33,6 +33,8 @@ caption aside {
        margin-left: 1ex;
        font-weight: normal;
        display: inline;
+       font-size: 91%; /* 100% */
+       margin-top: .3ex; /* align with 110% baseline */
 }
 
 hr {
@@ -276,6 +278,10 @@ thead td {
 .glyphs thead td {
        width: auto; /* no glyph cells in header */
 }
+.glyphs caption {
+       margin-left: 2.2em; /* 1ex + offset head column (1.6em + 0.4em) / 110% */
+               /* adjusted insignificant -.2em to fit wide contents on /charset/mac */
+}
 th {
        padding: 0 0.2em;
 }