Skip to content

Commit

Permalink
Use more efficient selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickDeVries committed Nov 17, 2023
1 parent 52ba69f commit 40a1ae8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}
`,
Expand All @@ -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});
}
`,
Expand Down

0 comments on commit 40a1ae8

Please sign in to comment.