From 0df53daa4c2dbb09468e25309e23912a6fae14ee Mon Sep 17 00:00:00 2001 From: David Bolack Date: Wed, 22 May 2024 17:25:52 -0500 Subject: [PATCH] Another attempt at clearer classnames for the Table of contents snippet --- themes/V3/5ePHB/snippets.js | 8 ++++---- themes/V3/5ePHB/style.less | 23 +++++++++++------------ 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/themes/V3/5ePHB/snippets.js b/themes/V3/5ePHB/snippets.js index 2c18354b8..0aba0d11e 100644 --- a/themes/V3/5ePHB/snippets.js +++ b/themes/V3/5ePHB/snippets.js @@ -33,26 +33,26 @@ module.exports = [ { name : 'Include in ToC up to H3', icon : 'fas fa-dice-six', - gen : dedent `\n{{tocH3 + gen : dedent `\n{{tocAddH1H3 }}\n`, }, { name : 'Include in ToC up to H4', icon : 'fas fa-dice-four', - gen : dedent `\n{{tocH4 + gen : dedent `\n{{tocAddH1H4 }}\n`, }, { name : 'Include in ToC up to H5', icon : 'fas fa-dice-five', - gen : dedent `\n{{tocH5 + gen : dedent `\n{{tocAddH1H5 }}\n`, }, { name : 'Include in ToC up to H6', icon : 'fas fa-dice-six', - gen : dedent `\n{{tocH6 + gen : dedent `\n{{tocAddH1H6 }}\n`, } ] diff --git a/themes/V3/5ePHB/style.less b/themes/V3/5ePHB/style.less index 68ea5eda9..0f34585f7 100644 --- a/themes/V3/5ePHB/style.less +++ b/themes/V3/5ePHB/style.less @@ -798,19 +798,18 @@ h6, .noToC, .toc { --TOC: exclude; } -.tocH1 :is(h1) { --TOC: include; } -.tocH2 :is(h1, h2) {--TOC: include; } -.tocH3 :is(h1, h2, h3) {--TOC: include; } -.tocH4 :is(h1, h2, h3, h4) {--TOC: include; } -.tocH5 :is(h1, h2, h3, h4, h5) {--TOC: include; } -.tocH6 :is(h1, h2, h3, h4, h5, h6) {--TOC: include; } +.tocAddH1H2 :is(h1, h2) {--TOC: include; } +.tocAddH1H3 :is(h1, h2, h3) {--TOC: include; } +.tocAddH1H4 :is(h1, h2, h3, h4) {--TOC: include; } +.tocAddH1H5 :is(h1, h2, h3, h4, h5) {--TOC: include; } +.tocAddH1H6 :is(h1, h2, h3, h4, h5, h6) {--TOC: include; } -.tocIncludeH1 h1 {--TOC: include; } -.tocIncludeH2 h2 {--TOC: include; } -.tocIncludeH3 h3 {--TOC: include; } -.tocIncludeH4 h4 {--TOC: include; } -.tocIncludeH5 h5 {--TOC: include; } -.tocIncludeH6 h6 {--TOC: include; } +.tocAddH1 h1 {--TOC: include; } +.tocAddH2 h2 {--TOC: include; } +.tocAddH3 h3 {--TOC: include; } +.tocAddH4 h4 {--TOC: include; } +.tocAddH5 h5 {--TOC: include; } +.tocAddH6 h6 {--TOC: include; } .page { &:has(.toc)::after { display : none; }