From 4bebdfda798c0b505e987347f24c804914a0af80 Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Sat, 18 Sep 2021 00:37:21 -0400 Subject: [PATCH] Allow wide classTables to bleed into top margin --- themes/5ePhb.style.less | 92 ++++++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 42 deletions(-) diff --git a/themes/5ePhb.style.less b/themes/5ePhb.style.less index 19492ebef..e81ab8fef 100644 --- a/themes/5ePhb.style.less +++ b/themes/5ePhb.style.less @@ -600,49 +600,57 @@ body { //***************************** // * CLASS TABLE // *****************************/ -.page .classTable{ - th[colspan]:not([rowspan]) { - white-space : nowrap; +.page { + * + .classTable.frame { + margin-top : 0.66cm; } - &.frame { - margin-top : 0.66cm; - margin-bottom : 1.05cm; - margin-left : -0.1cm; - margin-right : -0.1cm; - width : calc(100% + 0.2cm); - border-collapse : separate; - background-color : white; - border : initial; - border-style : solid; - border-image-outset : 0.55cm 0.3cm; - border-image-repeat : stretch; - border-image-slice : 200; - border-image-source : @frameBorderImage; - border-image-width : 47px; - } - &.decoration { - transform-style : preserve-3d; - } - &.decoration::before { - content :''; - position : absolute; - background-image : @classTableDecoration; - background-size : contain; - background-repeat : space; - width : 7.75cm; - height : calc(100% + 3.3cm); - top : 50%; - left : 50%; - transform : translateY(-50%) translateX(-50%) translateZ(-1px); - filter : drop-shadow(0px 0px 1px #C8C5C080) - } - &.decoration.wide::before { - width : calc(100% + 3.3cm); - height : 7.75cm; - top : calc(50% + 0.4cm); - } - h5 + table{ - margin-top : 0.2cm; + .classTable{ + th[colspan]:not([rowspan]) { + white-space : nowrap; + } + &.frame { + margin-top : 0.66cm; + &.wide { // Allow top border to move into margin if + margin-top : 0; + } + margin-bottom : 1.05cm; + margin-left : -0.1cm; + margin-right : -0.1cm; + width : calc(100% + 0.2cm); + border-collapse : separate; + background-color : white; + border : initial; + border-style : solid; + border-image-outset : 0.4cm 0.3cm; + border-image-repeat : stretch; + border-image-slice : 200; + border-image-source : @frameBorderImage; + border-image-width : 47px; + } + &.decoration { + transform-style : preserve-3d; + } + &.decoration::before { + content :''; + position : absolute; + background-image : @classTableDecoration; + background-size : contain; + background-repeat : space; + width : 7.75cm; + height : calc(100% + 3.3cm); + top : 50%; + left : 50%; + transform : translateY(-50%) translateX(-50%) translateZ(-1px); + filter : drop-shadow(0px 0px 1px #C8C5C080) + } + &.decoration.wide::before { + width : calc(100% + 3.3cm); + height : 7.75cm; + top : calc(50% + 0.4cm); + } + h5 + table{ + margin-top : 0.2cm; + } } } //*****************************