-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.css
More file actions
464 lines (409 loc) · 11.1 KB
/
Copy pathapp.css
File metadata and controls
464 lines (409 loc) · 11.1 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
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
@import 'tailwindcss';
@plugin 'flowbite/plugin';
@import 'flowbite/src/themes/default.css';
@custom-variant dark (&:where(.dark, .dark *));
/* Reserve scrollbar width so horizontal padding stays visually symmetric when scrollbars appear */
html {
scrollbar-gutter: stable;
}
/*
* Central theme: edit primary scale + app shell here.
* Flowbite plugin forms/range use --color-brand*; Flowbite Svelte uses Tailwind `primary-*` for buttons/tabs.
*/
@theme {
/* UI typography (loaded in +layout.svelte via fonts.googleapis.com) */
--font-sans:
'Google Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
--font-heading: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
/* Page / cards (slightly darker border than shell) */
--color-app-shell: #f3f1f1;
--color-card-border: #e8e5e5;
/* primary = indigo (Tailwind default scale) */
--color-primary-50: #eef2ff;
--color-primary-100: #e0e7ff;
--color-primary-200: #c7d2fe;
--color-primary-300: #a5b4fc;
--color-primary-400: #818cf8;
--color-primary-500: #6366f1;
--color-primary-600: #4f46e5;
--color-primary-700: #4338ca;
--color-primary-800: #3730a3;
--color-primary-900: #312e81;
--color-secondary-50: #f0f9ff;
--color-secondary-100: #e0f2fe;
--color-secondary-200: #bae6fd;
--color-secondary-300: #7dd3fc;
--color-secondary-400: #38bdf8;
--color-secondary-500: #0ea5e9;
--color-secondary-600: #0284c7;
--color-secondary-700: #0369a1;
--color-secondary-800: #075985;
--color-secondary-900: #0c4a6e;
/* Flowbite semantic brand → indigo (overrides blues from flowbite default theme) */
--color-fg-brand-subtle: var(--color-indigo-200);
--color-fg-brand: var(--color-indigo-700);
--color-fg-brand-strong: var(--color-indigo-900);
--color-brand-softer: var(--color-indigo-50);
--color-brand-soft: var(--color-indigo-100);
--color-brand: var(--color-indigo-700);
--color-brand-medium: var(--color-indigo-200);
--color-brand-strong: var(--color-indigo-800);
--color-brand-subtle: var(--color-indigo-200);
--color-brand-light: var(--color-indigo-600);
--color-shiki-fg-brand: #a5b4fc;
--color-shiki-fg-brand-subtle: #c7d2fe;
}
/* Dark: Flowbite default theme sets brand to blue — align with indigo */
.dark {
--color-fg-brand-subtle: var(--color-indigo-200);
--color-fg-brand: var(--color-indigo-500);
--color-fg-brand-strong: var(--color-indigo-400);
--color-brand-softer: var(--color-indigo-950);
--color-brand-soft: var(--color-indigo-900);
--color-brand: var(--color-indigo-600);
--color-brand-medium: var(--color-indigo-900);
--color-brand-strong: var(--color-indigo-700);
--color-brand-subtle: var(--color-indigo-900);
--color-brand-light: var(--color-indigo-600);
}
@source "../node_modules/flowbite-svelte/dist";
@source "../node_modules/flowbite-svelte-icons/dist";
/* --- Preview / alignment visualization --- */
.preview-frame {
position: relative;
width: 100%;
margin-inline: auto;
border-radius: 0;
border: 1px solid var(--color-card-border);
padding: 1.5rem;
min-height: 12rem;
overflow: hidden;
}
.preview-frame--light {
background: #ffffff;
color: var(--on-surface, #1c1b1f);
}
.preview-frame--dark {
background: #1e1e1e;
color: #e8e8e8;
border-color: rgb(55 65 81);
}
/* Decorative style frames (drawn above the background, below the tokens/links) */
.preview-frame.aligner-frame-parchment::before,
.preview-frame.aligner-frame-parchment::after {
content: '';
position: absolute;
pointer-events: none;
z-index: 4;
}
.preview-frame.aligner-frame-parchment::before {
inset: 14px;
border: 2px solid rgb(184 144 47 / 0.55);
}
.preview-frame.aligner-frame-parchment::after {
inset: 20px;
border: 1px solid rgb(107 77 35 / 0.45);
}
.preview-frame.aligner-frame-bauhaus {
border-color: #241f10;
border-width: 4px;
}
.preview-frame.aligner-frame-blueprint {
border-color: #1c4a86;
}
.preview-frame.aligner-frame-blueprint::after {
content: '';
position: absolute;
inset: 10px;
pointer-events: none;
z-index: 4;
border: 1px solid rgb(207 224 255 / 0.35);
}
/* Deco: double gold border + corner diamonds */
.preview-frame.aligner-frame-deco::before {
content: '';
position: absolute;
inset: 16px;
pointer-events: none;
z-index: 4;
border: 1.5px solid rgb(233 190 87 / 0.55);
}
.preview-frame.aligner-frame-deco::after {
content: '';
position: absolute;
inset: 22px;
pointer-events: none;
z-index: 4;
border: 0.75px solid rgb(233 190 87 / 0.3);
}
.aligner-deco-diamond {
position: absolute;
left: 50%;
width: 12px;
height: 12px;
z-index: 4;
background: #e9be57;
pointer-events: none;
}
.aligner-deco-diamond--top {
top: 16px;
transform: translate(-50%, -50%) rotate(45deg);
}
.aligner-deco-diamond--bottom {
bottom: 16px;
transform: translate(-50%, 50%) rotate(45deg);
}
/* Nouveau: soft organic (oval) inset border */
.preview-frame.aligner-frame-nouveau::before {
content: '';
position: absolute;
inset: 16px;
pointer-events: none;
z-index: 4;
border: 1px solid rgb(123 134 93 / 0.5);
border-radius: 90px / 18px;
}
/* Floating link hint — no panel chrome; halo keeps text readable on busy previews */
.preview-frame__link-hint {
margin: 0;
border: none;
background: none;
box-shadow: none;
color: #374151;
text-shadow:
0 0 6px #fff,
0 0 14px #fff,
0 1px 2px rgb(255 255 255 / 0.95);
}
.preview-frame--dark .preview-frame__link-hint {
color: #e5e7eb;
text-shadow:
0 0 8px rgb(0 0 0 / 0.85),
0 0 18px rgb(0 0 0 / 0.75),
0 1px 3px rgb(0 0 0 / 0.9);
}
/* Discoverability pill for the zoom gesture */
.preview-zoom-hint {
position: absolute;
right: 0.5rem;
bottom: 0.5rem;
z-index: 20;
display: inline-flex;
align-items: center;
gap: 0.3rem;
padding: 0.2rem 0.55rem;
font-family: var(--font-body, system-ui, sans-serif);
font-size: 0.7rem;
line-height: 1;
border-radius: 9999px;
pointer-events: none;
color: #475569;
background: rgb(255 255 255 / 0.82);
border: 1px solid rgb(0 0 0 / 0.08);
box-shadow: 0 1px 3px rgb(0 0 0 / 0.08);
backdrop-filter: blur(4px);
}
.preview-frame--dark .preview-zoom-hint {
color: #cbd5e1;
background: rgb(24 24 27 / 0.7);
border-color: rgb(255 255 255 / 0.12);
}
/* Interaction-only pan/zoom layer (pinch to magnify small text; never affects export) */
.preview-zoom {
position: relative;
transform-origin: 0 0;
will-change: transform;
}
.preview-stack {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
align-items: stretch;
}
.preview-frame__attribution {
position: relative;
z-index: 3;
margin-top: 1rem;
text-align: center;
font-family: var(--font-body, system-ui, sans-serif);
font-size: 0.75rem;
line-height: 1.4;
opacity: 0.72;
}
.preview-frame--light .preview-frame__attribution {
color: #64748b;
}
.preview-frame--dark .preview-frame__attribution {
color: #94a3b8;
}
.preview-frame__attribution-link {
text-decoration: underline;
text-underline-offset: 2px;
cursor: pointer;
}
.preview-frame--light .preview-frame__attribution-link {
color: #475569;
}
.preview-frame--dark .preview-frame__attribution-link {
color: #cbd5e1;
}
/* Non-classic styles: the credit line adopts the style's text color and accent */
.preview-frame[data-aligner-style]:not([data-aligner-style='classic']) .preview-frame__attribution,
.preview-frame[data-aligner-style]:not([data-aligner-style='classic'])
.preview-frame__attribution-link {
color: inherit;
}
.preview-frame[data-aligner-style='bauhaus'] .preview-frame__attribution {
text-transform: uppercase;
letter-spacing: 0.12em;
font-weight: 600;
}
.preview-frame[data-aligner-style='atlas'] .preview-frame__attribution,
.preview-frame[data-aligner-style='sumi'] .preview-frame__attribution,
.preview-frame[data-aligner-style='parchment'] .preview-frame__attribution {
font-style: italic;
}
.preview-gloss-wrap {
width: 100%;
display: flex;
justify-content: center;
}
.preview-svg-layer {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 2;
overflow: visible;
}
/* Bauhaus: connectors tuck under the word cards (cards have a solid fill on the stack above). */
.preview-frame[data-aligner-style='bauhaus'] .preview-svg-layer {
z-index: 0;
}
/* Interaction layer sits above tokens so every connector stays clickable regardless of style. */
.preview-hit-layer {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
pointer-events: none;
z-index: 2;
overflow: visible;
}
.link-hit-path {
pointer-events: stroke;
cursor: pointer;
}
/* Range between lines: tint follows preview background, not site dark mode */
.preview-frame--light .line-gap-range input[type='range'] {
accent-color: rgb(79 70 229);
}
.preview-frame--dark .line-gap-range input[type='range'] {
accent-color: rgb(165 180 252);
}
.preview-svg-layer .link-hit {
pointer-events: none;
}
path.link-path {
pointer-events: none;
transition: stroke-width 0.12s ease;
}
.token-row {
display: flex;
flex-wrap: nowrap;
justify-content: center;
align-items: baseline;
}
/* Auto-fit off → restore legacy wrapping (a line may spill onto multiple rows) */
.preview-frame[data-autofit='off'] .token-row {
flex-wrap: wrap;
}
.token-view {
display: inline-flex;
align-items: baseline;
gap: 2px;
padding-inline: 4px;
border-radius: 0;
}
.token-view.token-view--join-before {
padding-inline-start: 0;
}
.token-view.token-view--join-after {
padding-inline-end: 0;
}
.token-view__num {
font-size: 0.65em;
opacity: 0.5;
font-variant-numeric: tabular-nums;
user-select: none;
}
.token-view__text {
font-weight: 500;
/* A token is one alignment unit — never let it break inside (e.g. at a hyphen). */
white-space: nowrap;
}
/* Bauhaus-style word cards */
.token-view--chip {
padding: 0.08em 0.4em;
font-weight: 700;
transition:
transform 0.08s ease,
box-shadow 0.08s ease;
}
.token-view--chip .token-view__text {
font-weight: 700;
}
/* Brutalist press: the card sinks into its own offset shadow on hover / selection. */
.token-view--chip.token-view--accent-hover,
.token-view--chip.token-view--accent-sel {
transform: translate(0.11em, 0.11em);
box-shadow: none !important;
}
.gloss-row {
align-items: baseline;
}
.gloss-cell {
min-width: 2ch;
min-height: 1.25em;
display: inline-block;
text-align: center;
padding-inline: 4px;
vertical-align: baseline;
}
/** Match token spacing when split with alt. separator (`joinLeft`): no extra pad between cells */
.gloss-cell.gloss-cell--join-before {
padding-inline-start: 0;
min-width: 0;
}
.gloss-cell.gloss-cell--join-after {
padding-inline-end: 0;
}
button.token-view--clickable {
font: inherit;
background: none;
border: none;
padding: 0;
margin: 0;
cursor: pointer;
text-align: inherit;
color: inherit;
}
button.token-view--clickable:focus-visible {
outline: 2px solid var(--color-primary-600);
outline-offset: 2px;
border-radius: 0;
}
button.token-view--clickable.token-view--accent-hover {
background: color-mix(in srgb, var(--token-accent) 16%, transparent);
box-shadow: inset 0 -1px 0 0 color-mix(in srgb, var(--token-accent) 55%, transparent);
}
button.token-view--clickable.token-view--accent-sel {
background: color-mix(in srgb, var(--token-accent) 26%, transparent);
box-shadow: inset 0 -2px 0 0 var(--token-accent);
}
button.token-view--clickable.token-view--accent-hover .token-view__num,
button.token-view--clickable.token-view--accent-sel .token-view__num {
opacity: 0.62;
}