Akifyss / obsidian-border

A theme for obsidian.md
MIT License
1.34k stars 47 forks source link

Fix: add colors to Bookmark icons #280

Closed ms3056 closed 3 months ago

ms3056 commented 3 months ago

Your colorful folders work great with the File Explorer. Add the following code to enable the same for bookmarks. Obviously you could mix this in with the file explorer code - I am currently using this as a snippet.

body:not(.file-icon-remove) .tree-item:nth-child(8n+2) {
    --colorful-folder-color: var(--color-red);
}

body:not(.file-icon-remove) .tree-item:nth-child(8n+3) {
    --colorful-folder-color: var(--color-orange);
}

body:not(.file-icon-remove) .tree-item:nth-child(8n+4) {
    --colorful-folder-color: var(--color-yellow);
}

body:not(.file-icon-remove) .tree-item:nth-child(8n+5) {
    --colorful-folder-color: var(--color-green);
}

body:not(.file-icon-remove) .tree-item:nth-child(8n+6) {
    --colorful-folder-color: var(--color-cyan);
}

body:not(.file-icon-remove) .tree-item:nth-child(8n+7) {
    --colorful-folder-color: var(--color-blue);
}

body:not(.file-icon-remove) .tree-item:nth-child(8n+8) {
    --colorful-folder-color: var(--color-purple);
}

body:not(.file-icon-remove) .tree-item:nth-child(8n+9) {
    --colorful-folder-color: var(--color-pink);
}

body:not(.file-icon-remove).colorful-folder .workspace-leaf-content[data-type="bookmarks"] .tree-item-icon.collapse-icon {
    background-color: var(--colorful-folder-color);
}
Akifyss commented 3 months ago

Thank you for the suggestion! Your idea for colorful bookmarks is creative and interesting. However, I prefer not to add this code at the moment. I truly appreciate your input and will keep it in mind for future enhancements.