forked from replete/obsidian-minimal-theme-css-snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path[ui] Custom Separators (gradient).css
49 lines (45 loc) · 1.91 KB
/
[ui] Custom Separators (gradient).css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
File Explorer Separators
So this is super handy, I found a way to add visual separators below and above navigation items in the file explorer.
This works nicely along side the 'Custom File Explorer Sorting' plugin, and there's a thread on their github about my solution.
You need to customize the rule below in accordance with your file structure.
These styles go with
https://github.com/replete/obsidian-minimal-theme-css-snippets
*/
:root {
--replete-custom-separators-vertical-padding: 4px;
--replete-custom-separators-left-margin: -12px;
}
/* Separator below */
.nav-folder-children > [class*=nav-]:has([data-path="Scratchpad.md"])::after,
.nav-folder-children > [class*=nav-]:has([data-path="Archive"])::after
{
content:'';
display:block;
height:1px;
width:100%;
background:linear-gradient(to right, var(--tab-outline-color), transparent);
margin:var(--replete-custom-separators-vertical-padding) 0 var(--replete-custom-separators-vertical-padding) var(--replete-custom-separators-left-margin);
}
/* Separator above */
.nav-folder-children > [class*=nav-]:has([data-path="Daily"])::before,
.nav-folder-children > [class*=nav-]:has([data-path="People"])::before,
.nav-folder-children > [class*=nav-]:has([data-path="Archive"])::before
{
content:'';
display:block;
height:1px;
width:100%;
background:linear-gradient(to right, var(--tab-outline-color), transparent);
margin:var(--replete-custom-separators-vertical-padding) 0 var(--replete-custom-separators-vertical-padding) var(--replete-custom-separators-left-margin);
}
/* Separator for first item */
/* .nav-folder-children > [class*=nav-]:nth-of-type(2)::before
{
content:'';
display:block;
height:1px;
width:100%;
background:linear-gradient(to right, var(--bg3), transparent);
margin:0 0 var(--replete-custom-separators-vertical-padding) var(--replete-custom-separators-left-margin);
} */