-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
executable file
·398 lines (356 loc) · 10.4 KB
/
Copy pathstyles.css
File metadata and controls
executable file
·398 lines (356 loc) · 10.4 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
/* ============= Root & layout ============= */
/* Root must NOT be a grid—using flex prevents empty grid tracks on desktop */
.facet-nav {
height: 100%;
display: flex;
flex-direction: column;
align-items: stretch;
padding: .75rem;
min-height: 0;
box-sizing: border-box;
/* Default width variable */
--facet-left: clamp(180px, 22vw, 260px);
}
/* Local scroll context that holds bars + search + main columns */
.facet-scroll {
height: 100%;
display: grid;
grid-template-rows: auto auto auto 1fr; /* bar / controls / search / content */
gap: .4rem;
overflow: auto; /* only scroller we rely on */
min-height: 0;
}
/* Two columns on desktop */
.facet-main {
display: grid;
grid-template-columns: var(--facet-left) 6px 1fr; /* left | resizer | right */
gap: .6rem;
min-height: 0;
}
/* Left (filters) / Right (results) panes scroll independently */
.co-tags {
border-right: 0;
padding-right: .25rem;
overflow: auto;
min-height: 0;
}
.results { overflow: auto; min-height: 0; }
/* New resizer between panes */
.facet-resizer {
width: 6px;
cursor: col-resize;
background: transparent;
position: relative;
}
.facet-resizer::after {
content: "";
position: absolute;
inset: 0;
background: var(--background-modifier-border);
opacity: .4;
}
.facet-resizer:hover::after,
.facet-resizer.is-dragging::after {
opacity: .7;
}
/* ============= Controls, chips, search ============= */
.facet-bar, .search-row { align-items: center; }
.facet-bar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
/* Compact button toolbar */
.facet-controls {
display: flex;
gap: .2rem;
align-items: center;
flex-wrap: nowrap;
min-width: 0;
background: var(--background-secondary);
padding: .2rem;
border-radius: 8px;
border: 1px solid var(--background-modifier-border);
position: relative;
z-index: 10;
}
/* Compact icon-based buttons */
.facet-controls button {
padding: .4rem;
border: none;
border-radius: 4px;
background: transparent;
color: var(--text-muted);
cursor: pointer;
font-size: .8rem;
white-space: nowrap;
transition: all 0.15s ease;
min-width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.facet-controls button:hover {
background: var(--background-modifier-hover);
color: var(--text-normal);
transform: none;
}
.facet-controls button:active {
background: var(--background-modifier-active);
transform: scale(0.95);
}
/* Tooltip for buttons */
.facet-controls button::after {
content: attr(data-tooltip);
position: absolute;
bottom: calc(100% + 8px);
left: 50%;
transform: translateX(-50%);
background: var(--background-primary);
color: var(--text-normal);
padding: .3rem .6rem;
border-radius: 4px;
font-size: .75rem;
white-space: nowrap;
opacity: 0;
pointer-events: none;
transition: opacity 0.2s ease;
z-index: 99999;
border: 1px solid var(--background-modifier-border);
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
/* Ensure it's above everything */
isolation: isolate;
}
.facet-controls button:hover::after {
opacity: 1;
}
.facet-chip {
display: inline-flex;
align-items: center;
gap: .4rem;
padding: .2rem .5rem;
border-radius: 999px;
background: var(--background-secondary-alt);
max-width: 100%;
}
.facet-chip > span:first-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.facet-chip .remove { cursor: pointer; opacity: .7; }
.facet-chip .mode-indicator { font-size: .8rem; opacity: .6; }
.facet-chip.excluded { background: var(--background-modifier-error); color: var(--text-on-accent); }
.search-section { margin-bottom: .5rem; width: 100%; }
.search-container { display: flex; align-items: center; }
.search-input {
width: 100%;
padding: .4rem .5rem;
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
background: var(--background-primary);
color: var(--text-normal);
font-size: .9rem;
box-sizing: border-box;
}
.search-input:focus {
outline: none;
border-color: var(--interactive-accent);
box-shadow: 0 0 0 2px var(--interactive-accent-hover);
}
/* ============= Co-tags ============= */
.co-tags .group { margin-bottom:.5rem; }
.co-tags .group h4 { margin: .15rem 0; font-size: .9rem; opacity:.8; }
/* Section headers with visual separation */
.co-tags .group.nested h4 {
border-left: 3px solid var(--interactive-accent);
padding-left: .35rem;
}
.co-tags .group.flat h4 {
border-left: 3px solid var(--background-modifier-border);
padding-left: .35rem;
}
/* Row variants */
.co-tags .tag-row.tag-hier .tag-label {
font-weight: 500;
cursor: pointer;
}
.co-tags .tag-row.tag-flat .tag-label {
opacity: .9;
cursor: pointer;
}
/* Indentation for hierarchical levels */
.co-tags .tag-row[data-depth="0"] { padding-left: .30rem; }
.co-tags .tag-row[data-depth="1"] { padding-left: 1.10rem; }
.co-tags .tag-row[data-depth="2"] { padding-left: 1.90rem; }
/* Caret affordance and hit-area */
.co-tags .tag-row .tag-caret {
width: 1em;
text-align: center;
opacity: .7;
cursor: pointer;
}
.co-tags .tag-row .tag-caret:hover { opacity: 1; }
/* Caret placeholder for consistent alignment */
.co-tags .tag-row .tag-caret-placeholder {
width: 1em;
text-align: center;
opacity: 0;
}
/* Ensure consistent alignment for rows with/without children */
.co-tags .tag-row.has-children .tag-label {
font-weight: 500;
}
/* Optional subtle hue difference so sections feel distinct */
.co-tags .group.flat .tag-row { background: transparent; }
.co-tags .group.flat .tag-row:hover { background: var(--background-secondary); }
.co-tags .group.nested .tag-row:hover { background: var(--background-secondary); }
/* Enhanced label hover effects */
.co-tags .tag-row .tag-label:hover {
color: var(--interactive-accent);
text-decoration: underline;
}
.co-tags .tag-row {
display:flex;
justify-content:space-between;
align-items: center;
gap:.4rem;
padding:.08rem .2rem;
border-radius:6px;
cursor:pointer;
position: relative;
min-height: 36px; /* slightly reduced but still good tap target */
}
.co-tags .tag-row:hover { background: var(--background-secondary); }
.co-tags .tag-row .badge { margin-left: auto; }
/* ============= Results list ============= */
.result-item { padding:.35rem .4rem; border-radius:6px; }
.result-item:hover { background: var(--background-secondary); }
.result-meta { font-size:.8rem; opacity:.7; }
.result-item .file-tags { margin-top: .25rem; display: flex; flex-wrap: wrap; gap: .2rem; }
.result-item .file-tag {
font-size: .75rem;
padding: .1rem .3rem;
border-radius: 999px;
background: var(--background-secondary-alt);
cursor: pointer;
opacity: .8;
}
.result-item .file-tag:hover { opacity: 1; background: var(--background-secondary); }
.result-item .more-tags {
font-size: .75rem;
opacity: .6;
font-style: italic;
padding: .1rem .3rem;
}
/* Load-more button */
.load-more-btn {
margin: .5rem 0;
padding: .4rem .8rem;
background: var(--interactive-accent);
color: var(--text-on-accent);
border: none;
border-radius: 6px;
cursor: pointer;
font-size: .9rem;
}
.load-more-btn:hover { background: var(--interactive-accent-hover); }
/* Misc */
.badge { font-size:.75rem; opacity:.8; padding:.05rem .35rem; border-radius:999px; background: var(--background-modifier-form-field); }
.muted { opacity:.7; }
/* ============= Saved View modal/list ============= */
.facet-input-modal { display:grid; gap:.5rem; min-width:320px; }
.facet-input-label { font-size:.9rem; opacity:.8; }
.facet-input-field { width:100%; }
.facet-input-actions { display:flex; gap:.5rem; justify-content:flex-end; }
.facet-sv-suggestion {
padding:.25rem .35rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.facet-sv-suggestion:hover { background: var(--background-secondary); border-radius:6px; }
.facet-sv-name { flex: 1; }
.facet-sv-delete {
background: var(--background-modifier-error);
color: var(--text-on-accent);
border: none;
border-radius: 50%;
width: 20px;
height: 20px;
cursor: pointer;
font-size: 14px;
line-height: 1;
opacity: 0.7;
}
.facet-sv-delete:hover { opacity: 1; }
/* ============= Mobile (≤ 700px) ============= */
@media (max-width: 700px) {
.facet-main { grid-template-columns: 1fr; }
.facet-resizer { display: none; }
.co-tags { border-right: 0; border-bottom: 1px solid var(--background-modifier-border); padding-right: 0; padding-bottom: .5rem; max-height: 40vh; }
.results { max-height: none; }
/* More compact controls on mobile */
.facet-controls {
gap: .15rem;
padding: .15rem;
flex-wrap: wrap;
justify-content: center;
}
.facet-controls button {
min-width: 28px;
height: 28px;
font-size: .75rem;
padding: .3rem;
}
.mobile-only { display: inline-flex; }
.co-tags.is-hidden { display: none; }
.co-tags .tag-row { padding: .35rem .5rem; }
.result-item { padding: .5rem .6rem; }
/* Mobile-only sticky for chips/search */
.facet-bar, .search-row {
position: sticky;
top: 0;
z-index: 2;
background: var(--background-primary);
padding-top: .25rem;
padding-bottom: .25rem;
}
}
/* Hide the mobile-only toggle on desktop */
@media (min-width: 701px) {
.mobile-only { display: none; }
}
/* Kill the empty Obsidian .view-content for this custom view */
.workspace-leaf-content[data-type="facet-navigator-view"] > .view-content {
display: none !important;
}
/* Make the plugin root take the remaining height under the header */
.workspace-leaf-content[data-type="facet-navigator-view"] {
display: flex;
flex-direction: column;
}
.workspace-leaf-content[data-type="facet-navigator-view"] > .facet-nav {
flex: 1 1 auto;
min-height: 0;
}
/* ============= Keyboard Navigation ============= */
.tag-row.focused {
background: var(--background-modifier-hover);
outline: 2px solid var(--interactive-accent);
outline-offset: -2px;
}
.tag-row.focused .tag-label {
color: var(--interactive-accent);
font-weight: 600;
}
/* Focus indicator for search input */
.search-input:focus {
outline: none;
border-color: var(--interactive-accent);
box-shadow: 0 0 0 2px var(--interactive-accent-hover);
}
/* Focus styles for result items */
.result-item.focused {
background: var(--background-modifier-hover);
outline: 2px solid var(--interactive-accent);
outline-offset: -2px;
}
.result-item.focused a {
color: var(--interactive-accent);
font-weight: 600;
}