g-comments 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1145 @@
1
+ /*
2
+ * g-comments default theme.
3
+ *
4
+ * Every rule is scoped to `.gc-root--styled` (the `unstyled` prop drops that
5
+ * class) and kept at one class of specificity with `:where()`, so your own
6
+ * class selectors override it when loaded after this file. Nothing outside the
7
+ * widget root is touched.
8
+ *
9
+ * Public tokens are `--gc-*`. Set them on the widget root (or through
10
+ * `appearance.variables`) or on any ancestor such as `:root`; whatever you set
11
+ * applies in every colour scheme. Unset tokens fall back to the defaults below,
12
+ * resolved into private `--_gc-*` variables.
13
+ */
14
+
15
+ /* Tokens: light defaults */
16
+
17
+ .gc-root--styled {
18
+ --_gc-font: var(
19
+ --gc-font,
20
+ system-ui,
21
+ -apple-system,
22
+ "Segoe UI",
23
+ Roboto,
24
+ "Helvetica Neue",
25
+ Arial,
26
+ sans-serif,
27
+ "Apple Color Emoji",
28
+ "Segoe UI Emoji"
29
+ );
30
+ --_gc-fg: var(--gc-fg, #1f2328);
31
+ --_gc-fg-muted: var(--gc-fg-muted, #59636e);
32
+ --_gc-bg: var(--gc-bg, #ffffff);
33
+ --_gc-bg-subtle: var(--gc-bg-subtle, #f6f8fa);
34
+ --_gc-border: var(--gc-border, #d1d9e0);
35
+ --_gc-accent: var(--gc-accent, #0969da);
36
+ --_gc-accent-fg: var(--gc-accent-fg, #ffffff);
37
+ --_gc-danger: var(--gc-danger, #cf222e);
38
+ --_gc-radius: var(--gc-radius, 8px);
39
+ --_gc-shadow: var(--gc-shadow, 0 1px 2px rgb(31 35 40 / 0.08), 0 8px 24px rgb(66 74 83 / 0.12));
40
+ --_gc-space: var(--gc-space, 0.5rem);
41
+ --_gc-avatar-size: var(--gc-avatar-size, 2.25rem);
42
+ }
43
+
44
+ .gc-root--styled[data-gc-theme="light"],
45
+ .gc-root--styled[data-gc-theme="auto"] {
46
+ color-scheme: light;
47
+ }
48
+
49
+ /* Tokens: dark defaults */
50
+
51
+ .gc-root--styled[data-gc-theme="dark"] {
52
+ --_gc-fg: var(--gc-fg, #e6edf3);
53
+ --_gc-fg-muted: var(--gc-fg-muted, #9198a1);
54
+ --_gc-bg: var(--gc-bg, #0d1117);
55
+ --_gc-bg-subtle: var(--gc-bg-subtle, #151b23);
56
+ --_gc-border: var(--gc-border, #3d444d);
57
+ --_gc-accent: var(--gc-accent, #4493f8);
58
+ --_gc-accent-fg: var(--gc-accent-fg, #0d1117);
59
+ --_gc-danger: var(--gc-danger, #f85149);
60
+ --_gc-shadow: var(--gc-shadow, 0 1px 2px rgb(1 4 9 / 0.4), 0 8px 24px rgb(1 4 9 / 0.6));
61
+ color-scheme: dark;
62
+ }
63
+
64
+ @media (prefers-color-scheme: dark) {
65
+ .gc-root--styled[data-gc-theme="auto"] {
66
+ --_gc-fg: var(--gc-fg, #e6edf3);
67
+ --_gc-fg-muted: var(--gc-fg-muted, #9198a1);
68
+ --_gc-bg: var(--gc-bg, #0d1117);
69
+ --_gc-bg-subtle: var(--gc-bg-subtle, #151b23);
70
+ --_gc-border: var(--gc-border, #3d444d);
71
+ --_gc-accent: var(--gc-accent, #4493f8);
72
+ --_gc-accent-fg: var(--gc-accent-fg, #0d1117);
73
+ --_gc-danger: var(--gc-danger, #f85149);
74
+ --_gc-shadow: var(--gc-shadow, 0 1px 2px rgb(1 4 9 / 0.4), 0 8px 24px rgb(1 4 9 / 0.6));
75
+ color-scheme: dark;
76
+ }
77
+ }
78
+
79
+ /* theme="inherit": derive the neutrals from the page's own text colour. */
80
+ .gc-root--styled:not([data-gc-theme]) {
81
+ --_gc-fg: var(--gc-fg, currentColor);
82
+ --_gc-fg-muted: var(--gc-fg-muted, color-mix(in srgb, currentColor 68%, transparent));
83
+ --_gc-bg: var(--gc-bg, transparent);
84
+ --_gc-bg-subtle: var(--gc-bg-subtle, color-mix(in srgb, currentColor 6%, transparent));
85
+ --_gc-border: var(--gc-border, color-mix(in srgb, currentColor 22%, transparent));
86
+ }
87
+
88
+ /* Root */
89
+
90
+ .gc-root--styled {
91
+ position: relative;
92
+ container: gc-root / inline-size;
93
+ display: flex;
94
+ flex-direction: column;
95
+ gap: calc(var(--_gc-space) * 2);
96
+ min-width: 0;
97
+ font-family: var(--_gc-font);
98
+ font-size: 1rem;
99
+ line-height: 1.5;
100
+ color: var(--_gc-fg);
101
+ background: var(--_gc-bg);
102
+ -webkit-text-size-adjust: 100%;
103
+ text-size-adjust: 100%;
104
+ }
105
+
106
+ :where(.gc-root--styled),
107
+ :where(.gc-root--styled) *,
108
+ :where(.gc-root--styled) *::before,
109
+ :where(.gc-root--styled) *::after {
110
+ box-sizing: border-box;
111
+ }
112
+
113
+ :where(.gc-root--styled) :focus-visible {
114
+ outline: 2px solid var(--_gc-accent);
115
+ outline-offset: 2px;
116
+ }
117
+
118
+ :where(.gc-root--styled) .gc-icon {
119
+ flex: none;
120
+ width: 1rem;
121
+ height: 1rem;
122
+ }
123
+
124
+ /* Buttons */
125
+
126
+ :where(.gc-root--styled) .gc-button {
127
+ appearance: none;
128
+ display: inline-flex;
129
+ align-items: center;
130
+ justify-content: center;
131
+ gap: 0.375rem;
132
+ min-height: 2.25rem;
133
+ margin: 0;
134
+ padding: 0 0.875rem;
135
+ border: 1px solid var(--_gc-border);
136
+ border-radius: var(--_gc-radius);
137
+ background: var(--_gc-bg);
138
+ color: var(--_gc-fg);
139
+ font: inherit;
140
+ font-size: 0.875rem;
141
+ font-weight: 600;
142
+ line-height: 1.2;
143
+ text-decoration: none;
144
+ white-space: nowrap;
145
+ cursor: pointer;
146
+ transition:
147
+ background-color 0.15s,
148
+ border-color 0.15s,
149
+ color 0.15s;
150
+ }
151
+
152
+ :where(.gc-root--styled) .gc-button:hover:not(:disabled) {
153
+ background: var(--_gc-bg-subtle);
154
+ }
155
+
156
+ :where(.gc-root--styled) .gc-button:disabled {
157
+ opacity: 0.55;
158
+ cursor: not-allowed;
159
+ }
160
+
161
+ :where(.gc-root--styled) .gc-button--primary {
162
+ border-color: var(--_gc-accent);
163
+ background: var(--_gc-accent);
164
+ color: var(--_gc-accent-fg);
165
+ }
166
+
167
+ :where(.gc-root--styled) .gc-button--primary:hover:not(:disabled) {
168
+ background: var(--_gc-accent);
169
+ background: color-mix(in srgb, var(--_gc-accent) 86%, var(--_gc-fg));
170
+ }
171
+
172
+ :where(.gc-root--styled) .gc-button--danger {
173
+ border-color: var(--_gc-danger);
174
+ background: var(--_gc-danger);
175
+ color: #ffffff;
176
+ }
177
+
178
+ :where(.gc-root--styled) .gc-button--danger:hover:not(:disabled) {
179
+ background: var(--_gc-danger);
180
+ background: color-mix(in srgb, var(--_gc-danger) 86%, var(--_gc-fg));
181
+ }
182
+
183
+ :where(.gc-root--styled) .gc-button--ghost {
184
+ border-color: transparent;
185
+ background: transparent;
186
+ color: var(--_gc-fg-muted);
187
+ }
188
+
189
+ :where(.gc-root--styled) .gc-button--ghost:hover:not(:disabled) {
190
+ background: var(--_gc-bg-subtle);
191
+ color: var(--_gc-fg);
192
+ }
193
+
194
+ :where(.gc-root--styled) .gc-button--small {
195
+ min-height: 2rem;
196
+ padding: 0 0.5rem;
197
+ font-size: 0.8125rem;
198
+ }
199
+
200
+ :where(.gc-root--styled) .gc-button--icon {
201
+ width: 2rem;
202
+ padding: 0;
203
+ }
204
+
205
+ :where(.gc-root--styled) .gc-button--link {
206
+ min-height: 0;
207
+ padding: 0.25rem 0;
208
+ border-color: transparent;
209
+ background: none;
210
+ color: var(--_gc-accent);
211
+ }
212
+
213
+ :where(.gc-root--styled) .gc-button--link:hover:not(:disabled) {
214
+ background: none;
215
+ text-decoration: underline;
216
+ }
217
+
218
+ /* Header */
219
+
220
+ :where(.gc-root--styled) .gc-header {
221
+ display: flex;
222
+ flex-wrap: wrap;
223
+ align-items: center;
224
+ justify-content: space-between;
225
+ gap: var(--_gc-space);
226
+ padding-bottom: var(--_gc-space);
227
+ border-bottom: 1px solid var(--_gc-border);
228
+ }
229
+
230
+ :where(.gc-root--styled) .gc-header__count {
231
+ margin: 0;
232
+ font-size: 1.125rem;
233
+ font-weight: 700;
234
+ line-height: 1.3;
235
+ }
236
+
237
+ :where(.gc-root--styled) .gc-sort {
238
+ display: inline-flex;
239
+ align-items: center;
240
+ gap: 0.5rem;
241
+ font-size: 0.875rem;
242
+ color: var(--_gc-fg-muted);
243
+ }
244
+
245
+ :where(.gc-root--styled) .gc-sort__select {
246
+ min-height: 2rem;
247
+ padding: 0.25rem 0.5rem;
248
+ border: 1px solid var(--_gc-border);
249
+ border-radius: var(--_gc-radius);
250
+ background: var(--_gc-bg);
251
+ color: var(--_gc-fg);
252
+ font: inherit;
253
+ }
254
+
255
+ /* Sign-in panel */
256
+
257
+ :where(.gc-root--styled) .gc-signin {
258
+ display: grid;
259
+ gap: var(--_gc-space);
260
+ padding: calc(var(--_gc-space) * 2);
261
+ border: 1px solid var(--_gc-border);
262
+ border-radius: var(--_gc-radius);
263
+ background: var(--_gc-bg-subtle);
264
+ }
265
+
266
+ :where(.gc-root--styled) .gc-signin__title {
267
+ margin: 0;
268
+ font-weight: 700;
269
+ }
270
+
271
+ :where(.gc-root--styled) .gc-signin__body {
272
+ margin: 0;
273
+ color: var(--_gc-fg-muted);
274
+ font-size: 0.9375rem;
275
+ }
276
+
277
+ :where(.gc-root--styled) .gc-signin__error {
278
+ margin: 0.25rem 0 0;
279
+ color: var(--_gc-danger);
280
+ font-size: 0.875rem;
281
+ }
282
+
283
+ :where(.gc-root--styled) .gc-signin__actions {
284
+ display: flex;
285
+ flex-wrap: wrap;
286
+ gap: var(--_gc-space);
287
+ }
288
+
289
+ :where(.gc-root--styled) .gc-signin--signed-in {
290
+ display: flex;
291
+ align-items: center;
292
+ gap: var(--_gc-space);
293
+ padding: 0;
294
+ border: 0;
295
+ background: none;
296
+ color: var(--_gc-fg-muted);
297
+ font-size: 0.875rem;
298
+ }
299
+
300
+ :where(.gc-root--styled) .gc-signin__user {
301
+ min-width: 0;
302
+ overflow: hidden;
303
+ text-overflow: ellipsis;
304
+ white-space: nowrap;
305
+ }
306
+
307
+ /* Composer */
308
+
309
+ :where(.gc-root--styled) .gc-composer {
310
+ display: grid;
311
+ gap: var(--_gc-space);
312
+ }
313
+
314
+ :where(.gc-root--styled) .gc-composer--replying,
315
+ :where(.gc-root--styled) .gc-composer--editing {
316
+ margin-top: var(--_gc-space);
317
+ }
318
+
319
+ :where(.gc-root--styled) .gc-comment > .gc-composer {
320
+ margin-inline-start: calc(var(--_gc-avatar-size) + var(--_gc-space) * 1.5);
321
+ }
322
+
323
+ :where(.gc-root--styled) .gc-composer__guidelines {
324
+ justify-self: start;
325
+ color: var(--_gc-fg-muted);
326
+ font-size: 0.8125rem;
327
+ }
328
+
329
+ :where(.gc-root--styled) .gc-composer__context {
330
+ margin: 0;
331
+ color: var(--_gc-fg-muted);
332
+ font-size: 0.8125rem;
333
+ }
334
+
335
+ :where(.gc-root--styled) .gc-composer__tabs {
336
+ display: flex;
337
+ gap: 0.25rem;
338
+ border-bottom: 1px solid var(--_gc-border);
339
+ }
340
+
341
+ :where(.gc-root--styled) .gc-composer__tab {
342
+ appearance: none;
343
+ margin: 0 0 -1px;
344
+ padding: 0.375rem 0.625rem;
345
+ border: 0;
346
+ border-bottom: 2px solid transparent;
347
+ background: none;
348
+ color: var(--_gc-fg-muted);
349
+ font: inherit;
350
+ font-size: 0.875rem;
351
+ cursor: pointer;
352
+ }
353
+
354
+ :where(.gc-root--styled) .gc-composer__tab[aria-selected="true"] {
355
+ border-bottom-color: var(--_gc-accent);
356
+ color: var(--_gc-fg);
357
+ font-weight: 600;
358
+ }
359
+
360
+ :where(.gc-root--styled) .gc-composer__panel {
361
+ display: grid;
362
+ gap: 0.25rem;
363
+ }
364
+
365
+ :where(.gc-root--styled) .gc-composer__panel[hidden] {
366
+ display: none;
367
+ }
368
+
369
+ :where(.gc-root--styled) .gc-toolbar {
370
+ display: flex;
371
+ flex-wrap: wrap;
372
+ gap: 2px;
373
+ }
374
+
375
+ :where(.gc-root--styled) .gc-toolbar__button {
376
+ appearance: none;
377
+ display: inline-grid;
378
+ place-items: center;
379
+ width: 2rem;
380
+ height: 2rem;
381
+ margin: 0;
382
+ padding: 0;
383
+ border: 0;
384
+ border-radius: calc(var(--_gc-radius) / 2);
385
+ background: none;
386
+ color: var(--_gc-fg-muted);
387
+ cursor: pointer;
388
+ }
389
+
390
+ :where(.gc-root--styled) .gc-toolbar__button:hover:not(:disabled) {
391
+ background: var(--_gc-bg-subtle);
392
+ color: var(--_gc-fg);
393
+ }
394
+
395
+ :where(.gc-root--styled) .gc-composer__field {
396
+ position: relative;
397
+ }
398
+
399
+ :where(.gc-root--styled) .gc-composer__input {
400
+ display: block;
401
+ width: 100%;
402
+ min-height: 5.5rem;
403
+ max-height: 24rem;
404
+ margin: 0;
405
+ padding: 0.625rem 0.75rem;
406
+ border: 1px solid var(--_gc-border);
407
+ border-radius: var(--_gc-radius);
408
+ background: var(--_gc-bg);
409
+ color: var(--_gc-fg);
410
+ font: inherit;
411
+ line-height: 1.5;
412
+ resize: vertical;
413
+ field-sizing: content;
414
+ }
415
+
416
+ :where(.gc-root--styled) .gc-composer--replying .gc-composer__input,
417
+ :where(.gc-root--styled) .gc-composer--editing .gc-composer__input {
418
+ min-height: 4rem;
419
+ }
420
+
421
+ :where(.gc-root--styled) .gc-composer__input::placeholder {
422
+ color: var(--_gc-fg-muted);
423
+ opacity: 1;
424
+ }
425
+
426
+ :where(.gc-root--styled) .gc-composer__input:focus-visible {
427
+ border-color: var(--_gc-accent);
428
+ outline-offset: 0;
429
+ }
430
+
431
+ :where(.gc-root--styled) .gc-composer__input:disabled {
432
+ opacity: 0.7;
433
+ }
434
+
435
+ :where(.gc-root--styled) .gc-composer__preview {
436
+ min-height: 5.5rem;
437
+ padding: 0.625rem 0.75rem;
438
+ border: 1px dashed var(--_gc-border);
439
+ border-radius: var(--_gc-radius);
440
+ }
441
+
442
+ :where(.gc-root--styled) .gc-composer__footer {
443
+ display: flex;
444
+ flex-wrap: wrap;
445
+ align-items: flex-start;
446
+ justify-content: space-between;
447
+ gap: var(--_gc-space);
448
+ }
449
+
450
+ :where(.gc-root--styled) .gc-composer__messages {
451
+ flex: 1 1 12rem;
452
+ min-width: 0;
453
+ font-size: 0.8125rem;
454
+ }
455
+
456
+ :where(.gc-root--styled) .gc-composer__messages p {
457
+ margin: 0;
458
+ }
459
+
460
+ :where(.gc-root--styled) .gc-composer__hint,
461
+ :where(.gc-root--styled) .gc-composer__status {
462
+ margin: 0;
463
+ color: var(--_gc-fg-muted);
464
+ }
465
+
466
+ :where(.gc-root--styled) .gc-composer__error {
467
+ color: var(--_gc-danger);
468
+ }
469
+
470
+ :where(.gc-root--styled) .gc-composer__buttons {
471
+ display: flex;
472
+ flex-wrap: wrap;
473
+ gap: var(--_gc-space);
474
+ margin-inline-start: auto;
475
+ }
476
+
477
+ /* Mention suggestions */
478
+
479
+ :where(.gc-root--styled) .gc-mentions {
480
+ position: absolute;
481
+ z-index: 10;
482
+ top: calc(100% + 4px);
483
+ inset-inline-start: 0.5rem;
484
+ min-width: min(14rem, calc(100% - 1rem));
485
+ max-width: calc(100% - 1rem);
486
+ max-height: 15rem;
487
+ margin: 0;
488
+ padding: 0.25rem;
489
+ overflow-y: auto;
490
+ list-style: none;
491
+ border: 1px solid var(--_gc-border);
492
+ border-radius: var(--_gc-radius);
493
+ background: var(--_gc-bg);
494
+ box-shadow: var(--_gc-shadow);
495
+ }
496
+
497
+ :where(.gc-root--styled) .gc-mentions__option {
498
+ display: flex;
499
+ align-items: center;
500
+ gap: 0.5rem;
501
+ padding: 0.375rem 0.5rem;
502
+ border-radius: calc(var(--_gc-radius) / 2);
503
+ font-size: 0.875rem;
504
+ cursor: pointer;
505
+ }
506
+
507
+ :where(.gc-root--styled) .gc-mentions__option--active {
508
+ background: var(--_gc-bg-subtle);
509
+ background: color-mix(in srgb, var(--_gc-accent) 16%, transparent);
510
+ }
511
+
512
+ :where(.gc-root--styled) .gc-mentions__username {
513
+ font-weight: 600;
514
+ }
515
+
516
+ :where(.gc-root--styled) .gc-mentions__name {
517
+ min-width: 0;
518
+ overflow: hidden;
519
+ color: var(--_gc-fg-muted);
520
+ text-overflow: ellipsis;
521
+ white-space: nowrap;
522
+ }
523
+
524
+ /* Avatars and badges */
525
+
526
+ :where(.gc-root--styled) .gc-avatar {
527
+ flex: none;
528
+ display: inline-grid;
529
+ place-items: center;
530
+ width: var(--_gc-avatar-size);
531
+ height: var(--_gc-avatar-size);
532
+ border-radius: 50%;
533
+ background: var(--_gc-bg-subtle);
534
+ color: var(--_gc-fg-muted);
535
+ font-size: calc(var(--_gc-avatar-size) * 0.42);
536
+ font-weight: 700;
537
+ object-fit: cover;
538
+ }
539
+
540
+ :where(.gc-root--styled) .gc-avatar--small {
541
+ --_gc-avatar-size: 1.5rem;
542
+ }
543
+
544
+ :where(.gc-root--styled) .gc-badge {
545
+ display: inline-flex;
546
+ align-items: center;
547
+ gap: 0.25rem;
548
+ padding: 0 0.375rem;
549
+ border: 1px solid var(--_gc-border);
550
+ border-radius: 999px;
551
+ color: var(--_gc-fg-muted);
552
+ font-size: 0.75rem;
553
+ font-weight: 600;
554
+ line-height: 1.25rem;
555
+ }
556
+
557
+ :where(.gc-root--styled) .gc-badge .gc-icon {
558
+ width: 0.75rem;
559
+ height: 0.75rem;
560
+ }
561
+
562
+ :where(.gc-root--styled) .gc-badge--staff,
563
+ :where(.gc-root--styled) .gc-badge--featured {
564
+ border-color: var(--_gc-accent);
565
+ color: var(--_gc-accent);
566
+ }
567
+
568
+ /* Comment tree */
569
+
570
+ :where(.gc-root--styled) .gc-list,
571
+ :where(.gc-root--styled) .gc-replies,
572
+ :where(.gc-root--styled) .gc-context {
573
+ margin: 0;
574
+ padding: 0;
575
+ list-style: none;
576
+ }
577
+
578
+ :where(.gc-root--styled) .gc-list {
579
+ display: grid;
580
+ gap: calc(var(--_gc-space) * 3);
581
+ }
582
+
583
+ :where(.gc-root--styled) .gc-list__status {
584
+ margin: 0;
585
+ color: var(--_gc-fg-muted);
586
+ }
587
+
588
+ :where(.gc-root--styled) .gc-replies {
589
+ display: grid;
590
+ gap: calc(var(--_gc-space) * 2);
591
+ margin-top: calc(var(--_gc-space) * 2);
592
+ margin-inline-start: calc(var(--_gc-avatar-size) / 2 - 1px);
593
+ padding-inline-start: calc(var(--_gc-avatar-size) / 2 + var(--_gc-space));
594
+ border-inline-start: 2px solid var(--_gc-border);
595
+ }
596
+
597
+ :where(.gc-root--styled) .gc-comment {
598
+ min-width: 0;
599
+ }
600
+
601
+ :where(.gc-root--styled) .gc-comment__card {
602
+ display: grid;
603
+ grid-template-columns: auto minmax(0, 1fr);
604
+ align-items: start;
605
+ column-gap: calc(var(--_gc-space) * 1.5);
606
+ border-radius: var(--_gc-radius);
607
+ scroll-margin-block: 4rem;
608
+ }
609
+
610
+ :where(.gc-root--styled) .gc-comment__card > * {
611
+ grid-column: 2;
612
+ }
613
+
614
+ :where(.gc-root--styled) .gc-comment__card > .gc-avatar {
615
+ grid-row: 1;
616
+ grid-column: 1;
617
+ }
618
+
619
+ :where(.gc-root--styled) .gc-comment__card:focus:not(:focus-visible) {
620
+ outline: none;
621
+ }
622
+
623
+ :where(.gc-root--styled) .gc-comment__card:focus-visible {
624
+ outline-offset: 4px;
625
+ }
626
+
627
+ :where(.gc-root--styled) .gc-comment__main {
628
+ display: grid;
629
+ gap: 0.25rem;
630
+ min-width: 0;
631
+ }
632
+
633
+ :where(.gc-root--styled) .gc-comment__meta {
634
+ display: flex;
635
+ flex-wrap: wrap;
636
+ align-items: center;
637
+ gap: 0.25rem 0.5rem;
638
+ color: var(--_gc-fg-muted);
639
+ font-size: 0.875rem;
640
+ }
641
+
642
+ :where(.gc-root--styled) .gc-comment__author {
643
+ color: var(--_gc-fg);
644
+ font-weight: 600;
645
+ text-decoration: none;
646
+ }
647
+
648
+ :where(.gc-root--styled) .gc-comment__time {
649
+ color: inherit;
650
+ text-decoration: none;
651
+ }
652
+
653
+ :where(.gc-root--styled) .gc-comment__author:hover,
654
+ :where(.gc-root--styled) .gc-comment__time:hover {
655
+ text-decoration: underline;
656
+ }
657
+
658
+ :where(.gc-root--styled) .gc-comment__body--removed,
659
+ :where(.gc-root--styled) .gc-comment__hidden-note {
660
+ margin: 0;
661
+ color: var(--_gc-fg-muted);
662
+ font-style: italic;
663
+ }
664
+
665
+ :where(.gc-root--styled) .gc-comment__hidden-note {
666
+ font-size: 0.8125rem;
667
+ }
668
+
669
+ :where(.gc-root--styled) .gc-comment__notice {
670
+ margin: 0.25rem 0 0;
671
+ color: var(--_gc-fg-muted);
672
+ font-size: 0.8125rem;
673
+ }
674
+
675
+ :where(.gc-root--styled) .gc-comment__notice--error {
676
+ color: var(--_gc-danger);
677
+ }
678
+
679
+ :where(.gc-root--styled) .gc-comment__more,
680
+ :where(.gc-root--styled) .gc-comment__continue {
681
+ margin-top: var(--_gc-space);
682
+ margin-inline-start: calc(var(--_gc-avatar-size) + var(--_gc-space) * 1.5);
683
+ font-size: 0.875rem;
684
+ }
685
+
686
+ :where(.gc-root--styled) .gc-comment--pinned > .gc-comment__card {
687
+ padding: var(--_gc-space);
688
+ background: var(--_gc-bg-subtle);
689
+ box-shadow: inset 3px 0 0 var(--_gc-accent);
690
+ }
691
+
692
+ :where(.gc-root--styled) .gc-comment--highlighted > .gc-comment__card {
693
+ background: var(--_gc-bg-subtle);
694
+ background: color-mix(in srgb, var(--_gc-accent) 10%, transparent);
695
+ box-shadow: 0 0 0 var(--_gc-space) color-mix(in srgb, var(--_gc-accent) 10%, transparent);
696
+ }
697
+
698
+ /* Actions and menu */
699
+
700
+ :where(.gc-root--styled) .gc-actions {
701
+ display: flex;
702
+ flex-wrap: wrap;
703
+ align-items: center;
704
+ gap: 0.25rem;
705
+ margin-inline-start: -0.5rem;
706
+ }
707
+
708
+ :where(.gc-root--styled) .gc-actions__like--active {
709
+ color: var(--_gc-danger);
710
+ }
711
+
712
+ :where(.gc-root--styled) .gc-actions__count {
713
+ font-variant-numeric: tabular-nums;
714
+ }
715
+
716
+ :where(.gc-root--styled) .gc-menu {
717
+ position: relative;
718
+ }
719
+
720
+ :where(.gc-root--styled) .gc-menu__list {
721
+ position: absolute;
722
+ z-index: 20;
723
+ top: calc(100% + 4px);
724
+ inset-inline-end: 0;
725
+ min-width: 10rem;
726
+ margin: 0;
727
+ padding: 0.25rem;
728
+ list-style: none;
729
+ border: 1px solid var(--_gc-border);
730
+ border-radius: var(--_gc-radius);
731
+ background: var(--_gc-bg);
732
+ box-shadow: var(--_gc-shadow);
733
+ }
734
+
735
+ :where(.gc-root--styled) .gc-menu__item {
736
+ display: block;
737
+ width: 100%;
738
+ margin: 0;
739
+ padding: 0.5rem 0.625rem;
740
+ border: 0;
741
+ border-radius: calc(var(--_gc-radius) / 2);
742
+ background: none;
743
+ color: var(--_gc-fg);
744
+ font: inherit;
745
+ font-size: 0.875rem;
746
+ text-align: start;
747
+ cursor: pointer;
748
+ }
749
+
750
+ :where(.gc-root--styled) .gc-menu__item:hover,
751
+ :where(.gc-root--styled) .gc-menu__item:focus {
752
+ background: var(--_gc-bg-subtle);
753
+ }
754
+
755
+ :where(.gc-root--styled) .gc-menu__item:focus-visible {
756
+ outline-offset: -2px;
757
+ }
758
+
759
+ :where(.gc-root--styled) .gc-menu__item--danger {
760
+ color: var(--_gc-danger);
761
+ }
762
+
763
+ /* Report and delete panels */
764
+
765
+ :where(.gc-root--styled) .gc-report,
766
+ :where(.gc-root--styled) .gc-confirm {
767
+ display: grid;
768
+ gap: var(--_gc-space);
769
+ margin-top: var(--_gc-space);
770
+ padding: calc(var(--_gc-space) * 1.5);
771
+ border: 1px solid var(--_gc-border);
772
+ border-radius: var(--_gc-radius);
773
+ background: var(--_gc-bg);
774
+ box-shadow: var(--_gc-shadow);
775
+ }
776
+
777
+ :where(.gc-root--styled) .gc-report form {
778
+ display: grid;
779
+ gap: var(--_gc-space);
780
+ }
781
+
782
+ :where(.gc-root--styled) .gc-report__options {
783
+ display: grid;
784
+ gap: 0.25rem;
785
+ margin: 0;
786
+ padding: 0;
787
+ border: 0;
788
+ }
789
+
790
+ :where(.gc-root--styled) .gc-report__title {
791
+ margin-bottom: 0.25rem;
792
+ padding: 0;
793
+ font-weight: 600;
794
+ }
795
+
796
+ :where(.gc-root--styled) .gc-report__option {
797
+ display: flex;
798
+ align-items: center;
799
+ gap: 0.5rem;
800
+ font-size: 0.9375rem;
801
+ cursor: pointer;
802
+ }
803
+
804
+ :where(.gc-root--styled) .gc-report__option input {
805
+ margin: 0;
806
+ accent-color: var(--_gc-accent);
807
+ }
808
+
809
+ :where(.gc-root--styled) .gc-report__message {
810
+ width: 100%;
811
+ margin: 0;
812
+ padding: 0.5rem 0.625rem;
813
+ border: 1px solid var(--_gc-border);
814
+ border-radius: var(--_gc-radius);
815
+ background: var(--_gc-bg);
816
+ color: var(--_gc-fg);
817
+ font: inherit;
818
+ resize: vertical;
819
+ }
820
+
821
+ :where(.gc-root--styled) .gc-report__error {
822
+ margin: 0;
823
+ color: var(--_gc-danger);
824
+ font-size: 0.875rem;
825
+ }
826
+
827
+ :where(.gc-root--styled) .gc-confirm__text {
828
+ margin: 0;
829
+ font-weight: 600;
830
+ }
831
+
832
+ :where(.gc-root--styled) .gc-report__buttons,
833
+ :where(.gc-root--styled) .gc-confirm__buttons {
834
+ display: flex;
835
+ flex-wrap: wrap;
836
+ justify-content: flex-end;
837
+ gap: var(--_gc-space);
838
+ }
839
+
840
+ /* Notices, new-comments pill, load more */
841
+
842
+ :where(.gc-root--styled) .gc-notice {
843
+ margin: 0;
844
+ padding: var(--_gc-space) calc(var(--_gc-space) * 1.5);
845
+ border: 1px solid var(--_gc-border);
846
+ border-radius: var(--_gc-radius);
847
+ background: var(--_gc-bg-subtle);
848
+ color: var(--_gc-fg-muted);
849
+ font-size: 0.9375rem;
850
+ }
851
+
852
+ :where(.gc-root--styled) .gc-notice--error {
853
+ display: flex;
854
+ flex-wrap: wrap;
855
+ align-items: center;
856
+ justify-content: space-between;
857
+ gap: var(--_gc-space);
858
+ color: var(--_gc-fg);
859
+ }
860
+
861
+ :where(.gc-root--styled) .gc-notice__text {
862
+ margin: 0;
863
+ }
864
+
865
+ :where(.gc-root--styled) .gc-notice--pending {
866
+ border-color: var(--_gc-accent);
867
+ color: var(--_gc-fg);
868
+ }
869
+
870
+ :where(.gc-root--styled) .gc-pending-region {
871
+ display: grid;
872
+ gap: var(--_gc-space);
873
+ }
874
+
875
+ /* Empty live regions stay in the accessibility tree but take no space. */
876
+ :where(.gc-root--styled) .gc-pill-region:empty,
877
+ :where(.gc-root--styled) .gc-pending-region:empty {
878
+ position: absolute;
879
+ }
880
+
881
+ :where(.gc-root--styled) .gc-pill-region {
882
+ position: sticky;
883
+ z-index: 5;
884
+ top: 0.75rem;
885
+ display: flex;
886
+ justify-content: center;
887
+ }
888
+
889
+ :where(.gc-root--styled) .gc-pill {
890
+ border-color: var(--_gc-accent);
891
+ border-radius: 999px;
892
+ background: var(--_gc-accent);
893
+ color: var(--_gc-accent-fg);
894
+ box-shadow: var(--_gc-shadow);
895
+ }
896
+
897
+ :where(.gc-root--styled) .gc-pill:hover:not(:disabled) {
898
+ background: var(--_gc-accent);
899
+ background: color-mix(in srgb, var(--_gc-accent) 86%, var(--_gc-fg));
900
+ }
901
+
902
+ :where(.gc-root--styled) .gc-load-more {
903
+ align-self: center;
904
+ }
905
+
906
+ /* Focused branch ("Continue this thread") */
907
+
908
+ :where(.gc-root--styled) .gc-focus {
909
+ display: grid;
910
+ gap: calc(var(--_gc-space) * 2);
911
+ }
912
+
913
+ :where(.gc-root--styled) .gc-focus__back {
914
+ justify-self: start;
915
+ }
916
+
917
+ :where(.gc-root--styled) .gc-focus__truncated {
918
+ margin: 0;
919
+ color: var(--_gc-fg-muted);
920
+ font-size: 0.875rem;
921
+ }
922
+
923
+ :where(.gc-root--styled) .gc-context {
924
+ display: grid;
925
+ gap: calc(var(--_gc-space) * 1.5);
926
+ padding-inline-start: calc(var(--_gc-space) * 1.5);
927
+ border-inline-start: 2px dashed var(--_gc-border);
928
+ }
929
+
930
+ /* Developer diagnostics */
931
+
932
+ :where(.gc-root--styled) .gc-devpanel {
933
+ display: grid;
934
+ gap: var(--_gc-space);
935
+ padding: calc(var(--_gc-space) * 1.5) calc(var(--_gc-space) * 2);
936
+ border: 1px dashed var(--_gc-danger);
937
+ border-radius: var(--_gc-radius);
938
+ background: var(--_gc-bg-subtle);
939
+ font-size: 0.875rem;
940
+ }
941
+
942
+ :where(.gc-root--styled) .gc-devpanel--ok {
943
+ border-color: var(--_gc-border);
944
+ }
945
+
946
+ :where(.gc-root--styled) .gc-devpanel__title {
947
+ margin: 0;
948
+ font-weight: 700;
949
+ }
950
+
951
+ :where(.gc-root--styled) .gc-devpanel--ok .gc-devpanel__title {
952
+ cursor: pointer;
953
+ }
954
+
955
+ :where(.gc-root--styled) .gc-devpanel__summary,
956
+ :where(.gc-root--styled) .gc-devpanel__note {
957
+ margin: 0;
958
+ }
959
+
960
+ :where(.gc-root--styled) .gc-devpanel__note {
961
+ color: var(--_gc-fg-muted);
962
+ font-size: 0.8125rem;
963
+ }
964
+
965
+ :where(.gc-root--styled) .gc-devpanel__causes {
966
+ display: grid;
967
+ gap: 0.375rem;
968
+ margin: 0;
969
+ padding-inline-start: 1.25rem;
970
+ }
971
+
972
+ :where(.gc-root--styled) .gc-devpanel a {
973
+ color: var(--_gc-accent);
974
+ }
975
+
976
+ :where(.gc-root--styled) .gc-devpanel__code {
977
+ margin: 0.375rem 0 0;
978
+ padding: 0.5rem 0.625rem;
979
+ overflow-x: auto;
980
+ border-radius: calc(var(--_gc-radius) / 2);
981
+ background: var(--_gc-bg);
982
+ font-size: 0.8125rem;
983
+ }
984
+
985
+ :where(.gc-root--styled) .gc-devpanel__details {
986
+ display: grid;
987
+ grid-template-columns: max-content minmax(0, 1fr);
988
+ gap: 0.25rem 0.75rem;
989
+ margin: 0;
990
+ }
991
+
992
+ :where(.gc-root--styled) .gc-devpanel__details dt {
993
+ color: var(--_gc-fg-muted);
994
+ font-weight: 600;
995
+ }
996
+
997
+ :where(.gc-root--styled) .gc-devpanel__details dd {
998
+ margin: 0;
999
+ overflow-wrap: anywhere;
1000
+ }
1001
+
1002
+ /* Cooked comment HTML */
1003
+
1004
+ :where(.gc-root--styled) .gc-prose {
1005
+ line-height: 1.6;
1006
+ overflow-wrap: anywhere;
1007
+ }
1008
+
1009
+ :where(.gc-root--styled) .gc-prose > :first-child {
1010
+ margin-top: 0;
1011
+ }
1012
+
1013
+ :where(.gc-root--styled) .gc-prose > :last-child {
1014
+ margin-bottom: 0;
1015
+ }
1016
+
1017
+ :where(.gc-root--styled) .gc-prose :is(p, ul, ol, blockquote, pre, table, aside, details) {
1018
+ margin: 0 0 0.75em;
1019
+ }
1020
+
1021
+ :where(.gc-root--styled) .gc-prose :is(h1, h2, h3, h4, h5, h6) {
1022
+ margin: 1em 0 0.5em;
1023
+ font-size: 1.05em;
1024
+ line-height: 1.3;
1025
+ }
1026
+
1027
+ :where(.gc-root--styled) .gc-prose a {
1028
+ color: var(--_gc-accent);
1029
+ text-decoration: underline;
1030
+ text-underline-offset: 2px;
1031
+ }
1032
+
1033
+ :where(.gc-root--styled) .gc-prose :is(ul, ol) {
1034
+ padding-inline-start: 1.5em;
1035
+ }
1036
+
1037
+ :where(.gc-root--styled) .gc-prose blockquote {
1038
+ margin-inline: 0;
1039
+ padding: 0.25em 0 0.25em 1em;
1040
+ border-inline-start: 3px solid var(--_gc-border);
1041
+ color: var(--_gc-fg-muted);
1042
+ }
1043
+
1044
+ :where(.gc-root--styled) .gc-prose code {
1045
+ padding: 0.1em 0.35em;
1046
+ border-radius: 4px;
1047
+ background: var(--_gc-bg-subtle);
1048
+ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
1049
+ font-size: 0.875em;
1050
+ }
1051
+
1052
+ :where(.gc-root--styled) .gc-prose pre {
1053
+ padding: 0.75em 1em;
1054
+ overflow-x: auto;
1055
+ border-radius: var(--_gc-radius);
1056
+ background: var(--_gc-bg-subtle);
1057
+ }
1058
+
1059
+ :where(.gc-root--styled) .gc-prose pre code {
1060
+ padding: 0;
1061
+ background: none;
1062
+ }
1063
+
1064
+ :where(.gc-root--styled) .gc-prose img {
1065
+ max-width: 100%;
1066
+ height: auto;
1067
+ border-radius: calc(var(--_gc-radius) / 2);
1068
+ }
1069
+
1070
+ :where(.gc-root--styled) .gc-prose img.emoji {
1071
+ width: 1.25em;
1072
+ height: 1.25em;
1073
+ border-radius: 0;
1074
+ vertical-align: text-bottom;
1075
+ }
1076
+
1077
+ :where(.gc-root--styled) .gc-prose hr {
1078
+ margin: 1em 0;
1079
+ border: 0;
1080
+ border-top: 1px solid var(--_gc-border);
1081
+ }
1082
+
1083
+ :where(.gc-root--styled) .gc-prose table {
1084
+ display: block;
1085
+ max-width: 100%;
1086
+ overflow-x: auto;
1087
+ border-collapse: collapse;
1088
+ }
1089
+
1090
+ :where(.gc-root--styled) .gc-prose :is(th, td) {
1091
+ padding: 0.25em 0.5em;
1092
+ border: 1px solid var(--_gc-border);
1093
+ }
1094
+
1095
+ :where(.gc-root--styled) .gc-prose aside.onebox {
1096
+ padding: 0.75em 1em;
1097
+ border: 1px solid var(--_gc-border);
1098
+ border-radius: var(--_gc-radius);
1099
+ }
1100
+
1101
+ :where(.gc-root--styled) .gc-prose .mention {
1102
+ padding: 0 0.2em;
1103
+ border-radius: 4px;
1104
+ background: var(--_gc-bg-subtle);
1105
+ font-weight: 600;
1106
+ text-decoration: none;
1107
+ }
1108
+
1109
+ :where(.gc-root--styled) .gc-prose .lightbox-wrapper .meta {
1110
+ display: none;
1111
+ }
1112
+
1113
+ /* Narrow containers (phones, sidebars): tighter avatars and indentation. */
1114
+
1115
+ @container gc-root (max-width: 30rem) {
1116
+ :where(.gc-root--styled) :is(.gc-list, .gc-focus, .gc-composer) {
1117
+ --_gc-avatar-size: var(--gc-avatar-size, 2rem);
1118
+ }
1119
+
1120
+ :where(.gc-root--styled) .gc-comment__card {
1121
+ column-gap: var(--_gc-space);
1122
+ }
1123
+
1124
+ :where(.gc-root--styled) .gc-replies {
1125
+ margin-inline-start: 0;
1126
+ padding-inline-start: calc(var(--_gc-space) * 1.5);
1127
+ }
1128
+
1129
+ :where(.gc-root--styled) .gc-comment__more,
1130
+ :where(.gc-root--styled) .gc-comment__continue,
1131
+ :where(.gc-root--styled) .gc-comment > .gc-composer {
1132
+ margin-inline-start: 0;
1133
+ }
1134
+
1135
+ :where(.gc-root--styled) .gc-composer__buttons {
1136
+ width: 100%;
1137
+ justify-content: flex-end;
1138
+ }
1139
+ }
1140
+
1141
+ @media (prefers-reduced-motion: reduce) {
1142
+ :where(.gc-root--styled) * {
1143
+ transition: none !important;
1144
+ }
1145
+ }