-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfolder-callout.css
More file actions
76 lines (74 loc) · 2.07 KB
/
folder-callout.css
File metadata and controls
76 lines (74 loc) · 2.07 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/* === Folder Callout Styles === */
/* This CSS snippet styles folder callouts in Obsidian, allowing for a collapsible list of files within a folder. */
/* This is useful for when trying to show a folder structure in a note. */
.callout[data-callout="folder" i] {
overflow-y: auto; /* Scroll only vertically */
overflow-x: hidden; /* Prevent horizontal expansion */
width: auto; /* Respect default width */
max-width: 100%; /* Don't expand beyond parent */
box-sizing: border-box; /* Ensure padding/border are included */
}
.callout[data-callout="folder" i] .list-bullet {
display: none;
}
.callout[data-callout="folder" i] ul {
-webkit-margin-after: 0;
margin-block-end: 0;
}
.callout[data-callout="folder" i] li {
--list-indent: 1.5em;
list-style-type: none;
font-family: var(--font-monospace);
white-space: nowrap;
}
.callout[data-callout="folder" i] li li {
position: relative;
box-sizing: border-box;
}
.callout[data-callout="folder" i] li li::before,
.callout[data-callout="folder" i] li li::after {
content: "";
position: absolute;
left: -1em;
background: var(--list-marker-color);
}
.callout[data-callout="folder" i] li li::before {
top: 0.85em;
width: 10px;
height: 1.5px;
margin: auto;
}
.callout[data-callout="folder" i] li li::after {
top: 0;
bottom: 0;
width: 1.5px;
height: 100%;
}
.callout[data-callout="folder" i] li li:last-child::after {
height: 0.85em;
}
.callout[data-callout="folder" i] li .list-collapse-indicator {
position: absolute;
left: -2em;
margin: 0;
}
.callout[data-callout="folder" i] li em {
opacity: 0.5;
font-family: var(--font-text);
}
.callout[data-callout="folder" i] li code {
font-size: 1em;
font-family: var(--font-monospace);
font-style: normal !important;
background: none;
white-space: pre;
margin: 0;
padding: 0;
}
.callout[data-callout="folder" i] li mark {
font-style: italic;
color: #d3a3e5;
}
.callout[data-callout="folder" i] .callout-content {
overflow-x: visible;
}