From 40a1ae856820d851ec7e6e4d0ccf14a4451af48d Mon Sep 17 00:00:00 2001 From: Patrick DeVries Date: Thu, 16 Nov 2023 22:10:24 -0600 Subject: [PATCH] Use more efficient selectors --- src/main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index aef007c..a9f6e3c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -27,7 +27,7 @@ const onSettingsChange = () => { ${Array.from( { length: maxDepth }, (_, i) => ` - ${Array.from({ length: i + 1 }, () => '.block-children').join(' ')}-left-border::after { + .ls-block[level="${i + 1}"] .block-children-left-border::after { background-color: var(--block-thread-color-level-${(i % colors.length) + 1}); } `, @@ -37,11 +37,11 @@ const onSettingsChange = () => { const threadColorString = Array.from( { length: maxDepth }, (_, i) => ` - ${Array.from({ length: i + 1 }, () => '.block-children').join(' ')} { + .ls-block[level="${i + 1}"] .block-children { border-left-color: var(--block-thread-color-level-${(i % colors.length) + 1}); } - ${Array.from({ length: i + 1 }, () => '.block-children').join(' ')}-left-border::after { + .ls-block[level="${i + 1}"] .block-children-left-border::after { background-color: var(--block-thread-color-level-${(i % colors.length) + 1}); } `,