-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
366 lines (325 loc) · 9.07 KB
/
Copy pathstyles.css
File metadata and controls
366 lines (325 loc) · 9.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
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
/*
* Lookout — "drafting / survey instrument" UI.
*
* Surfaces and text follow Obsidian's theme variables so the controls read as
* native in both light and dark themes. The one deliberate signature is the
* survey-cyan accent, used only for focus, the active gauge tick, and hover
* emphasis — everything else stays quiet.
*/
.lookout-viewport,
.lookout-fs {
--lookout-accent: #0e9cc4;
--lookout-accent-soft: color-mix(in srgb, var(--lookout-accent) 16%, transparent);
--lookout-accent-ring: color-mix(in srgb, var(--lookout-accent) 45%, transparent);
}
/* The host (Obsidian's .mermaid wrapper) should no longer clamp or scroll. */
.lookout-host {
width: 100%;
max-width: 100%;
text-align: left;
}
/*
* Obsidian's `.mermaid` wrapper sets `overflow` to clamp/scroll the diagram.
* The plugin stamps `.lookout-host` onto that `.mermaid` element (via
* `closest('.mermaid')`), so qualifying with `.mermaid` here adds our own class
* on top of Obsidian's `.mermaid` — enough specificity to win without `!important`.
*/
.mermaid.lookout-host {
overflow: visible;
}
/* ---------- viewport (the windowed frame over the diagram) ---------- */
.lookout-viewport {
position: relative;
width: 100%;
overflow: hidden;
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
background-color: var(--background-primary);
/* faint drafting grid — present but barely there */
background-image:
linear-gradient(to right, color-mix(in srgb, var(--text-muted) 7%, transparent) 1px, transparent 1px),
linear-gradient(to bottom, color-mix(in srgb, var(--text-muted) 7%, transparent) 1px, transparent 1px);
background-size: 24px 24px;
cursor: grab;
outline: none;
}
.lookout-viewport.is-dragging {
cursor: grabbing;
}
.lookout-viewport:focus-visible {
border-color: var(--lookout-accent);
box-shadow: 0 0 0 2px var(--lookout-accent-ring);
}
.lookout-stage {
position: absolute;
top: 0;
left: 0;
transform-origin: 0 0;
will-change: transform;
}
.lookout-stage.is-animating {
transition: transform 0.18s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.lookout-stage svg {
display: block;
}
/* ---------- instrument toolbar ---------- */
.lookout-toolbar {
position: absolute;
top: 10px;
right: 10px;
display: inline-flex;
align-items: center;
gap: 1px;
padding: 3px;
border-radius: 7px;
background-color: color-mix(in srgb, var(--background-primary) 88%, transparent);
backdrop-filter: saturate(1.1) blur(6px);
border: 1px solid var(--background-modifier-border);
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
opacity: 0.55;
transition: opacity 0.15s ease;
z-index: 2;
}
.lookout-host:hover .lookout-toolbar,
.lookout-viewport:hover .lookout-toolbar,
.lookout-toolbar:focus-within {
opacity: 1;
}
.lookout-divider {
width: 1px;
align-self: stretch;
margin: 4px 3px;
background-color: var(--background-modifier-border);
}
.lookout-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
padding: 0;
border: none;
border-radius: 5px;
background: transparent;
color: var(--text-muted);
cursor: pointer;
box-shadow: none;
transition: background-color 0.12s ease, color 0.12s ease;
}
.lookout-btn:hover {
background-color: var(--background-modifier-hover);
color: var(--text-normal);
}
.lookout-btn:active {
background-color: var(--background-modifier-active-hover, var(--background-modifier-hover));
}
.lookout-btn:focus-visible {
outline: none;
box-shadow: inset 0 0 0 2px var(--lookout-accent-ring);
color: var(--lookout-accent);
}
.lookout-btn:disabled {
opacity: 0.32;
cursor: default;
background: transparent;
color: var(--text-muted);
}
.lookout-btn--close:hover {
background-color: color-mix(in srgb, var(--text-error) 16%, transparent);
color: var(--text-error);
}
.lookout-ico {
display: block;
}
/* ---------- signature: the survey gauge ---------- */
.lookout-gauge {
display: inline-flex;
flex-direction: column;
align-items: stretch;
justify-content: center;
gap: 3px;
min-width: 56px;
height: 28px;
padding: 0 8px;
border: none;
border-radius: 5px;
background: transparent;
color: var(--text-normal);
cursor: pointer;
box-shadow: none;
}
.lookout-gauge:hover {
background-color: var(--background-modifier-hover);
}
.lookout-gauge:focus-visible {
outline: none;
box-shadow: inset 0 0 0 2px var(--lookout-accent-ring);
}
.lookout-gauge-num {
font-family: var(--font-monospace);
font-size: 11px;
font-weight: 600;
line-height: 1;
letter-spacing: 0.02em;
text-align: center;
font-variant-numeric: tabular-nums;
color: var(--text-normal);
}
.lookout-gauge-track {
display: block;
position: relative;
height: 2px;
border-radius: 1px;
background-color: var(--background-modifier-border);
overflow: hidden;
}
.lookout-gauge-fill {
display: block;
position: absolute;
inset: 0 auto 0 0;
width: 50%;
background-color: var(--lookout-accent);
transition: width 0.12s ease;
}
/* ---------- full-screen view ---------- */
.lookout-fs {
position: fixed;
inset: 0;
z-index: 9999;
display: flex;
background-color: var(--background-primary);
/* a touch more pronounced drafting grid in the focal full-screen canvas */
background-image:
radial-gradient(circle, color-mix(in srgb, var(--lookout-accent) 12%, transparent) 1px, transparent 1.4px);
background-size: 26px 26px;
animation: lookout-fade 0.16s ease;
}
@keyframes lookout-fade {
from { opacity: 0; }
to { opacity: 1; }
}
.lookout-viewport--fs {
flex: 1;
border: none;
border-radius: 0;
background-color: transparent;
background-image: none;
}
/* In full screen the controls become a console docked at the bottom center. */
.lookout-toolbar--fs {
top: auto;
right: auto;
bottom: 22px;
left: 50%;
transform: translateX(-50%);
opacity: 1;
padding: 4px;
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}
/* ---------- tables (full-screen only, no zoom) ---------- */
/*
* The host is a 1x1 grid; the scroller and the button share that single cell
* (they overlay). `minmax(0, 1fr)` + the scroller's `min-width: 0` cap the host
* at the available column width so it never balloons to the table's intrinsic
* width — even when an ancestor is a shrink-to-fit / horizontally-scrolling
* block (Obsidian's `.cm-table-widget`). That keeps the table's overflow inside
* our own scroller and the button pinned to the *visible* corner instead of
* floating off-screen at the table's far-right edge.
*/
.lookout-table-host {
position: relative;
display: grid;
grid-template-columns: minmax(0, 1fr);
width: 100%;
max-width: 100%;
}
.lookout-table-scroll {
grid-area: 1 / 1;
min-width: 0;
overflow-x: auto;
overflow-y: hidden;
}
.lookout-table-scroll > table {
margin: 0;
width: auto;
max-width: none;
}
.lookout-table-btn {
grid-area: 1 / 1;
justify-self: end;
align-self: start;
/* `sticky` keeps the button in view should any ancestor still scroll the
whole host horizontally; the grid alignment fixes it to the top-right. */
position: sticky;
top: 6px;
right: 6px;
z-index: 2;
color: var(--text-muted);
background-color: color-mix(in srgb, var(--background-primary) 88%, transparent);
backdrop-filter: saturate(1.1) blur(6px);
border: 1px solid var(--background-modifier-border);
border-radius: 6px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
opacity: 0;
transition: opacity 0.15s ease, background-color 0.12s ease, color 0.12s ease;
}
.lookout-table-host:hover .lookout-table-btn,
.lookout-table-btn:focus-visible {
opacity: 1;
}
.lookout-table-btn:hover {
background-color: var(--background-modifier-hover);
color: var(--text-normal);
}
/* full-screen table view */
.lookout-fs--table {
background-image: none; /* the table is the focus; no drafting grid */
}
.lookout-table-fs-scroll {
flex: 1;
overflow: auto;
padding: clamp(24px, 4vw, 64px);
padding-top: 64px; /* clearance for the close button */
display: flex;
align-items: flex-start;
justify-content: safe center; /* center small tables, scroll wide ones from the left */
}
/*
* The scroll container carries `.markdown-rendered` so the full-screen clone
* inherits the theme's table styling (matching the inline view). Scope this
* two-class selector under it so it outranks Obsidian's single-class table
* styles — overriding them without !important.
*/
.lookout-table-fs-scroll .lookout-table-fs-table {
margin: 0;
width: auto;
max-width: none;
height: max-content;
}
.lookout-fs-close {
position: fixed;
top: 16px;
right: 18px;
z-index: 1;
width: 34px;
height: 34px;
color: var(--text-muted);
background-color: color-mix(in srgb, var(--background-primary) 90%, transparent);
border: 1px solid var(--background-modifier-border);
border-radius: 8px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
}
.lookout-fs-close:hover {
background-color: color-mix(in srgb, var(--text-error) 16%, transparent);
color: var(--text-error);
}
@media (prefers-reduced-motion: reduce) {
.lookout-stage.is-animating,
.lookout-gauge-fill {
transition: none;
}
.lookout-fs {
animation: none;
}
}