From d9c20cebfe817b47e12a1d8d6dec9044b957f642 Mon Sep 17 00:00:00 2001 From: Scott Tolksdorf Date: Mon, 18 Jan 2016 23:23:42 -0500 Subject: [PATCH] First attempt at using a double hr to indicate full width elements --- .../editor/snippets/classtable.gen.js | 3 +- client/homebrew/phbStyle/phb.style.less | 53 ++++++++++++------- shared/naturalCrit/styles/reset.less | 1 - 3 files changed, 35 insertions(+), 22 deletions(-) diff --git a/client/homebrew/editor/snippets/classtable.gen.js b/client/homebrew/editor/snippets/classtable.gen.js index b07097f..a98e3be 100644 --- a/client/homebrew/editor/snippets/classtable.gen.js +++ b/client/homebrew/editor/snippets/classtable.gen.js @@ -50,12 +50,13 @@ module.exports = function(classname){ }).join(' | ') } + var extraWide = (_.random(0,1) === 0) ? "" : "___\n"; var cantrips = 3; var spells = 1; var slots = 2; return "##### The " + classname + "\n" + - "___\n" + + "___\n" + extraWide + "| Level | Proficiency Bonus | Features | Cantrips Known | Spells Known | 1st | 2nd | 3rd | 4th | 5th | 6th | 7th | 8th | 9th |\n"+ "|:---:|:---:|:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|\n" + _.map(["1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th", "11th", "12th", "13th", "14th", "15th", "16th", "17th", "18th", "19th", "20th"],function(levelName, level){ diff --git a/client/homebrew/phbStyle/phb.style.less b/client/homebrew/phbStyle/phb.style.less index ec8c4ff..669fe25 100644 --- a/client/homebrew/phbStyle/phb.style.less +++ b/client/homebrew/phbStyle/phb.style.less @@ -1,3 +1,4 @@ + @import (less) 'shared/naturalCrit/styles/reset.less'; @import (less) './client/homebrew/phbStyle/phb.fonts.css'; @import (less) './client/homebrew/phbStyle/phb.assets.less'; @@ -19,29 +20,33 @@ font-weight : 800; } } -.phb{ - position : relative; - z-index : 15; - box-sizing : border-box; - overflow : hidden; - height : 279.4mm; - width : 215.9mm; - padding : 1.0cm 1.7cm; - padding-bottom : 2.0cm; +.useColumns(){ column-count : 2; column-fill : auto; column-gap : 1cm; column-width : 8cm; - background-color : @background; - background-image : @backgroundImage; - font-family : BookSanity; - font-size : 9pt; -webkit-column-count : 2; -moz-column-count : 2; -webkit-column-width : 8cm; -moz-column-width : 8cm; -webkit-column-gap : 1cm; - text-rendering : optimizeLegibility; + -moz-column-gap : 1cm; +} +.phb{ + .useColumns(); + position : relative; + z-index : 15; + box-sizing : border-box; + overflow : hidden; + height : 279.4mm; + width : 215.9mm; + padding : 1.0cm 1.7cm; + padding-bottom : 2.0cm; + background-color : @background; + background-image : @backgroundImage; + font-family : BookSanity; + font-size : 9pt; + text-rendering : optimizeLegibility; //***************************** // * BASE // *****************************/ @@ -82,6 +87,7 @@ column-span : all; font-size : 28pt; -webkit-column-span : all; + -moz-column-span : all; &+p::first-letter{ float : left; margin-top : 0.4em; @@ -242,15 +248,18 @@ left : -3px; } } + //Full Width + hr+hr+blockquote{ + .useColumns(); + } //***************************** // * FULL CLASS TABLE // *****************************/ - h5+hr+table{ + hr+table{ margin-top : -5px; margin-bottom : 50px; padding-top : 10px; border-collapse : separate; - column-span : all; background-color : white; border : initial; border-image-outset : 37px 17px; @@ -258,7 +267,6 @@ border-image-slice : 150 200 150 200; border-image-source : @frameBorderImage; border-image-width : 47px; - -webkit-column-span : all; } //***************************** // * FOOTER @@ -317,22 +325,27 @@ text-indent : -1em; list-style-type : none; } + hr+hr+table, hr+hr+blockquote{ + column-span : all; + -webkit-column-span : all; + -moz-column-span : all; + } //Column Break pre{ visibility : hidden; -webkit-column-break-after : always; + break-after : always; + -moz-column-break-after : always; } //Avoid breaking up p,ul,blockquote,table{ z-index : 15; -webkit-column-break-inside : avoid; -moz-column-break-inside : avoid; - -o-column-break-inside : avoid; - -ms-column-break-inside : avoid; column-break-inside : avoid; } //Better spacing for spell blocks h4+p+hr+ul{ - margin-top:-0.5em + margin-top : -0.5em } } \ No newline at end of file diff --git a/shared/naturalCrit/styles/reset.less b/shared/naturalCrit/styles/reset.less index b0854aa..bdcdb83 100644 --- a/shared/naturalCrit/styles/reset.less +++ b/shared/naturalCrit/styles/reset.less @@ -1,2 +1 @@ -/* Eric Meyer's Reset CSS v2.0 - http://cssreset.com */ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0} \ No newline at end of file