From 3ffdb3431275aca6c45932021435a89b9a5e9a0a Mon Sep 17 00:00:00 2001 From: David Bolack Date: Tue, 11 Feb 2025 14:45:39 -0600 Subject: [PATCH] Tweaks in response to CC comments --- themes/V3/5ePHB/style.less | 101 ++++++++++++++++++++++++++++++++++++- themes/V3/Blank/style.less | 11 ---- 2 files changed, 99 insertions(+), 13 deletions(-) diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 55f89c670..9e2ce5064 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -797,10 +797,85 @@ // * TABLE OF CONTENTS // *****************************/ -// Default Exclusions -// Anything not excluded is included, default Headers are H1, H2, and H3. +// Additional Default Exclusions .monster { --TOC: exclude; } +.page:has(.partCover) { + --TOC: exclude; + & h1 { + --TOC: include; + } + } + +.page { + &:has(.toc)::after { display : none; } + .toc { + -webkit-column-break-inside : avoid; + page-break-inside : avoid; + break-inside : avoid; + h1 { + margin-bottom : 0.3cm; + text-align : center; + } + a { + display : inline; + color : inherit; + text-decoration : none; + &:hover { text-decoration : underline; } + } + h4 { + margin-top : 0.2cm; + line-height : 0.4cm; + & + ul li { line-height : 1.2em; } + } + ul { + padding-left : 0; + margin-top : 0; + list-style-type : none; + a { + display : flex; + flex-flow : row nowrap; + justify-content : space-between; + width : 100%; + } + li + li h3 { + margin-top : 0.26cm; + line-height : 1em; + } + h3 span:first-child::after { border : none; } + span { + display : contents; + &:first-child::after { + bottom : 0.08cm; + flex : 1; + margin-right : 0.16cm; + margin-bottom : 0.08cm; + margin-left : 0.08cm; /* Spacing before dot leaders */ + content : ''; + border-bottom : 0.05cm dotted #000000; + } + &:last-child { + display : inline-block; + align-self : flex-end; + font-family : 'BookInsanityRemake'; + font-size : 0.34cm; + font-weight : normal; + color : #000000; + } + } + ul { /* List indent */ + margin-left : 1em; + } + } + &.wide { + .useColumns(0.96, @fillMode: balance); + } + } + .toc.wide li { + break-inside: auto; + } +} + // ***************************** // * DEFINITION LISTS // *****************************/ @@ -862,3 +937,25 @@ } } } + +// ***************************** +// * INDEX +// *****************************/ +.page { + .index { + font-size : 0.218cm; + + ul ul { margin : 0; } + + ul { + padding-left : 0; + text-indent : 0; + list-style-type : none; + } + + & > ul > li { + padding-left : 1.5em; + text-indent : -1.5em; + } + } +} diff --git a/themes/V3/Blank/style.less b/themes/V3/Blank/style.less index ded7370ba..c3a792b16 100644 --- a/themes/V3/Blank/style.less +++ b/themes/V3/Blank/style.less @@ -513,7 +513,6 @@ body { counter-reset : page-numbers 0; } // *****************************/ .page { .index { - font-size : 0.218cm; ul ul { margin : 0; } @@ -542,7 +541,6 @@ h6, .page:has(.frontCover), .page:has(.backCover), .page:has(.insideCover), -.monster, .noToC, .toc { --TOC: exclude; } @@ -559,13 +557,6 @@ h6, .tocIncludeH5 h5 {--TOC: include; } .tocIncludeH6 h6 {--TOC: include; } -.page:has(.partCover) { - --TOC: exclude; - & h1 { - --TOC: include; - } - } - .page { &:has(.toc)::after { display : none; } .toc { @@ -616,10 +607,8 @@ h6, &:last-child { display : inline-block; align-self : flex-end; - font-family : 'BookInsanityRemake'; font-size : 0.34cm; font-weight : normal; - color : #000000; } } ul { /* List indent */