fix: hovering and is-active should not be overwritten

add the snippets to docs

close #6
This commit is contained in:
Mara 2025-09-22 18:12:01 +02:00
parent 494eaa0fb9
commit 78de01f17e
2 changed files with 14 additions and 10 deletions

View file

@ -31,4 +31,17 @@ To remove the border when collapsed, add just this in a separate CSS snippet:
.tree-item.nav-folder[data-path="${folderName}"] {
--nav-indentation-guide-color: var(${color});
}
```
```
# Adjust hovering and is active colors
```css
.nav-file-title[class*="is-active"][data-path^="${folderName}"],
.nav-folder-title[data-path^="${folderName}"]:hover,
.nav-file-title[data-path^="${folderName}"]:hover,
.nav-folder-title[class*="is-active"][data-path^="${folderName}"] {
color: var(${color}) !important;
background-color: var(${bg}) !important;
filter: saturate(var(--spf-saturate-hover));
}
```

View file

@ -36,15 +36,6 @@ export function convertToCSS(folderName: string, prefix: Prefix, template: strin
background-color: var(${variableNames.bg}) !important;
border-radius: var(--spf-FolderRadius);
}
.nav-file-title[class*="is-active"][data-path^="${folderName}"],
.nav-folder-title[data-path^="${folderName}"]:hover,
.nav-file-title[data-path^="${folderName}"]:hover,
.nav-folder-title[class*="is-active"][data-path^="${folderName}"] {
color: var(${variableNames.color}) !important;
background-color: var(${variableNames.bg}) !important;
filter: saturate(var(--spf-saturate-hover));
}
${dedent(remplaceTemplate(template, folderName, variableNames.bg, variableNames.color))}