From: Dan Allen Date: Sat, 12 Dec 2020 09:56:12 +0000 (-0700) Subject: use top-oriented approach to add margin to table; remove top margin on table when... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e66421a5779474bb74a1db75f75a18d5c8c27ab3;p=eg-antora.git use top-oriented approach to add margin to table; remove top margin on table when first child in AsciiDoc table cell --- diff --git a/src/css/doc.css b/src/css/doc.css index d974fa7..9cbdef4 100644 --- a/src/css/doc.css +++ b/src/css/doc.css @@ -193,26 +193,30 @@ .doc table.tableblock { font-size: calc(15 / var(--rem-base) * 1rem); - margin: 2rem 0; - /* enable table-layout: fixed if you want the table width to be enforced strictly */ - /* alternative is to wrap table in div and set overflow-x: auto on the wrapper */ - /* table-layout: fixed; */ + margin: 1.5rem 0 0; +} + +.doc table.tableblock + * { + margin-top: 1.5rem; +} + +.doc td.tableblock > .content > :first-child { + margin-top: 0; +} + +.doc table.tableblock th, +.doc table.tableblock td { + padding: 0.5rem; } .doc table.tableblock thead th { border-bottom: 2.5px solid var(--table-border-color); - padding: 0.5rem; } .doc table.tableblock td, .doc table.tableblock > :not(thead) th { border-top: 1px solid var(--table-border-color); border-bottom: 1px solid var(--table-border-color); - padding: 0.5rem; -} - -.doc td.tableblock > .content > :first-child { - margin-top: 0; } .doc .tableblock p {