From 2d26e7cd072ea7906af6b223f36043b70fb90217 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 24 Oct 2022 19:29:59 -0400 Subject: [PATCH] Handle spacing at bottom of side-by-side tables --- themes/V3/5ePHB/style.less | 12 ++++++------ themes/V3/Blank/style.less | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index b6bad7d6d..9b85a1cee 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -183,7 +183,7 @@ body { } } * + h3 { - margin-top : 0.13cm; //(0.3 - 0.17) + margin-top : 0.155cm; //(0.325 - 0.17) } h4{ //margin-top : -0.02cm; //Font is misaligned. Shift up slightly @@ -195,7 +195,7 @@ body { } } * + h4 { - margin-top : 0.21cm; //(0.3 - 0.09) + margin-top : 0.235cm; //(0.325 - 0.09) } h5{ //margin-top : -0.02cm; //Font is misaligned. Shift up slightly @@ -211,9 +211,6 @@ body { //***************************** // * TABLE // *****************************/ - div:has(table) { - display:block; // Inline-block divs tend to add ~5px when containing tables. Block Divs are fine (but don't work for everything else) - } table{ .useSansSerif(); width : 100%; @@ -243,6 +240,9 @@ body { } } } + div table:has(~table) { // Divs with side-by-side tables add an extra line + margin-bottom: -0.325cm; // of vertical space at bottom. This works around it. + } //***************************** // * NOTE // *****************************/ @@ -790,7 +790,7 @@ body { // * WIDE // *****************************/ :where(.page) .wide{ - margin-bottom : 0.3cm; + margin-bottom : 0.325cm; } :where(.page) h1 + *{ diff --git a/themes/V3/Blank/style.less b/themes/V3/Blank/style.less index aa5f6fcca..3e834ff9f 100644 --- a/themes/V3/Blank/style.less +++ b/themes/V3/Blank/style.less @@ -78,7 +78,7 @@ body { z-index : -1; } :not(:where(.wide,.columnSplit,.blank,hr,h1)) + :where(h2,h3,h4,h5,h6,table,dl,.block) { - margin-top : 0.3cm; //NOTE: MAKE ALL MARGINS TOP-ONLY FOR BEST RESULTS WITH COLUMN BREAKS. USE * + * STYLE SELECTORS + margin-top : 0.325cm; //NOTE: MAKE ALL MARGINS TOP-ONLY FOR BEST RESULTS WITH COLUMN BREAKS. USE * + * STYLE SELECTORS } :is(h1,h3,h3,h4,h5,h6) + * {