@cogenta/theme-canonical 1.1.3 → 1.3.3

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.
Files changed (71) hide show
  1. package/dist/src/index.d.ts +1 -0
  2. package/dist/src/index.d.ts.map +1 -1
  3. package/dist/src/index.js +1 -0
  4. package/dist/src/index.js.map +1 -1
  5. package/dist/src/render/arrow-link.d.ts +11 -0
  6. package/dist/src/render/arrow-link.d.ts.map +1 -0
  7. package/dist/src/render/arrow-link.js +29 -0
  8. package/dist/src/render/arrow-link.js.map +1 -0
  9. package/dist/src/render/blocks/collection-list.d.ts +15 -5
  10. package/dist/src/render/blocks/collection-list.d.ts.map +1 -1
  11. package/dist/src/render/blocks/collection-list.js +36 -13
  12. package/dist/src/render/blocks/collection-list.js.map +1 -1
  13. package/dist/src/render/blocks/embed.d.ts.map +1 -1
  14. package/dist/src/render/blocks/embed.js +3 -2
  15. package/dist/src/render/blocks/embed.js.map +1 -1
  16. package/dist/src/render/blocks/gallery.d.ts.map +1 -1
  17. package/dist/src/render/blocks/gallery.js +4 -1
  18. package/dist/src/render/blocks/gallery.js.map +1 -1
  19. package/dist/src/render/blocks/hero.d.ts.map +1 -1
  20. package/dist/src/render/blocks/hero.js +9 -2
  21. package/dist/src/render/blocks/hero.js.map +1 -1
  22. package/dist/src/render/blocks/pricing-table.d.ts.map +1 -1
  23. package/dist/src/render/blocks/pricing-table.js +17 -4
  24. package/dist/src/render/blocks/pricing-table.js.map +1 -1
  25. package/dist/src/render/chrome.d.ts +40 -1
  26. package/dist/src/render/chrome.d.ts.map +1 -1
  27. package/dist/src/render/chrome.js +103 -71
  28. package/dist/src/render/chrome.js.map +1 -1
  29. package/dist/src/render/dates.d.ts +9 -0
  30. package/dist/src/render/dates.d.ts.map +1 -0
  31. package/dist/src/render/dates.js +16 -0
  32. package/dist/src/render/dates.js.map +1 -0
  33. package/dist/src/render/render-block.d.ts.map +1 -1
  34. package/dist/src/render/render-block.js +7 -1
  35. package/dist/src/render/render-block.js.map +1 -1
  36. package/dist/src/render/strings.d.ts +25 -0
  37. package/dist/src/render/strings.d.ts.map +1 -0
  38. package/dist/src/render/strings.js +26 -0
  39. package/dist/src/render/strings.js.map +1 -0
  40. package/dist/src/render/term-archive.d.ts +5 -5
  41. package/dist/src/render/term-archive.d.ts.map +1 -1
  42. package/dist/src/render/term-archive.js +14 -12
  43. package/dist/src/render/term-archive.js.map +1 -1
  44. package/dist/src/render/widget-areas.d.ts +20 -0
  45. package/dist/src/render/widget-areas.d.ts.map +1 -0
  46. package/dist/src/render/widget-areas.js +40 -0
  47. package/dist/src/render/widget-areas.js.map +1 -0
  48. package/package.json +5 -5
  49. package/src/index.ts +1 -0
  50. package/src/render/arrow-link.ts +27 -0
  51. package/src/render/blocks/collection-list.ts +53 -15
  52. package/src/render/blocks/embed.ts +3 -2
  53. package/src/render/blocks/gallery.ts +4 -1
  54. package/src/render/blocks/hero.ts +9 -2
  55. package/src/render/blocks/pricing-table.ts +22 -4
  56. package/src/render/chrome.ts +156 -70
  57. package/src/render/dates.ts +14 -0
  58. package/src/render/render-block.ts +6 -0
  59. package/src/render/strings.ts +30 -0
  60. package/src/render/term-archive.ts +54 -32
  61. package/src/render/widget-areas.ts +44 -0
  62. package/src/styles/archive.css +66 -20
  63. package/src/styles/base.css +266 -680
  64. package/src/styles/blocks.css +678 -811
  65. package/src/styles/chrome.css +469 -0
  66. package/src/styles/listings.css +183 -0
  67. package/src/styles/theme.css +28 -14
  68. package/src/styles/tokens.css +192 -205
  69. package/src/styles/utility.css +295 -0
  70. package/src/styles/widgets.css +1064 -0
  71. package/tokens.json +15 -15
@@ -0,0 +1,1064 @@
1
+ /*
2
+ * Widget areas (contract D `theme@1.6`): the sidebar beside a reading page,
3
+ * the bands before and after the content, and the footer's widget row.
4
+ *
5
+ * The host draws one markup for every theme (`cg-sidebar-layout`,
6
+ * `cg-widget-area`, `cg-widget`, see `renderWidgetArea` in
7
+ * `@cogenta/theme-kit`); this sheet only sets it in this theme's register, the
8
+ * same one its blocks use: every widget opens under a rule in ink like a
9
+ * section title, lists run between hairlines, dates and counts are tabular
10
+ * and muted, links are set in ink and turn to the accent on hover, a quotation
11
+ * is in the display face, and the one filled control is in ink. No card, no
12
+ * shadow, no tint of the accent.
13
+ *
14
+ * It comes last in `theme.css`, after `utility.css`, so the few rules that
15
+ * reset a block for the narrower content column win without a heavier
16
+ * selector. The host's zero-weight floor (`WIDGET_FLOOR_CSS`) sits under all
17
+ * of it: every property it sets that this theme reads differently is set
18
+ * again here.
19
+ */
20
+
21
+ /* --------------------------------------------------------------------------
22
+ The layout of a reading page
23
+ --------------------------------------------------------------------------
24
+
25
+ The layout is as wide as the page and holds the page's own inset, so the
26
+ content column starts on the header's left edge. On a wide screen it is
27
+ the twelve-column grid: the content takes the first eight columns, the
28
+ sidebar the last four, pushed off the text by one more column gap, a double
29
+ gutter that keeps a cover photograph from touching the widgets.
30
+
31
+ Inside the content column every block, title and form already pads itself
32
+ with `--cg-inset`; setting that to zero there is what puts them on the
33
+ column's edges instead of the page's, in one declaration rather than one
34
+ reset per block.
35
+ -------------------------------------------------------------------------- */
36
+
37
+ .cg-sidebar-layout {
38
+ display: grid;
39
+ grid-template-columns: minmax(0, 1fr);
40
+ column-gap: var(--cg-column-gap);
41
+ row-gap: 0;
42
+ inline-size: auto;
43
+ margin-inline: 0;
44
+ padding-block: 0;
45
+ padding-inline: var(--cg-inset);
46
+ }
47
+
48
+ .cg-sidebar-layout__content {
49
+ --cg-inset: 0px;
50
+ min-inline-size: 0;
51
+ }
52
+
53
+ .cg-sidebar-layout__aside {
54
+ align-self: start;
55
+ padding-block: calc(var(--cg-section) / 4) calc(var(--cg-section) / 2);
56
+ border-block-start: 0;
57
+ }
58
+
59
+ @media (min-width: 40rem) and (max-width: 63.99rem) {
60
+ /* Under the content, the sidebar takes as many columns as the width holds. */
61
+ .cg-sidebar-layout__aside {
62
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
63
+ column-gap: var(--cg-column-gap);
64
+ }
65
+ }
66
+
67
+ @media (min-width: 64rem) {
68
+ .cg-sidebar-layout {
69
+ grid-template-columns: repeat(var(--cg-columns), minmax(0, 1fr));
70
+ }
71
+
72
+ .cg-sidebar-layout__content {
73
+ grid-column: 1 / span 8;
74
+ }
75
+
76
+ /* The first widget's rule sits level with the first line of the page:
77
+ the entry header, the archive head and the page title all open with the
78
+ same padding. */
79
+ .cg-sidebar-layout__aside {
80
+ grid-column: 9 / -1;
81
+ padding-block-start: calc(var(--cg-section) * 0.6);
82
+ padding-inline-start: var(--cg-column-gap);
83
+ }
84
+
85
+ /* The blocks that keep to the reading columns of a full page (eight or ten
86
+ of twelve) take the whole column instead: it is already a reading width. */
87
+ .cg-sidebar-layout__content
88
+ :is(
89
+ .cg-entry-header__title,
90
+ .cg-entry-header__excerpt,
91
+ .cg-hero__body,
92
+ .cg-quote__text,
93
+ .cg-embed > *,
94
+ .cg-testimonial > *,
95
+ .cg-accordion > *,
96
+ .cg-faq__items:first-child,
97
+ .cg-figure[data-align="center"] > *,
98
+ .cg-figure[data-align="wide"] .cg-figure__caption,
99
+ .cg-collection__empty
100
+ ) {
101
+ grid-column: 1 / -1;
102
+ }
103
+
104
+ /* A page title keeps to ten twelfths of the page; the column is narrower
105
+ than that already. */
106
+ .cg-sidebar-layout__content .cg-page__title {
107
+ padding-inline-end: 0;
108
+ }
109
+ }
110
+
111
+ /* A block with a band of its own (a call to action, a muted variant) keeps
112
+ its words off the band's edges once the band stops at the column. */
113
+ .cg-sidebar-layout__content :is(.cg-cta, [data-block][data-variant-background]) {
114
+ padding-inline: var(--cg-s6);
115
+ }
116
+
117
+ /* --------------------------------------------------------------------------
118
+ Areas
119
+ -------------------------------------------------------------------------- */
120
+
121
+ .cg-widget-area {
122
+ display: grid;
123
+ gap: var(--cg-s12);
124
+ align-content: start;
125
+ }
126
+
127
+ /* A band the host places around the page's own content (`content-before`,
128
+ `content-after`, and the sidebar of a home page or a page opening on a
129
+ hero): on the page width and the section rhythm, its widgets side by side
130
+ in as many columns as the width holds. Inside the content column the inset
131
+ is already zero, so the same rule puts it on the column. */
132
+ .cg-widget-area--placed {
133
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
134
+ gap: var(--cg-s12) var(--cg-column-gap);
135
+ inline-size: auto;
136
+ margin-inline: 0;
137
+ padding-block: calc(var(--cg-section) / 2);
138
+ padding-inline: var(--cg-inset);
139
+ border-block-start: 0;
140
+ }
141
+
142
+ .cg-widget-area--placed[data-area="sidebar"] {
143
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
144
+ border-block-start: 0;
145
+ }
146
+
147
+ /* The band before the content opens where a page's first line opens, level
148
+ with the sidebar's first rule, and leaves the space under it to the page
149
+ title that follows. */
150
+ .cg-widget-area--placed[data-area="content-before"] {
151
+ padding-block: calc(var(--cg-section) * 0.6) 0;
152
+ }
153
+
154
+ /* Two bands in a row are one section apart, not two. */
155
+ .cg-widget-area--placed + .cg-widget-area--placed {
156
+ padding-block-start: 0;
157
+ }
158
+
159
+ /* --------------------------------------------------------------------------
160
+ A widget
161
+ -------------------------------------------------------------------------- */
162
+
163
+ .cg-widget {
164
+ min-inline-size: 0;
165
+ color: var(--cg-ink);
166
+ }
167
+
168
+ /* The heading of a widget is the heading of a section at the sidebar's
169
+ scale: in the text face, under a rule in ink. */
170
+ .cg-widget__title {
171
+ margin: 0 0 var(--cg-s5);
172
+ padding-block-start: var(--cg-s4);
173
+ border-block-start: var(--cg-rule) solid var(--cg-ink);
174
+ color: var(--cg-ink);
175
+ font-family: var(--cg-font-text);
176
+ font-size: var(--cg-text-md);
177
+ font-weight: var(--cg-weight-semibold);
178
+ line-height: var(--cg-leading-heading);
179
+ letter-spacing: var(--cg-tracking-heading);
180
+ text-transform: none;
181
+ }
182
+
183
+ .cg-widget__body {
184
+ font-size: var(--cg-text-md);
185
+ line-height: var(--cg-leading-snug);
186
+ }
187
+
188
+ .cg-widget__body :is(ul, ol) {
189
+ margin: 0;
190
+ padding: 0;
191
+ list-style: none;
192
+ }
193
+
194
+ /* A link in a list is set in ink, like the menus; it turns to the accent,
195
+ underlined, under the pointer. */
196
+ .cg-widget
197
+ :is(
198
+ .cg-widget__link,
199
+ .cg-widget__entry-title,
200
+ .cg-widget__comment-entry,
201
+ .cg-widget__terms-label,
202
+ .cg-widget__archives-label,
203
+ .cg-widget__toc a,
204
+ .cg-widget__contact a
205
+ ) {
206
+ color: var(--cg-ink);
207
+ text-decoration-line: none;
208
+ }
209
+
210
+ .cg-widget
211
+ :is(
212
+ .cg-widget__link,
213
+ .cg-widget__entry-title,
214
+ .cg-widget__comment-entry,
215
+ .cg-widget__terms-label,
216
+ .cg-widget__archives-label,
217
+ .cg-widget__toc a,
218
+ .cg-widget__contact a
219
+ ):hover {
220
+ color: var(--cg-accent);
221
+ text-decoration-line: underline;
222
+ }
223
+
224
+ .cg-widget__empty {
225
+ color: var(--cg-ink-muted);
226
+ }
227
+
228
+ /* A widget without a title (a quotation, most often) still opens under the
229
+ rule in ink, so it starts on the same line as its titled neighbours. A call
230
+ to action is the exception: its band already sets it apart. */
231
+ .cg-widget > .cg-widget__body:first-child:not(:has(> .cg-widget__cta)) {
232
+ padding-block-start: var(--cg-s4);
233
+ border-block-start: var(--cg-rule) solid var(--cg-ink);
234
+ }
235
+
236
+ /* Dates, counts and captions: the smallest text the theme sets, muted, in
237
+ tabular figures so a column of them lines up. */
238
+ .cg-widget
239
+ :is(
240
+ .cg-widget__entry-date,
241
+ .cg-widget__comment-date,
242
+ .cg-widget__terms-count,
243
+ .cg-widget__archives-count,
244
+ .cg-widget__cloud-count,
245
+ .cg-widget__caption,
246
+ .cg-widget__quote-role
247
+ ) {
248
+ color: var(--cg-ink-muted);
249
+ font-size: var(--cg-text-label);
250
+ font-variant-numeric: tabular-nums;
251
+ line-height: var(--cg-leading-snug);
252
+ }
253
+
254
+ /* --------------------------------------------------------------------------
255
+ Rows between hairlines: links, terms, archives
256
+ -------------------------------------------------------------------------- */
257
+
258
+ .cg-widget__links,
259
+ .cg-widget__terms,
260
+ .cg-widget__archives,
261
+ .cg-widget__entries,
262
+ .cg-widget__comments {
263
+ border-block-end: var(--cg-rule) solid var(--cg-line);
264
+ }
265
+
266
+ .cg-widget
267
+ :is(
268
+ .cg-widget__links-item,
269
+ .cg-widget__terms-item,
270
+ .cg-widget__archives-item,
271
+ .cg-widget__entry,
272
+ .cg-widget__comment
273
+ ) {
274
+ padding-block: 0;
275
+ border-block-end: 0;
276
+ border-block-start: var(--cg-rule) solid var(--cg-line);
277
+ }
278
+
279
+ /* Under the title's own rule in ink, the first row needs no hairline. */
280
+ .cg-widget__title + .cg-widget__body > :is(ul, ol) > li:first-child {
281
+ border-block-start: 0;
282
+ }
283
+
284
+ .cg-widget__link {
285
+ display: block;
286
+ padding-block: var(--cg-s3);
287
+ }
288
+
289
+ .cg-widget__terms-item,
290
+ .cg-widget__archives-item {
291
+ display: flex;
292
+ align-items: baseline;
293
+ justify-content: space-between;
294
+ gap: var(--cg-s4);
295
+ }
296
+
297
+ .cg-widget__terms-label,
298
+ .cg-widget__archives-label {
299
+ padding-block: var(--cg-s3);
300
+ }
301
+
302
+ .cg-widget__terms-item[data-depth="1"],
303
+ .cg-widget__archives-item[data-depth="1"] {
304
+ padding-inline-start: var(--cg-s5);
305
+ }
306
+
307
+ .cg-widget__terms-item[data-depth="2"],
308
+ .cg-widget__archives-item[data-depth="2"] {
309
+ padding-inline-start: var(--cg-s10);
310
+ }
311
+
312
+ /* --------------------------------------------------------------------------
313
+ Entries and comments: an index at the sidebar's scale
314
+ -------------------------------------------------------------------------- */
315
+
316
+ .cg-widget__entry {
317
+ display: grid;
318
+ grid-template-columns: 4.5rem minmax(0, 1fr);
319
+ column-gap: var(--cg-s4);
320
+ align-items: start;
321
+ padding-block: var(--cg-s4);
322
+ }
323
+
324
+ .cg-widget .cg-widget__entry {
325
+ padding-block: var(--cg-s4);
326
+ }
327
+
328
+ .cg-widget__entry[data-image="none"] {
329
+ grid-template-columns: minmax(0, 1fr);
330
+ }
331
+
332
+ .cg-widget__entry-image {
333
+ inline-size: 100%;
334
+ aspect-ratio: 1;
335
+ }
336
+
337
+ /* The markup reads title, date, summary; the paint puts the date first, as
338
+ every list of entries in this theme does, so a reader scans by date and a
339
+ screen reader still hears the title first. */
340
+ .cg-widget__entry-text {
341
+ display: flex;
342
+ flex-direction: column;
343
+ gap: var(--cg-s1);
344
+ }
345
+
346
+ .cg-widget__entry-date {
347
+ order: -1;
348
+ }
349
+
350
+ .cg-widget__entry-title {
351
+ font-weight: var(--cg-weight-medium);
352
+ line-height: var(--cg-leading-heading);
353
+ text-wrap: balance;
354
+ }
355
+
356
+ .cg-widget__entry-excerpt {
357
+ margin-block-start: var(--cg-s1);
358
+ color: var(--cg-ink-muted);
359
+ font-size: var(--cg-text-sm);
360
+ }
361
+
362
+ .cg-widget .cg-widget__comment {
363
+ display: flex;
364
+ flex-direction: column;
365
+ gap: var(--cg-s1);
366
+ padding-block: var(--cg-s4);
367
+ }
368
+
369
+ .cg-widget__comment-author {
370
+ color: var(--cg-ink-muted);
371
+ font-size: var(--cg-text-label);
372
+ }
373
+
374
+ .cg-widget__comment-entry {
375
+ font-weight: var(--cg-weight-medium);
376
+ line-height: var(--cg-leading-heading);
377
+ }
378
+
379
+ .cg-widget__comment-excerpt {
380
+ display: -webkit-box;
381
+ overflow: hidden;
382
+ color: var(--cg-ink-muted);
383
+ font-size: var(--cg-text-sm);
384
+ -webkit-box-orient: vertical;
385
+ -webkit-line-clamp: 3;
386
+ }
387
+
388
+ /* In a band rather than a sidebar, the entries sit side by side, each under
389
+ its own hairline, the way the collection list's grid sets them. */
390
+ .cg-widget-area--placed .cg-widget__entries {
391
+ display: grid;
392
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
393
+ column-gap: var(--cg-column-gap);
394
+ border-block-end: 0;
395
+ }
396
+
397
+ .cg-widget-area--placed
398
+ .cg-widget__title
399
+ + .cg-widget__body
400
+ > .cg-widget__entries
401
+ > li:first-child {
402
+ border-block-start: var(--cg-rule) solid var(--cg-line);
403
+ }
404
+
405
+ .cg-widget-area--placed .cg-widget__entry {
406
+ grid-template-columns: minmax(0, 1fr);
407
+ row-gap: var(--cg-s4);
408
+ align-content: start;
409
+ }
410
+
411
+ .cg-widget-area--placed .cg-widget__entry-image {
412
+ aspect-ratio: 3 / 2;
413
+ }
414
+
415
+ .cg-widget-area--placed .cg-widget__entry-title {
416
+ font-size: var(--cg-text-lg);
417
+ font-weight: var(--cg-weight-semibold);
418
+ }
419
+
420
+ /* --------------------------------------------------------------------------
421
+ Words: text, about, quote, call to action, contact
422
+ -------------------------------------------------------------------------- */
423
+
424
+ .cg-widget__text {
425
+ max-inline-size: var(--cg-measure);
426
+ line-height: var(--cg-leading-body);
427
+ }
428
+
429
+ .cg-widget__text > * + * {
430
+ margin-block-start: var(--cg-s3);
431
+ }
432
+
433
+ .cg-widget__text :is(ul, ol) {
434
+ padding-inline-start: 1.25em;
435
+ list-style: revert;
436
+ }
437
+
438
+ .cg-widget__about,
439
+ .cg-widget__cta {
440
+ display: grid;
441
+ justify-items: start;
442
+ gap: var(--cg-s3);
443
+ max-inline-size: var(--cg-measure);
444
+ }
445
+
446
+ .cg-widget__about-image {
447
+ inline-size: 100%;
448
+ aspect-ratio: 3 / 2;
449
+ margin-block-end: var(--cg-s2);
450
+ }
451
+
452
+ .cg-widget__about-heading,
453
+ .cg-widget__cta-heading {
454
+ margin: 0;
455
+ color: var(--cg-ink);
456
+ font-family: var(--cg-font-text);
457
+ font-size: var(--cg-text-lg);
458
+ font-weight: var(--cg-weight-semibold);
459
+ line-height: var(--cg-leading-heading);
460
+ letter-spacing: var(--cg-tracking-heading);
461
+ }
462
+
463
+ .cg-widget__about-body,
464
+ .cg-widget__cta-body {
465
+ color: var(--cg-ink-muted);
466
+ line-height: var(--cg-leading-body);
467
+ }
468
+
469
+ /* The about link reads as every arrow link in the theme: words in ink under
470
+ one underline, the arrow after them, never alone on a line. */
471
+ .cg-widget__about-link {
472
+ display: inline-block;
473
+ padding-block: var(--cg-s1);
474
+ color: var(--cg-ink);
475
+ font-weight: var(--cg-weight-semibold);
476
+ text-decoration-line: underline;
477
+ text-decoration-color: var(--cg-underline);
478
+ white-space: nowrap;
479
+ }
480
+
481
+ .cg-widget__about-link::after {
482
+ content: "\2192" / "";
483
+ display: inline-block;
484
+ margin-inline-start: 0.35em;
485
+ }
486
+
487
+ .cg-widget__about-link:hover {
488
+ color: var(--cg-accent);
489
+ text-decoration-color: currentColor;
490
+ }
491
+
492
+ /* A quotation in the display face, its opening mark hung outside the text. */
493
+ .cg-widget__quote {
494
+ margin: 0;
495
+ }
496
+
497
+ .cg-widget__quote-text {
498
+ margin: 0;
499
+ quotes: "\201C" "\201D";
500
+ font-family: var(--cg-font-display);
501
+ font-size: var(--cg-text-xl);
502
+ font-weight: var(--cg-weight-regular);
503
+ line-height: var(--cg-leading-snug);
504
+ letter-spacing: var(--cg-tracking-display);
505
+ }
506
+
507
+ .cg-widget__quote-text p {
508
+ text-indent: -0.42em;
509
+ text-wrap: pretty;
510
+ }
511
+
512
+ .cg-widget__quote-text p::before {
513
+ content: open-quote;
514
+ }
515
+
516
+ .cg-widget__quote-text p::after {
517
+ content: close-quote;
518
+ }
519
+
520
+ .cg-widget__quote-source {
521
+ display: flex;
522
+ flex-direction: column;
523
+ gap: 0;
524
+ margin-block-start: var(--cg-s5);
525
+ font-size: var(--cg-text-sm);
526
+ }
527
+
528
+ .cg-widget__quote-name {
529
+ color: var(--cg-ink);
530
+ font-weight: var(--cg-weight-semibold);
531
+ }
532
+
533
+ /* The one widget that asks for something, on a band a step off the page like
534
+ the call-to-action block, its action the one filled control. */
535
+ .cg-widget__cta {
536
+ max-inline-size: none;
537
+ padding: var(--cg-s6);
538
+ background: var(--cg-band);
539
+ }
540
+
541
+ .cg-widget__cta-action {
542
+ display: inline-flex;
543
+ align-items: center;
544
+ justify-content: center;
545
+ min-block-size: 2.75rem;
546
+ margin-block-start: var(--cg-s2);
547
+ padding: var(--cg-s2) var(--cg-s5);
548
+ border: var(--cg-rule) solid var(--cg-action);
549
+ border-radius: var(--cg-radius-control);
550
+ background: var(--cg-action);
551
+ color: var(--cg-action-fg);
552
+ font-weight: var(--cg-weight-semibold);
553
+ line-height: var(--cg-leading-heading);
554
+ text-decoration: none;
555
+ transition:
556
+ background-color var(--cg-duration) var(--cg-ease),
557
+ border-color var(--cg-duration) var(--cg-ease);
558
+ }
559
+
560
+ .cg-widget__cta-action:hover {
561
+ border-color: var(--cg-action-hover);
562
+ background: var(--cg-action-hover);
563
+ color: var(--cg-action-fg);
564
+ }
565
+
566
+ .cg-widget__contact {
567
+ display: grid;
568
+ gap: var(--cg-s3);
569
+ }
570
+
571
+ .cg-widget__contact-line {
572
+ display: flex;
573
+ align-items: flex-start;
574
+ gap: var(--cg-s3);
575
+ margin: 0;
576
+ overflow-wrap: anywhere;
577
+ white-space: pre-line;
578
+ }
579
+
580
+ .cg-widget__icon {
581
+ flex: none;
582
+ margin-block-start: 0.2em;
583
+ color: var(--cg-ink-muted);
584
+ }
585
+
586
+ /* Opening hours as a ledger: the day, then the hours at the end of the row. */
587
+ .cg-widget__hours {
588
+ display: grid;
589
+ grid-template-columns: minmax(0, 1fr) auto;
590
+ gap: 0;
591
+ margin: var(--cg-s3) 0 0;
592
+ border-block-end: var(--cg-rule) solid var(--cg-line);
593
+ }
594
+
595
+ .cg-widget__hours-label,
596
+ .cg-widget__hours-value {
597
+ margin: 0;
598
+ padding-block: var(--cg-s2);
599
+ border-block-start: var(--cg-rule) solid var(--cg-line);
600
+ }
601
+
602
+ .cg-widget__hours-value {
603
+ padding-inline-start: var(--cg-s4);
604
+ color: var(--cg-ink-muted);
605
+ font-variant-numeric: tabular-nums;
606
+ text-align: end;
607
+ }
608
+
609
+ /* --------------------------------------------------------------------------
610
+ Pictures: image, gallery, embed
611
+ -------------------------------------------------------------------------- */
612
+
613
+ .cg-widget__figure {
614
+ display: grid;
615
+ gap: var(--cg-s3);
616
+ }
617
+
618
+ .cg-widget__image {
619
+ inline-size: 100%;
620
+ }
621
+
622
+ .cg-widget__gallery {
623
+ display: grid;
624
+ grid-template-columns: repeat(3, minmax(0, 1fr));
625
+ gap: var(--cg-s2);
626
+ }
627
+
628
+ .cg-widget__gallery[data-columns="2"] {
629
+ grid-template-columns: repeat(2, minmax(0, 1fr));
630
+ }
631
+
632
+ .cg-widget__gallery[data-columns="4"] {
633
+ grid-template-columns: repeat(4, minmax(0, 1fr));
634
+ }
635
+
636
+ .cg-widget__gallery-item {
637
+ min-inline-size: 0;
638
+ }
639
+
640
+ .cg-widget__gallery-image {
641
+ inline-size: 100%;
642
+ aspect-ratio: 1;
643
+ }
644
+
645
+ .cg-widget__embed {
646
+ display: grid;
647
+ gap: var(--cg-s3);
648
+ }
649
+
650
+ .cg-widget__frame {
651
+ inline-size: 100%;
652
+ aspect-ratio: 16 / 9;
653
+ border: 0;
654
+ }
655
+
656
+ /* --------------------------------------------------------------------------
657
+ Words to follow: tag cloud, table of contents, social profiles
658
+ -------------------------------------------------------------------------- */
659
+
660
+ /* A tag cloud is words, not pills: each at a step of the type scale, in ink,
661
+ underlined only under the pointer so the sizes do the talking. */
662
+ .cg-widget__cloud {
663
+ display: flex;
664
+ flex-wrap: wrap;
665
+ align-items: baseline;
666
+ gap: var(--cg-s1) var(--cg-s4);
667
+ }
668
+
669
+ .cg-widget__cloud-item {
670
+ display: inline-flex;
671
+ align-items: baseline;
672
+ gap: var(--cg-s1);
673
+ line-height: var(--cg-leading-heading);
674
+ }
675
+
676
+ .cg-widget__cloud-item a {
677
+ color: var(--cg-ink);
678
+ text-decoration-line: none;
679
+ }
680
+
681
+ .cg-widget__cloud-item a:hover {
682
+ color: var(--cg-accent);
683
+ text-decoration-line: underline;
684
+ }
685
+
686
+ .cg-widget__cloud-item[data-weight="1"] {
687
+ font-size: var(--cg-text-label);
688
+ }
689
+
690
+ .cg-widget__cloud-item[data-weight="2"] {
691
+ font-size: var(--cg-text-sm);
692
+ }
693
+
694
+ .cg-widget__cloud-item[data-weight="3"] {
695
+ font-size: var(--cg-text-md);
696
+ }
697
+
698
+ .cg-widget__cloud-item[data-weight="4"] {
699
+ font-size: var(--cg-text-lg);
700
+ font-weight: var(--cg-weight-medium);
701
+ }
702
+
703
+ .cg-widget__cloud-item[data-weight="5"] {
704
+ font-size: var(--cg-text-xl);
705
+ font-weight: var(--cg-weight-medium);
706
+ }
707
+
708
+ .cg-widget__cloud-item .cg-widget__cloud-count {
709
+ font-size: var(--cg-text-label);
710
+ font-weight: var(--cg-weight-regular);
711
+ }
712
+
713
+ /* The page's outline hangs off one hairline, each level a step in. */
714
+ .cg-widget__toc {
715
+ border-inline-start: var(--cg-rule) solid var(--cg-line);
716
+ }
717
+
718
+ .cg-widget .cg-widget__toc-item {
719
+ padding-block: 0;
720
+ padding-inline-start: var(--cg-s4);
721
+ border-block-end: 0;
722
+ }
723
+
724
+ .cg-widget__toc-item a {
725
+ display: block;
726
+ padding-block: var(--cg-s1);
727
+ font-size: var(--cg-text-sm);
728
+ }
729
+
730
+ .cg-widget .cg-widget__toc-item[data-depth="1"] {
731
+ padding-inline-start: var(--cg-s8);
732
+ }
733
+
734
+ .cg-widget .cg-widget__toc-item[data-depth="2"] {
735
+ padding-inline-start: var(--cg-s12);
736
+ }
737
+
738
+ .cg-widget__social {
739
+ display: flex;
740
+ flex-wrap: wrap;
741
+ gap: var(--cg-s2);
742
+ }
743
+
744
+ .cg-widget__social-item a {
745
+ display: flex;
746
+ align-items: center;
747
+ justify-content: center;
748
+ inline-size: 2.75rem;
749
+ block-size: 2.75rem;
750
+ border: var(--cg-rule) solid var(--cg-line-strong);
751
+ border-radius: var(--cg-radius-control);
752
+ color: var(--cg-ink);
753
+ transition:
754
+ color var(--cg-duration) var(--cg-ease),
755
+ border-color var(--cg-duration) var(--cg-ease);
756
+ }
757
+
758
+ .cg-widget__social-item a:hover {
759
+ border-color: var(--cg-ink);
760
+ color: var(--cg-accent);
761
+ }
762
+
763
+ /* --------------------------------------------------------------------------
764
+ Controls: search, a jump list, a form, the calendar
765
+ -------------------------------------------------------------------------- */
766
+
767
+ .cg-widget__search,
768
+ .cg-widget__jump {
769
+ display: flex;
770
+ gap: var(--cg-s2);
771
+ }
772
+
773
+ .cg-widget__search-input,
774
+ .cg-widget__jump select,
775
+ .cg-widget__form :is(input:not([type="checkbox"], [type="radio"]), select, textarea) {
776
+ flex: 1 1 auto;
777
+ inline-size: 100%;
778
+ min-inline-size: 0;
779
+ min-block-size: 2.75rem;
780
+ padding: var(--cg-s2) var(--cg-s3);
781
+ border: var(--cg-rule) solid var(--cg-line-strong);
782
+ border-radius: var(--cg-radius-control);
783
+ background: var(--cg-canvas);
784
+ color: var(--cg-ink);
785
+ font: inherit;
786
+ transition: border-color var(--cg-duration) var(--cg-ease);
787
+ }
788
+
789
+ .cg-widget__search-input:hover,
790
+ .cg-widget__jump select:hover,
791
+ .cg-widget__form :is(input, select, textarea):hover {
792
+ border-color: var(--cg-ink);
793
+ }
794
+
795
+ .cg-widget__search-input::placeholder {
796
+ color: var(--cg-ink-muted);
797
+ }
798
+
799
+ .cg-widget__search-button,
800
+ .cg-widget__jump-button {
801
+ flex: none;
802
+ min-block-size: 2.75rem;
803
+ padding: var(--cg-s2) var(--cg-s4);
804
+ border: var(--cg-rule) solid var(--cg-action);
805
+ border-radius: var(--cg-radius-control);
806
+ background: var(--cg-action);
807
+ color: var(--cg-action-fg);
808
+ font: inherit;
809
+ font-weight: var(--cg-weight-semibold);
810
+ cursor: pointer;
811
+ transition:
812
+ background-color var(--cg-duration) var(--cg-ease),
813
+ border-color var(--cg-duration) var(--cg-ease);
814
+ }
815
+
816
+ .cg-widget__search-button:hover,
817
+ .cg-widget__jump-button:hover {
818
+ border-color: var(--cg-action-hover);
819
+ background: var(--cg-action-hover);
820
+ }
821
+
822
+ /* A form in a widget is the site's public form at the sidebar's width: the
823
+ page frame's inset and margins belong to the form page, not to this. */
824
+ .cg-widget__form {
825
+ display: grid;
826
+ gap: var(--cg-s4);
827
+ margin: 0;
828
+ padding-inline: 0;
829
+ }
830
+
831
+ .cg-widget__form .cg-form__field {
832
+ margin: 0;
833
+ }
834
+
835
+ .cg-widget__form label {
836
+ display: block;
837
+ margin-block-end: var(--cg-s1);
838
+ font-size: var(--cg-text-sm);
839
+ font-weight: var(--cg-weight-semibold);
840
+ }
841
+
842
+ .cg-widget__form .cg-form__field[data-kind="checkbox"] label {
843
+ display: flex;
844
+ align-items: baseline;
845
+ gap: var(--cg-s2);
846
+ font-weight: var(--cg-weight-regular);
847
+ }
848
+
849
+ .cg-widget__form-submit {
850
+ justify-self: start;
851
+ }
852
+
853
+ .cg-widget__form-link {
854
+ font-weight: var(--cg-weight-semibold);
855
+ }
856
+
857
+ /* A month as a table of figures: the month's name first, the days on seven
858
+ even columns, a day with writing in ink and underlined. */
859
+ .cg-widget__calendar {
860
+ min-inline-size: 0;
861
+ }
862
+
863
+ .cg-widget__calendar-table {
864
+ inline-size: 100%;
865
+ border-collapse: collapse;
866
+ table-layout: fixed;
867
+ font-variant-numeric: tabular-nums;
868
+ text-align: center;
869
+ }
870
+
871
+ .cg-widget__calendar-table caption {
872
+ padding-block-end: var(--cg-s3);
873
+ color: var(--cg-ink);
874
+ font-weight: var(--cg-weight-semibold);
875
+ text-align: start;
876
+ }
877
+
878
+ .cg-widget__calendar-table th {
879
+ padding-block: var(--cg-s2);
880
+ border-block-end: var(--cg-rule) solid var(--cg-line);
881
+ color: var(--cg-ink-muted);
882
+ font-size: var(--cg-text-label);
883
+ font-weight: var(--cg-weight-medium);
884
+ }
885
+
886
+ .cg-widget__calendar-table td,
887
+ .cg-widget__calendar-pad {
888
+ block-size: 2.25rem;
889
+ padding: 0;
890
+ color: var(--cg-ink-muted);
891
+ font-size: var(--cg-text-sm);
892
+ }
893
+
894
+ .cg-widget__calendar-table td[data-posts] a {
895
+ display: flex;
896
+ align-items: center;
897
+ justify-content: center;
898
+ block-size: 2.25rem;
899
+ color: var(--cg-ink);
900
+ font-weight: var(--cg-weight-semibold);
901
+ text-decoration-color: var(--cg-underline);
902
+ }
903
+
904
+ .cg-widget__calendar-table td[data-posts] a:hover {
905
+ color: var(--cg-accent);
906
+ text-decoration-color: currentColor;
907
+ }
908
+
909
+ .cg-widget__calendar-nav {
910
+ display: flex;
911
+ justify-content: space-between;
912
+ gap: var(--cg-s4);
913
+ margin: var(--cg-s3) 0 0;
914
+ padding-block-start: var(--cg-s3);
915
+ border-block-start: var(--cg-rule) solid var(--cg-line);
916
+ font-size: var(--cg-text-sm);
917
+ }
918
+
919
+ .cg-widget__calendar-nav a {
920
+ color: var(--cg-ink);
921
+ text-decoration-color: var(--cg-underline);
922
+ }
923
+
924
+ .cg-widget__calendar-nav a:hover {
925
+ color: var(--cg-accent);
926
+ text-decoration-color: currentColor;
927
+ }
928
+
929
+ /* The months either side read as the theme's arrow links: the arrow outside
930
+ the words, on their side. */
931
+ .cg-widget__calendar-previous::before {
932
+ content: "\2190" / "";
933
+ display: inline-block;
934
+ margin-inline-end: 0.35em;
935
+ }
936
+
937
+ .cg-widget__calendar-next {
938
+ margin-inline-start: auto;
939
+ }
940
+
941
+ .cg-widget__calendar-next::after {
942
+ content: "\2192" / "";
943
+ display: inline-block;
944
+ margin-inline-start: 0.35em;
945
+ }
946
+
947
+ /* The page being shown, in any list of a widget: in ink and heavier. Last, so
948
+ it holds over every list's own link colour. */
949
+ .cg-widget [aria-current="page"],
950
+ .cg-widget [aria-current="page"] > a {
951
+ color: var(--cg-ink);
952
+ font-weight: var(--cg-weight-semibold);
953
+ }
954
+
955
+ /* --------------------------------------------------------------------------
956
+ The footer's widget row (`renderChrome`)
957
+ --------------------------------------------------------------------------
958
+
959
+ One row of its own on the footer grid, under the identity and the menu and
960
+ above the legal line, in the footer's small type. A column's heading reads
961
+ as a footer menu heading does, without the rule a page's sidebar opens
962
+ with: the footer band already sets these apart.
963
+ -------------------------------------------------------------------------- */
964
+
965
+ .cg-site-footer__widgets {
966
+ display: grid;
967
+ grid-template-columns: minmax(0, 1fr);
968
+ gap: var(--cg-s10) var(--cg-column-gap);
969
+ padding-block-start: var(--cg-s10);
970
+ border-block-start: var(--cg-rule) solid var(--cg-line);
971
+ }
972
+
973
+ @media (min-width: 40rem) {
974
+ .cg-site-footer__widgets:not([data-columns="1"]) {
975
+ grid-template-columns: repeat(2, minmax(0, 1fr));
976
+ }
977
+ }
978
+
979
+ @media (min-width: 64rem) {
980
+ .cg-site-footer__widgets[data-columns="3"] {
981
+ grid-template-columns: repeat(3, minmax(0, 1fr));
982
+ }
983
+
984
+ .cg-site-footer__widgets[data-columns="4"] {
985
+ grid-template-columns: repeat(4, minmax(0, 1fr));
986
+ }
987
+ }
988
+
989
+ .cg-footer-widgets__column {
990
+ gap: var(--cg-s8);
991
+ }
992
+
993
+ .cg-site-footer .cg-widget {
994
+ color: var(--cg-ink-muted);
995
+ }
996
+
997
+ .cg-site-footer .cg-widget > .cg-widget__body:first-child {
998
+ padding-block-start: 0;
999
+ border-block-start: 0;
1000
+ }
1001
+
1002
+ .cg-site-footer .cg-widget__title {
1003
+ margin-block-end: var(--cg-s3);
1004
+ padding-block-start: 0;
1005
+ border-block-start: 0;
1006
+ font-size: var(--cg-text-sm);
1007
+ }
1008
+
1009
+ .cg-site-footer .cg-widget__body {
1010
+ font-size: var(--cg-text-sm);
1011
+ }
1012
+
1013
+ .cg-site-footer
1014
+ :is(
1015
+ .cg-widget__links,
1016
+ .cg-widget__terms,
1017
+ .cg-widget__archives,
1018
+ .cg-widget__entries,
1019
+ .cg-widget__comments
1020
+ ) {
1021
+ border-block-end: 0;
1022
+ }
1023
+
1024
+ .cg-site-footer
1025
+ .cg-widget
1026
+ :is(
1027
+ .cg-widget__links-item,
1028
+ .cg-widget__terms-item,
1029
+ .cg-widget__archives-item,
1030
+ .cg-widget__entry,
1031
+ .cg-widget__comment
1032
+ ) {
1033
+ border-block-start: 0;
1034
+ }
1035
+
1036
+ .cg-site-footer :is(.cg-widget__link, .cg-widget__terms-label, .cg-widget__archives-label) {
1037
+ padding-block: var(--cg-s1);
1038
+ }
1039
+
1040
+ .cg-site-footer .cg-widget .cg-widget__entry,
1041
+ .cg-site-footer .cg-widget .cg-widget__comment {
1042
+ padding-block: var(--cg-s2);
1043
+ }
1044
+
1045
+ .cg-site-footer .cg-widget__quote-text {
1046
+ color: var(--cg-ink);
1047
+ font-size: var(--cg-text-lg);
1048
+ }
1049
+
1050
+ /* On the footer band a call to action takes the page's ground, the one step
1051
+ that still sets it apart there in both schemes. */
1052
+ .cg-site-footer .cg-widget__cta {
1053
+ padding: var(--cg-s5);
1054
+ background: var(--cg-canvas);
1055
+ }
1056
+
1057
+ .cg-site-footer .cg-widget__about-heading,
1058
+ .cg-site-footer .cg-widget__cta-heading {
1059
+ font-size: var(--cg-text-md);
1060
+ }
1061
+
1062
+ .cg-site-footer .cg-widget__hours-label {
1063
+ color: var(--cg-ink);
1064
+ }