From 2192c91acb90c32699e38c88572b56423e7aaa8b Mon Sep 17 00:00:00 2001 From: Trevor Buckner Date: Mon, 13 Sep 2021 22:40:36 -0400 Subject: [PATCH] Change .block min-width to width so users can resize position:absolute elements easier. --- .../editor/snippetbar/snippets/snippets.js | 4 +- themes/5ePhb.style.less | 37 +++++++++++-------- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/client/homebrew/editor/snippetbar/snippets/snippets.js b/client/homebrew/editor/snippetbar/snippets/snippets.js index 3ee91906e..d3ef7bce7 100644 --- a/client/homebrew/editor/snippetbar/snippets/snippets.js +++ b/client/homebrew/editor/snippetbar/snippets/snippets.js @@ -124,7 +124,7 @@ module.exports = [ gen : dedent` ![cat warrior](https://s-media-cache-ak0.pinimg.com/736x/4a/81/79/4a8179462cfdf39054a418efd4cb743e.jpg) {width:325px,mix-blend-mode:multiply} - {{artist,position:relative,top:-230px,left:-100px,margin-bottom:-30px + {{artist,position:relative,top:-230px,left:10px,margin-bottom:-30px ##### Cat Warrior [Kyoung Hwan Kim](https://www.artstation.com/tahra) }}` @@ -135,7 +135,7 @@ module.exports = [ gen : dedent` ![homebrew mug](http://i.imgur.com/hMna6G0.png) {position:absolute,top:50px,right:30px,width:280px} - {{artist,top:90px,right:30px + {{artist,top:80px,right:30px ##### Homebrew Mug [naturalcrit](https://homebrew.naturalcrit.com) }}` diff --git a/themes/5ePhb.style.less b/themes/5ePhb.style.less index 431bed5ea..049fdb6e8 100644 --- a/themes/5ePhb.style.less +++ b/themes/5ePhb.style.less @@ -285,6 +285,7 @@ body { /* Arist Credit */ .artist { position : absolute; + width : auto; text-align : center; font-family : WalterTurncoat; font-size : 0.27cm; @@ -309,21 +310,21 @@ body { /* Watermark */ .watermark { - display : grid !important; - place-items : center; + display : grid !important; + place-items : center; justify-content : center; - position : absolute; - top : 0; - left : 0; - width : 100%; - height : 100%; - font-size : 120px; + position : absolute; + top : 0; + left : 0; + width : 100%; + height : 100%; + font-size : 120px; text-transform : uppercase; - color : black; - mix-blend-mode : overlay; - opacity : 30%; - transform : rotate(-45deg); - z-index : 500; + color : black; + mix-blend-mode : overlay; + opacity : 30%; + transform : rotate(-45deg); + z-index : 500; p { margin-bottom : none; } @@ -375,8 +376,9 @@ body { background-attachment : fixed; filter : drop-shadow(1px 4px 6px #888); padding : 4px 2px; - margin-left : -6px; - margin-right : -6px; + margin-left : -0.16cm; + margin-right : -0.16cm; + width : calc(100% + 0.32cm); } position : relative; @@ -609,6 +611,7 @@ body { 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; @@ -724,7 +727,9 @@ body { .block { break-inside : avoid; display : inline-block; - min-width : 100%; + .page :where(&) { + width : 100%; + } //-webkit-transform : translateZ(0); //Prevents shadows from breaking across columns } .inline-block {