From 0e5ed35b6cdbbac893b6c78a97a7150027552dbb Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 30 Aug 2021 13:34:12 -0400 Subject: [PATCH] Fixing drop caps inside `columnWrap` --- .../homebrew/pages/homePage/welcome_msg_v3.md | 14 +--- server.js | 5 +- themes/5ePhb.style.less | 74 +++++++++++-------- 3 files changed, 51 insertions(+), 42 deletions(-) diff --git a/client/homebrew/pages/homePage/welcome_msg_v3.md b/client/homebrew/pages/homePage/welcome_msg_v3.md index 471932ed1..553d7aa2e 100644 --- a/client/homebrew/pages/homePage/welcome_msg_v3.md +++ b/client/homebrew/pages/homePage/welcome_msg_v3.md @@ -4,7 +4,7 @@ } .page { - padding-bottom : 1.6cm; + padding-bottom : 1.3cm; } @@ -37,7 +37,10 @@ After clicking the "Print" item in the navbar a new page will open and a print d If you want to save ink or have a monochrome printer, add the {{fas,fa-tint}} **Ink Friendly** snippet to your brew before you print + +
1
+
PART 1 | FANCINESS
\column @@ -75,15 +78,6 @@ If you'd like to credit The Homebrewery in your brew, I'd be flattered! Just ref If you are looking for more 5e Homebrew resources check out [r/UnearthedArcana](https://www.reddit.com/r/UnearthedArcana/) and their list of useful resources [here](https://www.reddit.com/r/UnearthedArcana/comments/3uwxx9/resources_open_to_the_community/). - - - -
1
-
PART 1 | FANCINESS
- - - - \page ## Markdown+ diff --git a/server.js b/server.js index fbf741ec0..2f1564b20 100644 --- a/server.js +++ b/server.js @@ -134,8 +134,9 @@ app.get('/v3_preview', async (req, res, next)=>{ //Changelog page app.get('/changelog', async (req, res, next)=>{ const brew = { - title : 'Changelog', - text : changelogText + title : 'Changelog', + text : changelogText, + renderer : 'V3' }; req.brew = brew; return next(); diff --git a/themes/5ePhb.style.less b/themes/5ePhb.style.less index a057fbabb..8de832793 100644 --- a/themes/5ePhb.style.less +++ b/themes/5ePhb.style.less @@ -48,6 +48,8 @@ body { } .columnWrapper{ max-height : 100%; + column-span : all; + columns : inherit; } .page{ .useColumns(); @@ -71,10 +73,13 @@ body { // *****************************/ p{ overflow-wrap : break-word; //TODO: MAKE ALL MARGINS TOP-ONLY. USE * + * STYLE SELECTORS - margin-bottom : 0.8em; + display : block; line-height : 1.3em; + &+* { + margin-top : 0.27cm; + } &+p{ - margin-top : -0.8em; + margin-top : 0; } } ul{ @@ -124,50 +129,49 @@ body { color : @headerText; } h1{ - margin-bottom : 0.18cm; + margin-bottom : 0.18cm; //Margin-bottom only because this is WIDE column-span : all; font-size : 0.89cm; -webkit-column-span : all; -moz-column-span : all; &+p::first-letter{ - float : left; - font-family : SolberaImitationRemake; - line-height : 0.8em; - font-size: 3.5cm; - padding-left: 40px; - margin-left: -40px; - padding-top:10px; - margin-top:-8px; - padding-bottom:10px; - margin-bottom:-20px; - background-image: linear-gradient(-45deg, #322814, #998250, #322814); - background-clip: text; - -webkit-background-clip: text; - color: rgba(0, 0, 0, 0); + float : left; + font-family : SolberaImitationRemake; + line-height : 1em; + font-size : 3.5cm; + padding-left : 40px; //Allow background color to extend into margins + margin-left : -40px; + margin-top :-0.3cm; + padding-bottom :2px; + margin-bottom :-20px; + background-image : linear-gradient(-45deg, #322814, #998250, #322814); + background-clip : text; + -webkit-background-clip : text; + color : rgba(0, 0, 0, 0); } &+p::first-line{ font-variant : small-caps; } } h2{ - margin-top : 0px; - margin-bottom : 0.05cm; + //margin-top : 0px; //Font is misaligned. Shift up slightly + //margin-bottom : 0.05cm; font-size : 0.75cm; } h3{ - margin-top : -0.1cm; - margin-bottom : 0.1cm; + //margin-top : -0.1cm; //Font is misaligned. Shift up slightly + //margin-bottom : 0.1cm; font-size : 0.575cm; border-bottom : 2px solid @headerUnderline; } h4{ - margin-top : -0.02cm; - margin-bottom : 0.02cm; + //margin-top : -0.02cm; //Font is misaligned. Shift up slightly + //margin-bottom : 0.02cm; font-size : 0.458cm; } h5{ - margin-top : -0.02cm; - margin-bottom : 0.02cm; + //margin-top : -0.02cm; //Font is misaligned. Shift up slightly + //margin-bottom : 0.02cm; font-family : ScalySansSmallCapsRemake; font-size : 0.423cm; font-weight : 900; @@ -480,6 +484,9 @@ body { break-after : always; -moz-column-break-after : always; break-before : column; + &+* { + margin-top: 0; + } } //Avoid breaking up blockquote,table{ @@ -541,6 +548,10 @@ body { -webkit-column-span : all; -moz-column-span : all; display : block; + margin-bottom : 0.34cm; + &+* { + margin-top : 0; + } } //***************************** // * CLASS TABLE @@ -659,15 +670,18 @@ body { line-height : 1.3em; padding-left : 1em; text-indent : -1em; + & + * { + margin-top : 0.28cm; + } + & + dl { + margin-top : 0; + } } dl + * { - margin-top : 0.28cm; - } - dl + p { - margin-top : 0.5em; + margin-top : 0.17cm; } p + dl { - margin-top: -0.5em; + margin-top: 0.17cm; } dt { display : inline;