@uvalib/web-components 1.10.0 → 1.11.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.md +43 -5
  3. package/dist/base.css +7 -1
  4. package/dist/components/uvalib-contents/UvalibContents.d.ts +66 -2
  5. package/dist/components/uvalib-contents/UvalibContents.js +277 -29
  6. package/dist/components/uvalib-contents/UvalibContents.js.map +1 -1
  7. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.d.ts +27 -1
  8. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js +92 -1
  9. package/dist/components/uvalib-pagefind-search/UvalibPagefindSearch.js.map +1 -1
  10. package/dist/custom-elements.json +400 -6
  11. package/dist/pagefind.css +144 -0
  12. package/dist/styles/base.js +7 -1
  13. package/dist/styles/base.js.map +1 -1
  14. package/dist/styles/pagefind.js +150 -0
  15. package/dist/styles/pagefind.js.map +1 -1
  16. package/dist-cdn/base.css +7 -1
  17. package/dist-cdn/chunks/{base-DXkGlSgH.js → base-DmImIMld.js} +8 -2
  18. package/dist-cdn/chunks/{base-DXkGlSgH.js.map → base-DmImIMld.js.map} +1 -1
  19. package/dist-cdn/custom-elements.json +400 -6
  20. package/dist-cdn/manifest.json +1 -1
  21. package/dist-cdn/pagefind.css +144 -0
  22. package/dist-cdn/site-page.js +1 -1
  23. package/dist-cdn/site-style.js +1 -1
  24. package/dist-cdn/skills/uvalib-web-components/SKILL.md +2 -2
  25. package/dist-cdn/skills/uvalib-web-components/reference/components.md +13 -4
  26. package/dist-cdn/uvalib-contents.js +185 -47
  27. package/dist-cdn/uvalib-contents.js.map +1 -1
  28. package/dist-cdn/uvalib-pagefind-search.js +64 -34
  29. package/dist-cdn/uvalib-pagefind-search.js.map +1 -1
  30. package/package.json +1 -1
  31. package/skills/uvalib-web-components/SKILL.md +2 -2
  32. package/skills/uvalib-web-components/reference/components.md +13 -4
package/dist/pagefind.css CHANGED
@@ -365,6 +365,138 @@
365
365
  font-weight: 700;
366
366
  line-height: 1.5;
367
367
  }
368
+ /* While a search from the URL loads (issue #37): at least a screen's height, so what follows
369
+ stays below the fold, and placeholder results in place of Pagefind's results area until
370
+ they are drawn. A page may set searching in its HTML, so this holds from first paint. */
371
+ uvalib-pagefind-search[searching]:not([no-skeleton]) {
372
+ min-block-size: 100vh;
373
+ }
374
+ uvalib-pagefind-search[searching]:not([no-skeleton]) .pagefind-ui__drawer {
375
+ display: none;
376
+ }
377
+ /* Before the element's script runs: the same placeholders, drawn as still bars where the
378
+ label, field, results message and rows will be (::before the message, ::after the rows,
379
+ each row a repeating tile of gradient bars; with show-sub-results, two sections a row). */
380
+ uvalib-pagefind-search[searching]:not([no-skeleton]):not(:defined) {
381
+ --_bar: var(--uva-color-track, var(--uva-grey-200, #f1f1f1));
382
+ --_top: calc(1.5em + 0.35rem + 56px + 1.25rem);
383
+ --_msg: calc(1.95rem + 1.5em);
384
+ --_row: calc(1px + 4.41rem + 4.5em);
385
+ /* A row: its top border, title and short last line (60% wide), then two full lines. */
386
+ --_l: calc(1px + 3.16rem + 0.25em);
387
+ --_rows:
388
+ linear-gradient(var(--_bar) 0 1px, transparent 0),
389
+ linear-gradient(transparent 0 calc(1px + 1.43rem), var(--_bar) 0 calc(1px + 2.63rem), transparent 0 calc(var(--_l) + 3em), var(--_bar) 0 calc(var(--_l) + 4em), transparent 0),
390
+ linear-gradient(transparent 0 calc(var(--_l)), var(--_bar) 0 calc(var(--_l) + 1em), transparent 0 calc(var(--_l) + 1.5em), var(--_bar) 0 calc(var(--_l) + 2.5em), transparent 0);
391
+ --_sizes: 100% var(--_row), 60% var(--_row), 100% var(--_row);
392
+ }
393
+ uvalib-pagefind-search[searching]:not([no-skeleton]):not(:defined)[label-hidden] {
394
+ --_top: calc(56px + 1.25rem);
395
+ }
396
+ uvalib-pagefind-search[searching]:not([no-skeleton]):not(:defined)::before,
397
+ uvalib-pagefind-search[searching]:not([no-skeleton]):not(:defined)::after {
398
+ content: '';
399
+ display: block;
400
+ background-repeat: no-repeat;
401
+ }
402
+ uvalib-pagefind-search[searching]:not([no-skeleton]):not(:defined)::before {
403
+ /* No margin: it would collapse with the margin above the element. */
404
+ block-size: calc(var(--_top) + var(--_msg));
405
+ background-image: linear-gradient(var(--_bar) 0 0);
406
+ background-position: 0 calc(var(--_top) + 0.6rem + 0.25em);
407
+ background-size: min(14rem, 70%) 1em;
408
+ }
409
+ uvalib-pagefind-search[searching]:not([no-skeleton]):not(:defined)::after {
410
+ block-size: calc(100vh - var(--_top) - var(--_msg));
411
+ background-repeat: repeat-y;
412
+ background-image: var(--_rows);
413
+ background-size: var(--_sizes);
414
+ }
415
+ /* Each section: a 3px bar beside a title and two lines (the last 60%), 0.75rem below. */
416
+ uvalib-pagefind-search[searching]:not([no-skeleton]):not(:defined)[show-sub-results] {
417
+ --_row: calc(1px + 8.51rem + 10.5em);
418
+ --_s: calc(1px + 3.91rem + 4.5em);
419
+ --_t: calc(var(--_s) + 2.05rem + 3em);
420
+ }
421
+ uvalib-pagefind-search[searching]:not([no-skeleton]):not(:defined)[show-sub-results]::after {
422
+ --_in: calc(100% - 1rem - 3px);
423
+ background-image:
424
+ var(--_rows),
425
+ linear-gradient(transparent 0 calc(var(--_s)), var(--_bar) 0 calc(var(--_s) + 1.3rem + 3em), transparent 0 calc(var(--_t)), var(--_bar) 0 calc(var(--_t) + 1.3rem + 3em), transparent 0),
426
+ linear-gradient(transparent 0 calc(var(--_s) + 0.15rem), var(--_bar) 0 calc(var(--_s) + 1.15rem), transparent 0 calc(var(--_t) + 0.15rem), var(--_bar) 0 calc(var(--_t) + 1.15rem), transparent 0),
427
+ linear-gradient(transparent 0 calc(var(--_s) + 1.3rem + 0.25em), var(--_bar) 0 calc(var(--_s) + 1.3rem + 1.25em), transparent 0 calc(var(--_t) + 1.3rem + 0.25em), var(--_bar) 0 calc(var(--_t) + 1.3rem + 1.25em), transparent 0),
428
+ linear-gradient(transparent 0 calc(var(--_s) + 1.3rem + 1.75em), var(--_bar) 0 calc(var(--_s) + 1.3rem + 2.75em), transparent 0 calc(var(--_t) + 1.3rem + 1.75em), var(--_bar) 0 calc(var(--_t) + 1.3rem + 2.75em), transparent 0);
429
+ background-position:
430
+ 0 0,
431
+ 0 0,
432
+ 0 0,
433
+ 0 0,
434
+ calc(1rem + 3px) 0,
435
+ calc(1rem + 3px) 0,
436
+ calc(1rem + 3px) 0;
437
+ background-size:
438
+ var(--_sizes),
439
+ 3px var(--_row),
440
+ calc(var(--_in) * 0.45) var(--_row),
441
+ var(--_in) var(--_row),
442
+ calc(var(--_in) * 0.6) var(--_row);
443
+ }
444
+ /* The field's height before Pagefind draws it, so the placeholders below it stay put. */
445
+ uvalib-pagefind-search[searching] > .uvalib-pagefind-search__ui {
446
+ min-block-size: 56px;
447
+ }
448
+ /* Sized like the results area: its message, then rows like .pagefind-ui__result. The bars
449
+ are base.css's .uvalib-skeleton-text (its shimmer, reduced motion and forced colors); the
450
+ sizes and colour here hold without base.css. */
451
+ /* Flex columns, so the bars' margins add up (no collapsing) to 1.5em lines. */
452
+ .uvalib-pagefind-search__skeleton,
453
+ .uvalib-pagefind-search__skeleton-result,
454
+ .uvalib-pagefind-search__skeleton-sub {
455
+ display: flex;
456
+ flex-direction: column;
457
+ }
458
+ .uvalib-pagefind-search__skeleton {
459
+ margin-block-start: 1.25rem;
460
+ line-height: 1.5;
461
+ }
462
+ .uvalib-pagefind-search__skeleton .uvalib-skeleton-text {
463
+ display: block;
464
+ box-sizing: border-box;
465
+ inline-size: 100%;
466
+ block-size: 1em;
467
+ margin-block: 0.25em;
468
+ border-radius: 0.2rem;
469
+ background-color: var(--uva-color-track, var(--uva-grey-200, #f1f1f1));
470
+ }
471
+ .uvalib-pagefind-search__skeleton .uvalib-pagefind-search__skeleton-message {
472
+ inline-size: min(14rem, 70%);
473
+ margin-block: calc(0.6rem + 0.25em) calc(1.35rem + 0.25em);
474
+ }
475
+ .uvalib-pagefind-search__skeleton-result {
476
+ padding-block: 1.25rem;
477
+ border-block-start: 1px solid var(--pagefind-ui-tag);
478
+ }
479
+ .uvalib-pagefind-search__skeleton-result:last-child {
480
+ border-block-end: 1px solid var(--pagefind-ui-tag);
481
+ }
482
+ .uvalib-pagefind-search__skeleton .uvalib-pagefind-search__skeleton-title {
483
+ inline-size: 60%;
484
+ block-size: 1.2rem;
485
+ margin-block: 0.18rem 0.53rem;
486
+ }
487
+ .uvalib-pagefind-search__skeleton .uvalib-pagefind-search__skeleton-short {
488
+ inline-size: 60%;
489
+ }
490
+ .uvalib-pagefind-search__skeleton-sub {
491
+ margin-block-start: 0.75rem;
492
+ padding-inline-start: 1rem;
493
+ border-inline-start: 3px solid var(--pagefind-ui-tag);
494
+ }
495
+ .uvalib-pagefind-search__skeleton-sub .uvalib-pagefind-search__skeleton-title {
496
+ inline-size: 45%;
497
+ block-size: 1rem;
498
+ margin-block: 0.15rem;
499
+ }
368
500
  /* Both set display, which would beat the hidden attribute's (issue #7). */
369
501
  :where(uvalib-pagefind-search, .uvalib-pagefind-search__label)[hidden] {
370
502
  display: none !important;
@@ -392,6 +524,18 @@
392
524
  border: 1px solid GrayText;
393
525
  color: GrayText;
394
526
  }
527
+ /* The drawn bars in GrayText (forced colors would drop the gradients). */
528
+ uvalib-pagefind-search[searching]:not([no-skeleton]):not(:defined) {
529
+ --_bar: GrayText;
530
+ }
531
+ uvalib-pagefind-search[searching]:not([no-skeleton]):not(:defined)::before,
532
+ uvalib-pagefind-search[searching]:not([no-skeleton]):not(:defined)::after {
533
+ forced-color-adjust: none;
534
+ }
535
+ /* As base.css's skeletons: an outline, for a page without base.css. */
536
+ .uvalib-pagefind-search__skeleton .uvalib-skeleton-text {
537
+ border: 1px solid GrayText;
538
+ }
395
539
  .pagefind-ui :is(.pagefind-ui__search-clear, .pagefind-ui__button):hover {
396
540
  border-color: Highlight;
397
541
  color: Highlight;
@@ -294,6 +294,12 @@ export const base = css `
294
294
  padding-block-start: calc(1.125rem * 1.3 + 0.5rem);
295
295
  animation-name: uvalib-contents-reveal;
296
296
  }
297
+ /* With full-href (issue #38): the full-contents link's line held below the list (0.5rem
298
+ above a 44px link). A window="N" list is not held: the whole list shows until it upgrades
299
+ (in a sidebar beside the content, nothing else moves). */
300
+ uvalib-contents[full-href]:not(:defined) {
301
+ padding-block-end: calc(44px + 0.5rem);
302
+ }
297
303
  :where(uvalib-contents):not(:defined) :is(ol, ul) {
298
304
  margin: 0;
299
305
  padding: 0;
@@ -324,7 +330,7 @@ export const base = css `
324
330
  @media (max-width: 64rem) {
325
331
  uvalib-contents:not([collapse-below], [open]):not(:defined) {
326
332
  max-block-size: 44px;
327
- padding-block-start: 0;
333
+ padding-block: 0;
328
334
  overflow: hidden;
329
335
  }
330
336
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/styles/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC;;;;;;;GAOG;AACH,MAAM,eAAe,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AACpE,MAAM,cAAc,GAAG,SAAS,CAC9B,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;IACxB,MAAM,KAAK,GAAG;QACZ,+BAA+B,CAAC,8EAA8E;QAC9G,uDAAuD,CAAC,kBAAkB;KAC3E,CAAC;IACF,OAAO,CACL,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,uBAAuB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,uBAAuB;QAC3F,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,uBAAuB,CAAC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okens it reads into pagefind.css, as it does for base.css).
24
24
  const P = '.pagefind-ui';
25
+ /** <uvalib-pagefind-search> before its script runs, holding for a search from the URL. */
26
+ const pre = unsafeCSS('uvalib-pagefind-search[searching]:not([no-skeleton]):not(:defined)');
27
+ /** A vertical gradient of bars in --_bar between each pair of offsets (calc() terms). */
28
+ const bands = (...pairs) => unsafeCSS(`linear-gradient(${pairs
29
+ .map(([a, b]) => `transparent 0 calc(${a}), var(--_bar) 0 calc(${b})`)
30
+ .join(', ')}, transparent 0)`);
25
31
  const p = unsafeCSS(P);
26
32
  /** The search field's height: the Clear button sits inside it, 6px from each edge (44px). */
27
33
  const FIELD = 56;
@@ -370,6 +376,138 @@ export const pagefind = css `
370
376
  font-weight: 700;
371
377
  line-height: 1.5;
372
378
  }
379
+ /* While a search from the URL loads (issue #37): at least a screen's height, so what follows
380
+ stays below the fold, and placeholder results in place of Pagefind's results area until
381
+ they are drawn. A page may set searching in its HTML, so this holds from first paint. */
382
+ uvalib-pagefind-search[searching]:not([no-skeleton]) {
383
+ min-block-size: 100vh;
384
+ }
385
+ uvalib-pagefind-search[searching]:not([no-skeleton]) .pagefind-ui__drawer {
386
+ display: none;
387
+ }
388
+ /* Before the element's script runs: the same placeholders, drawn as still bars where the
389
+ label, field, results message and rows will be (::before the message, ::after the rows,
390
+ each row a repeating tile of gradient bars; with show-sub-results, two sections a row). */
391
+ ${pre} {
392
+ --_bar: var(--uva-color-track, var(--uva-grey-200, #f1f1f1));
393
+ --_top: calc(1.5em + 0.35rem + ${FIELD}px + 1.25rem);
394
+ --_msg: calc(1.95rem + 1.5em);
395
+ --_row: calc(1px + 4.41rem + 4.5em);
396
+ /* A row: its top border, title and short last line (60% wide), then two full lines. */
397
+ --_l: calc(1px + 3.16rem + 0.25em);
398
+ --_rows:
399
+ linear-gradient(var(--_bar) 0 1px, transparent 0),
400
+ ${bands(['1px + 1.43rem', '1px + 2.63rem'], ['var(--_l) + 3em', 'var(--_l) + 4em'])},
401
+ ${bands(['var(--_l)', 'var(--_l) + 1em'], ['var(--_l) + 1.5em', 'var(--_l) + 2.5em'])};
402
+ --_sizes: 100% var(--_row), 60% var(--_row), 100% var(--_row);
403
+ }
404
+ ${pre}[label-hidden] {
405
+ --_top: calc(${FIELD}px + 1.25rem);
406
+ }
407
+ ${pre}::before,
408
+ ${pre}::after {
409
+ content: '';
410
+ display: block;
411
+ background-repeat: no-repeat;
412
+ }
413
+ ${pre}::before {
414
+ /* No margin: it would collapse with the margin above the element. */
415
+ block-size: calc(var(--_top) + var(--_msg));
416
+ background-image: linear-gradient(var(--_bar) 0 0);
417
+ background-position: 0 calc(var(--_top) + 0.6rem + 0.25em);
418
+ background-size: min(14rem, 70%) 1em;
419
+ }
420
+ ${pre}::after {
421
+ block-size: calc(100vh - var(--_top) - var(--_msg));
422
+ background-repeat: repeat-y;
423
+ background-image: var(--_rows);
424
+ background-size: var(--_sizes);
425
+ }
426
+ /* Each section: a 3px bar beside a title and two lines (the last 60%), 0.75rem below. */
427
+ ${pre}[show-sub-results] {
428
+ --_row: calc(1px + 8.51rem + 10.5em);
429
+ --_s: calc(1px + 3.91rem + 4.5em);
430
+ --_t: calc(var(--_s) + 2.05rem + 3em);
431
+ }
432
+ ${pre}[show-sub-results]::after {
433
+ --_in: calc(100% - 1rem - 3px);
434
+ background-image:
435
+ var(--_rows),
436
+ ${bands(['var(--_s)', 'var(--_s) + 1.3rem + 3em'], ['var(--_t)', 'var(--_t) + 1.3rem + 3em'])},
437
+ ${bands(['var(--_s) + 0.15rem', 'var(--_s) + 1.15rem'], ['var(--_t) + 0.15rem', 'var(--_t) + 1.15rem'])},
438
+ ${bands(['var(--_s) + 1.3rem + 0.25em', 'var(--_s) + 1.3rem + 1.25em'], ['var(--_t) + 1.3rem + 0.25em', 'var(--_t) + 1.3rem + 1.25em'])},
439
+ ${bands(['var(--_s) + 1.3rem + 1.75em', 'var(--_s) + 1.3rem + 2.75em'], ['var(--_t) + 1.3rem + 1.75em', 'var(--_t) + 1.3rem + 2.75em'])};
440
+ background-position:
441
+ 0 0,
442
+ 0 0,
443
+ 0 0,
444
+ 0 0,
445
+ calc(1rem + 3px) 0,
446
+ calc(1rem + 3px) 0,
447
+ calc(1rem + 3px) 0;
448
+ background-size:
449
+ var(--_sizes),
450
+ 3px var(--_row),
451
+ calc(var(--_in) * 0.45) var(--_row),
452
+ var(--_in) var(--_row),
453
+ calc(var(--_in) * 0.6) var(--_row);
454
+ }
455
+ /* The field's height before Pagefind draws it, so the placeholders below it stay put. */
456
+ uvalib-pagefind-search[searching] > .uvalib-pagefind-search__ui {
457
+ min-block-size: ${FIELD}px;
458
+ }
459
+ /* Sized like the results area: its message, then rows like .pagefind-ui__result. The bars
460
+ are base.css's .uvalib-skeleton-text (its shimmer, reduced motion and forced colors); the
461
+ sizes and colour here hold without base.css. */
462
+ /* Flex columns, so the bars' margins add up (no collapsing) to 1.5em lines. */
463
+ .uvalib-pagefind-search__skeleton,
464
+ .uvalib-pagefind-search__skeleton-result,
465
+ .uvalib-pagefind-search__skeleton-sub {
466
+ display: flex;
467
+ flex-direction: column;
468
+ }
469
+ .uvalib-pagefind-search__skeleton {
470
+ margin-block-start: 1.25rem;
471
+ line-height: 1.5;
472
+ }
473
+ .uvalib-pagefind-search__skeleton .uvalib-skeleton-text {
474
+ display: block;
475
+ box-sizing: border-box;
476
+ inline-size: 100%;
477
+ block-size: 1em;
478
+ margin-block: 0.25em;
479
+ border-radius: 0.2rem;
480
+ background-color: var(--uva-color-track, var(--uva-grey-200, #f1f1f1));
481
+ }
482
+ .uvalib-pagefind-search__skeleton .uvalib-pagefind-search__skeleton-message {
483
+ inline-size: min(14rem, 70%);
484
+ margin-block: calc(0.6rem + 0.25em) calc(1.35rem + 0.25em);
485
+ }
486
+ .uvalib-pagefind-search__skeleton-result {
487
+ padding-block: 1.25rem;
488
+ border-block-start: 1px solid var(--pagefind-ui-tag);
489
+ }
490
+ .uvalib-pagefind-search__skeleton-result:last-child {
491
+ border-block-end: 1px solid var(--pagefind-ui-tag);
492
+ }
493
+ .uvalib-pagefind-search__skeleton .uvalib-pagefind-search__skeleton-title {
494
+ inline-size: 60%;
495
+ block-size: 1.2rem;
496
+ margin-block: 0.18rem 0.53rem;
497
+ }
498
+ .uvalib-pagefind-search__skeleton .uvalib-pagefind-search__skeleton-short {
499
+ inline-size: 60%;
500
+ }
501
+ .uvalib-pagefind-search__skeleton-sub {
502
+ margin-block-start: 0.75rem;
503
+ padding-inline-start: 1rem;
504
+ border-inline-start: 3px solid var(--pagefind-ui-tag);
505
+ }
506
+ .uvalib-pagefind-search__skeleton-sub .uvalib-pagefind-search__skeleton-title {
507
+ inline-size: 45%;
508
+ block-size: 1rem;
509
+ margin-block: 0.15rem;
510
+ }
373
511
  /* Both set display, which would beat the hidden attribute's (issue #7). */
374
512
  :where(uvalib-pagefind-search, .uvalib-pagefind-search__label)[hidden] {
375
513
  display: none !important;
@@ -397,6 +535,18 @@ export const pagefind = css `
397
535
  border: 1px solid GrayText;
398
536
  color: GrayText;
399
537
  }
538
+ /* The drawn bars in GrayText (forced colors would drop the gradients). */
539
+ ${pre} {
540
+ --_bar: GrayText;
541
+ }
542
+ ${pre}::before,
543
+ ${pre}::after {
544
+ forced-color-adjust: none;
545
+ }
546
+ /* As base.css's skeletons: an outline, for a page without base.css. */
547
+ .uvalib-pagefind-search__skeleton .uvalib-skeleton-text {
548
+ border: 1px solid GrayText;
549
+ }
400
550
  ${p} :is(.pagefind-ui__search-clear, .pagefind-ui__button):hover {
401
551
  border-color: Highlight;
402
552
  color: Highlight;
@@ -1 +1 @@
1
- {"version":3,"file":"pagefind.js","sourceRoot":"","sources":["../../src/styles/pagefind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAErC,0FAA0F;AAC1F,0FAA0F;AAC1F,2FAA2F;AAC3F,8FAA8F;AAC9F,EAAE;AACF,4FAA4F;AAC5F,wFAAwF;AACxF,0FAA0F;AAC1F,0FAA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KAAK;;;;;;;QAOlC,KAAK,CAAC,CAAC,eAAe,EAAE,eAAe,CAAC,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;QACjF,KAAK,CAAC,CAAC,WAAW,EAAE,iBAAiB,CAAC,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC;;;IAGvF,GAAG;mBACY,KAAK;;IAEpB,GAAG;IACH,GAAG;;;;;IAKH,GAAG;;;;;;;IAOH,GAAG;;;;;;;IAOH,GAAG;;;;;IAKH,GAAG;;;;QAIC,KAAK,CAAC,CAAC,WAAW,EAAE,0BAA0B,CAAC,EAAE,CAAC,WAAW,EAAE,0BAA0B,CAAC,CAAC;QAC3F,KAAK,CAAC,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,EAAE,CAAC,qBAAqB,EAAE,qBAAqB,CAAC,CAAC;QACrG,KAAK,CAAC,CAAC,6BAA6B,EAAE,6BAA6B,CAAC,EAAE,CAAC,6BAA6B,EAAE,6BAA6B,CAAC,CAAC;QACrI,KAAK,CAAC,CAAC,6BAA6B,EAAE,6BAA6B,CAAC,EAAE,CAAC,6BAA6B,EAAE,6BAA6B,CAAC,CAAC;;;;;;;;;;;;;;;;;;sBAkBvH,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2DvB,CAAC;;;;;;MAMC,CAAC;;;;MAID,CAAC;;;;;MAKD,CAAC;;;MAGD,CAAC;;;;;MAKD,GAAG;;;MAGH,GAAG;MACH,GAAG;;;;;;;MAOH,CAAC;;;;;CAKN,CAAC"}
package/dist-cdn/base.css CHANGED
@@ -361,6 +361,12 @@ uvalib-metadata:not(:defined) > dl > dd[data-limit="12"] > :is(ul, ol):has(> li:
361
361
  padding-block-start: calc(1.125rem * 1.3 + 0.5rem);
362
362
  animation-name: uvalib-contents-reveal;
363
363
  }
364
+ /* With full-href (issue #38): the full-contents link's line held below the list (0.5rem
365
+ above a 44px link). A window="N" list is not held: the whole list shows until it upgrades
366
+ (in a sidebar beside the content, nothing else moves). */
367
+ uvalib-contents[full-href]:not(:defined) {
368
+ padding-block-end: calc(44px + 0.5rem);
369
+ }
364
370
  :where(uvalib-contents):not(:defined) :is(ol, ul) {
365
371
  margin: 0;
366
372
  padding: 0;
@@ -391,7 +397,7 @@ uvalib-metadata:not(:defined) > dl > dd[data-limit="12"] > :is(ul, ol):has(> li:
391
397
  @media (max-width: 64rem) {
392
398
  uvalib-contents:not([collapse-below], [open]):not(:defined) {
393
399
  max-block-size: 44px;
394
- padding-block-start: 0;
400
+ padding-block: 0;
395
401
  overflow: hidden;
396
402
  }
397
403
  }
@@ -410,6 +410,12 @@ var a = e`
410
410
  padding-block-start: calc(1.125rem * 1.3 + 0.5rem);
411
411
  animation-name: uvalib-contents-reveal;
412
412
  }
413
+ /* With full-href (issue #38): the full-contents link's line held below the list (0.5rem
414
+ above a 44px link). A window="N" list is not held: the whole list shows until it upgrades
415
+ (in a sidebar beside the content, nothing else moves). */
416
+ uvalib-contents[full-href]:not(:defined) {
417
+ padding-block-end: calc(44px + 0.5rem);
418
+ }
413
419
  :where(uvalib-contents):not(:defined) :is(ol, ul) {
414
420
  margin: 0;
415
421
  padding: 0;
@@ -440,7 +446,7 @@ var a = e`
440
446
  @media (max-width: 64rem) {
441
447
  uvalib-contents:not([collapse-below], [open]):not(:defined) {
442
448
  max-block-size: 44px;
443
- padding-block-start: 0;
449
+ padding-block: 0;
444
450
  overflow: hidden;
445
451
  }
446
452
  }
@@ -511,4 +517,4 @@ var a = e`
511
517
  `;
512
518
  export { i as a, n as i, l as n, a as r, c as t };
513
519
 
514
- //# sourceMappingURL=base-DXkGlSgH.js.map
520
+ //# sourceMappingURL=base-DmImIMld.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"base-DXkGlSgH.js","names":["unsafeCSS","i","r","fontFallback","FACES","loadFontFallback","fonts","doc","face","tokens","METADATA_LIMITS","metadataLimits","lists","n","l","TYPEKIT_URL","base"],"sources":["../../src/styles/font-fallback.ts","../../src/styles/tokens.ts","../../src/styles/base.ts"],"sourcesContent":["import { css } from 'lit';\n\n/**\n * A metric-matched fallback for Franklin Gothic URW (issue #32). The Adobe Fonts kit uses\n * `font-display: auto`, so on a slow connection text is drawn in the next font of\n * `--uva-font-family` and redrawn when the kit's files arrive. Plain Arial is wider than\n * Franklin Gothic (by 6% regular, 9% bold), so paragraphs rewrapped and the page moved\n * (layout shift). \"UVA Franklin Fallback\" is the system's Arial scaled to Franklin Gothic's\n * average widths, with its ascent and descent, for each face the kit serves (400, 500, 700 and\n * 400 italic; a 600 rule gets the 700 face, as the kit's own matching does). Measured against\n * the kit in Chromium: the fallback wraps a paragraph like Franklin Gothic in about 99% of\n * widths from 260 to 700px at 16 to 20px, against 55 to 82% for plain Arial.\n *\n * `size-adjust` scales Arial's glyphs; the overrides are Franklin Gothic's ascent (0.95 em) and\n * descent (0.25 em) divided by that scale, with no line gap, so a line is as tall in both.\n * Liberation Sans (Linux) has Arial's metrics. Where neither is installed (Android has Roboto),\n * the face is skipped and the next font in the stack is used, as before.\n */\nexport const fontFallback = css`\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans');\n font-weight: 100 450;\n font-style: normal;\n size-adjust: 94.52%;\n ascent-override: 100.93%;\n descent-override: 26.56%;\n line-gap-override: 0%;\n }\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans');\n font-weight: 451 599;\n font-style: normal;\n size-adjust: 95.99%;\n ascent-override: 99.18%;\n descent-override: 26.04%;\n line-gap-override: 0%;\n }\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src:\n local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'),\n local('LiberationSans-Bold');\n font-weight: 600 1000;\n font-style: normal;\n size-adjust: 91.32%;\n ascent-override: 104.03%;\n descent-override: 27.38%;\n line-gap-override: 0%;\n }\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src:\n local('Arial Italic'), local('Arial-ItalicMT'), local('Liberation Sans Italic'),\n local('LiberationSans-Italic');\n font-weight: 100 599;\n font-style: italic;\n size-adjust: 95.06%;\n ascent-override: 101.09%;\n descent-override: 26.4%;\n line-gap-override: 0%;\n }\n`;\n\n/** One font per fallback face, so each one is asked for. */\nconst FACES = ['400', '500', '700', 'italic 400'];\n\n/**\n * Load every fallback face now (issue #35). A face from a local() font loads only when text\n * first needs it, so the first italic (or medium) text could be drawn in unscaled Arial and\n * redrawn a moment later. Called once the faces are installed; failures (no Arial or\n * Liberation Sans on the system) are left to the next font in the stack, as before.\n */\nexport function loadFontFallback(doc: Document): void {\n const fonts = doc.fonts;\n if (!fonts?.load) return;\n for (const face of FACES) fonts.load(`${face} 1em \"UVA Franklin Fallback\"`).catch(() => {});\n}\n","// GENERATED by scripts/sync-tokens.mjs from ../monorepo/packages/drupal_library_theme/src/scss/base — do not edit\nimport { css } from 'lit';\n\nexport const tokens = css`\n :root {\n --uva-brand-blue-lightest: #87B9D9;\n --uva-brand-blue-lighter: #3395D4;\n --uva-brand-blue-light: #0370B7;\n --uva-brand-blue-base: #232D4B;\n --uva-brand-blue-300: #87B9D9;\n --uva-brand-blue-200: #3395D4;\n --uva-brand-blue-100: #0370B7;\n --uva-brand-blue: #232D4B;\n --uva-brand-orange-lightest: #FFEAD6;\n --uva-brand-orange-lighter: #FFC999;\n --uva-brand-orange-light: #FFB370;\n --uva-brand-orange-base: #E57200;\n --uva-brand-orange-dark: #B35900;\n --uva-brand-orange-darker: #854200;\n --uva-brand-orange-300: #FFEAD6;\n --uva-brand-orange-200: #FFC999;\n --uva-brand-orange-100: #FFB370;\n --uva-brand-orange: #E57200;\n --uva-brand-orange-A: #B35900;\n --uva-brand-orange-B: #854200;\n --uva-blue-alt-lightest: #BFE7F7;\n --uva-blue-alt-lighter: #91D8F2;\n --uva-blue-alt-light: #55C4EC;\n --uva-blue-alt-base: #007BAC;\n --uva-blue-alt-dark: #005679;\n --uva-blue-alt-darkest: #141E3C;\n --uva-blue-alt-400: #e6f2f7;\n --uva-blue-alt-300: #BFE7F7;\n --uva-blue-alt-200: #91D8F2;\n --uva-blue-alt-100: #55C4EC;\n --uva-blue-alt: #007BAC;\n --uva-blue-alt-A: #005679;\n --uva-blue-alt-B: #141E3C;\n --uva-teal-lightest: #C8F2F4;\n --uva-teal-light: #5BD7DE;\n --uva-teal-base: #25CAD3;\n --uva-teal-dark: #1DA1A8;\n --uva-teal-darker: #16777C;\n --uva-teal-200: #C8F2F4;\n --uva-teal-100: #5BD7DE;\n --uva-teal: #25CAD3;\n --uva-teal-A: #1DA1A8;\n --uva-teal-B: #16777C;\n --uva-green-lightest: #DDEFDC;\n --uva-green-lighter: #89CC74;\n --uva-green-base: #62BB46;\n --uva-green-dark: #4E9737;\n --uva-green-200: #DDEFDC;\n --uva-green-100: #89CC74;\n --uva-green: #62BB46;\n --uva-green-A: #4E9737;\n --uva-red-lightest: #FBCFDA;\n --uva-red-base: #EF3F6B;\n --uva-red-dark: #DF1E43;\n --uva-red-darker: #B30000;\n --uva-red-100: #FBCFDA;\n --uva-red: #EF3F6B;\n --uva-red-A: #DF1E43;\n --uva-red-B: #B30000;\n --uva-yellow-lightest: #FEF6C8;\n --uva-yellow-base: #ECC602;\n --uva-yellow-dark: #B99C02;\n --uva-yellow-100: #FEF6C8;\n --uva-yellow: #ECC602;\n --uva-yellow-A: #B99C02;\n --uva-grey-lightest: #F1F1F1;\n --uva-grey-light: #DADADA;\n --uva-grey-base: #808080;\n --uva-grey-dark: #4F4F4F;\n --uva-grey-darkest: #2B2B2B;\n --uva-grey-200: #F1F1F1;\n --uva-grey-100: #DADADA;\n --uva-grey-50: #ADADAD;\n --uva-grey: #808080;\n --uva-grey-A: #4F4F4F;\n --uva-grey-B: #2B2B2B;\n --uva-font-family: franklin-gothic-urw, \"UVA Franklin Fallback\", Arial, Helvetica, sans-serif;\n --uva-font-size-base: 17px;\n }\n`;\n","import { css, unsafeCSS } from 'lit';\n\n/**\n * `<uvalib-metadata>` long lists before it upgrades (issue #34): a list of more than N values\n * shows its first N and a line for its \"Show all\" button (4px above a 32px button), as the\n * upgraded element does. CSS cannot read N from the attribute into :nth-child(), so the rules\n * are written out for limits 1 to 12; a page with a larger limit adds its own (README). A row's\n * own data-limit on its <dd> wins over list-limit (data-limit=\"0\" shows them all); a data-limit\n * on the list itself works once upgraded but is not held before.\n */\nconst METADATA_LIMITS = Array.from({ length: 12 }, (_, i) => i + 1);\nconst metadataLimits = unsafeCSS(\n METADATA_LIMITS.map((n) => {\n const lists = [\n `uvalib-metadata[list-limit=\"${n}\"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit])`,\n `uvalib-metadata:not(:defined) > dl > dd[data-limit=\"${n}\"] > :is(ul, ol)`,\n ];\n return (\n `${lists.map((l) => `${l} > li:nth-child(n + ${n + 1})`).join(',\\n')} { display: none; }\\n` +\n `${lists.map((l) => `${l}:has(> li:nth-child(${n + 1}))::after`).join(',\\n')} { content: ''; display: block; block-size: 2.25rem; }`\n );\n }).join('\\n'),\n);\n\nexport const TYPEKIT_URL = 'https://use.typekit.net/oym8nvz.css';\n\n// The body background has no fallback: without dark mode it stays transparent, as before.\n//\n// site-page:not(:defined) applies when base.css is linked in <head>, before the element\n// upgrades: its own formatting context (flow-root), so a heading's top margin cannot collapse\n// through to <body> and shift the page once the element upgrades, and invisible, so its\n// content does not paint above where the header will go. If the script never loads, the\n// content appears anyway after two seconds.\nexport const base = css`\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n html,\n body {\n font-family: var(\n --uva-font-family,\n franklin-gothic-urw,\n 'UVA Franklin Fallback',\n Arial,\n Helvetica,\n sans-serif\n );\n }\n html {\n font-size: var(--uva-font-size-base, 17px);\n }\n body {\n margin: 0;\n line-height: 1.5;\n min-height: 100vh;\n color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b));\n background-color: var(--uva-color-surface);\n }\n site-page:not(:defined) {\n display: flow-root;\n visibility: hidden;\n animation: uvalib-site-page-reveal 0s 2s forwards;\n }\n uvalib-breadcrumbs:not(:defined),\n uvalib-card:not(:defined),\n uvalib-card-grid:not(:defined),\n uvalib-pager:not(:defined),\n uvalib-contents:not(:defined),\n uvalib-metadata:not(:defined),\n uvalib-tag-list:not(:defined) {\n display: block;\n line-height: 1.5;\n visibility: hidden;\n animation: uvalib-site-page-reveal 0s 2s forwards;\n }\n /* A chip row: hidden, one 44px row tall (with the scrolling row's padding), the raw\n children kept on one line so they cannot make it taller. */\n uvalib-chip-group:not(:defined) {\n display: block;\n min-height: 44px;\n max-width: 100%;\n overflow: hidden;\n white-space: nowrap;\n visibility: hidden;\n animation: uvalib-site-page-reveal 0s 2s forwards;\n }\n uvalib-chip-group[scroll]:not(:defined) {\n min-height: calc(44px + 0.75rem);\n }\n /* A description: one line of it (0.875rem at 1.5, 0.25rem below the row). */\n uvalib-chip-group[description]:not(:defined) {\n padding-block-end: 1.5625rem;\n }\n /* Its text is drawn from attributes: hold one line until it upgrades. */\n uvalib-results-count:not(:defined) {\n display: block;\n min-block-size: 1.5em;\n }\n uvalib-tag-list:not(:defined)[hidden],\n uvalib-results-count:not(:defined)[hidden] {\n display: none;\n }\n /* The pre-upgrade rules here set display, which beats the hidden attribute's (issue #7).\n More specific than each of them (two pseudo-classes or attributes), so it needs no importance flag. */\n :where(\n site-page,\n uvalib-breadcrumbs,\n uvalib-card,\n uvalib-card-grid,\n uvalib-pager,\n uvalib-contents,\n uvalib-metadata,\n uvalib-chip-group,\n uvalib-tabs,\n uvalib-combobox,\n uvalib-image-regions,\n uvalib-map,\n uvalib-filter-drawer,\n uvalib-filter,\n uvalib-list-filter\n ):not(:defined)[hidden],\n :where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] {\n display: none;\n }\n /* A record's details before <uvalib-metadata> upgrades (issue #34): the rows already laid\n out as it lays them out (label beside value from 36rem of its own width, stacked below;\n 8px above and below each row, a 1px rule between rows; lists without bullets, 4px apart),\n so the page does not move when it upgrades. Rows the attributes add (creator, rights,\n citation) are not in the page's <dl> and cannot be held. */\n uvalib-metadata:not(:defined) {\n container-type: inline-size;\n font-size: 1rem;\n }\n uvalib-metadata:not(:defined) > dl {\n display: grid;\n grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr);\n column-gap: 1.5rem;\n margin: 0;\n }\n uvalib-metadata:not(:defined) > dl > dt {\n grid-column: 1;\n margin: 0;\n padding-block: 0.5rem;\n font-weight: 700;\n }\n uvalib-metadata:not(:defined) > dl > dd {\n grid-column: 2;\n margin: 0;\n padding-block: 0.5rem;\n }\n uvalib-metadata:not(:defined) > dl > dt:not(:first-child),\n uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {\n border-block-start: 1px solid transparent;\n }\n uvalib-metadata:not(:defined) > dl > dd > :is(ul, ol) {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n uvalib-metadata:not(:defined) > dl > dd li + li {\n margin-block-start: 0.25rem;\n }\n @container (width < 36rem) {\n uvalib-metadata:not(:defined) > dl {\n grid-template-columns: minmax(0, 1fr);\n }\n uvalib-metadata:not(:defined) > dl > :is(dt, dd) {\n grid-column: 1;\n }\n uvalib-metadata:not(:defined) > dl > dt {\n padding-block-end: 0;\n }\n uvalib-metadata:not(:defined) > dl > dd {\n padding-block-start: 0;\n }\n uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {\n border-block-start: 0;\n }\n }\n ${metadataLimits}\n /* Tabs stay readable before the script runs: a block, one panel, and a gap the\n size of the tab row (44px) plus its 1rem margin, so the first panel does not\n jump when the element upgrades. Later data-tab panels stay hidden. */\n uvalib-tabs:not(:defined) {\n display: block;\n padding-block-start: calc(44px + 1rem);\n }\n uvalib-tabs:not(:defined) > [data-tab] ~ [data-tab] {\n display: none;\n }\n /* A combobox: its label (from the attribute) and one 44px field (plus a one-line\n description) held, so nothing moves when it upgrades. A fallback <input list> child\n works meanwhile; the other children (options, a datalist) stay out of sight. */\n uvalib-combobox:not(:defined) {\n display: block;\n min-block-size: calc(1.5em + 0.25rem + 44px);\n line-height: 1.5;\n }\n uvalib-combobox[description]:not(:defined) {\n min-block-size: calc(3em + 0.5rem + 44px);\n }\n uvalib-combobox:not(:defined)::before {\n content: attr(label);\n display: block;\n margin-block-end: 0.25rem;\n font-weight: 600;\n }\n uvalib-combobox:not(:defined) > :not(input) {\n display: none;\n }\n uvalib-combobox:not(:defined) > input {\n display: block;\n box-sizing: border-box;\n inline-size: 100%;\n min-block-size: 44px;\n font: inherit;\n line-height: 1.2;\n }\n /* A list filter draws its label, a 44px field and a one-line count from attributes: hold\n their height (less the label with hide-label, less the count with results-count), so the\n list below does not move when it upgrades. The list itself is the page's and stays\n fully shown until then. */\n uvalib-list-filter:not(:defined) {\n display: block;\n font-size: 1rem;\n line-height: 1.5;\n min-block-size: calc(1.5em + 0.25rem + 44px + 0.25rem + 1.5em);\n }\n uvalib-list-filter[hide-label]:not(:defined) {\n min-block-size: calc(44px + 0.25rem + 1.5em);\n }\n uvalib-list-filter[results-count]:not(:defined) {\n min-block-size: calc(1.5em + 0.25rem + 44px);\n }\n uvalib-list-filter[hide-label][results-count]:not(:defined) {\n min-block-size: 44px;\n }\n /* Image regions: the image at its own width and the list beside it (or under it), the\n layout the element keeps once it upgrades, so the image does not move. */\n uvalib-image-regions:not(:defined) {\n display: flex;\n flex-wrap: wrap;\n gap: 1rem;\n align-items: flex-start;\n }\n uvalib-image-regions:not(:defined) > :is(img, picture) {\n display: block;\n flex: 0 1 auto;\n min-width: 0;\n max-width: 100%;\n height: auto;\n }\n uvalib-image-regions:not(:defined) > :is(ol, ul) {\n flex: 1 1 14rem;\n min-width: 0;\n }\n /* A map: its key instructions (the same text it shows) and the map's height held above\n the child list, so the list does not move when the map is drawn over the page's\n Leaflet. Padding, not margin, so it cannot collapse with the list's own top margin. */\n uvalib-map:not(:defined) {\n display: block;\n }\n uvalib-map:not(:defined)::before {\n content: 'Tab or arrow keys move between places; Enter opens one. With the map focused, arrow keys pan and + and − zoom.';\n display: block;\n padding-block-end: calc(0.5rem + max(12rem, var(--uvalib-map-height, min(24rem, 75vw))));\n font-size: 0.875rem;\n line-height: 1.5;\n color: var(--uva-color-text-muted, #4b5563);\n }\n /* A collapsed filter group (<uvalib-filter collapsible collapsed>) draws only its 44px\n legend button once it upgrades: hold that height. Low specificity, so the [hidden] rule\n above still wins. */\n :where(uvalib-filter[collapsible][collapsed]):not(:defined) {\n display: block;\n min-block-size: 44px;\n }\n /* A filter drawer on a phone (the default 48rem breakpoint): once it upgrades only its 44px\n \"Search and filters\" button shows, so hold that height and keep the form and filters out\n of sight meanwhile; nothing moves when it upgrades. A page with its own breakpoint adds the\n same two rules in a media query of that width (see the README). Low specificity, so the\n [hidden] rule above still wins. */\n @media (max-width: 48rem) {\n :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) {\n display: block;\n min-block-size: 44px;\n }\n :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) > * {\n display: none;\n }\n }\n /* A contents list before <uvalib-contents> upgrades (a .uvalib-sidebar-layout sidebar): the\n headline's line held above, the links already padded as it pads them (the rules drawn\n transparent while hidden), so the list does not move. Narrow (the default 64rem\n collapse-below, closed): only its 44px button shows once it upgrades, so hold that and\n clip the list; the reveal releases it, so the list still shows if the script never loads.\n The [hidden] rule above still wins (it alone sets display). */\n uvalib-contents:not(:defined) {\n padding-block-start: calc(1.125rem * 1.3 + 0.5rem);\n animation-name: uvalib-contents-reveal;\n }\n :where(uvalib-contents):not(:defined) :is(ol, ul) {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n :where(uvalib-contents):not(:defined) > :is(ol, ul) {\n border-block: 1px solid transparent;\n }\n :where(uvalib-contents):not(:defined) > :is(ol, ul) > li + li {\n border-block-start: 1px solid transparent;\n }\n :where(uvalib-contents):not(:defined) li > a {\n display: block;\n padding: 0.5rem 0.75rem 0.5rem calc(0.75rem + 4px);\n }\n :where(uvalib-contents):not(:defined) li li > a {\n padding-block: 0.25rem;\n }\n :where(uvalib-contents):not(:defined) li :is(ol, ul) {\n padding-inline-start: 1rem;\n border-inline-start: 2px solid transparent;\n }\n /* In light DOM (no-shadow-dom) a nested list is indented by a margin, with 0.5rem below. */\n :where(uvalib-contents[no-shadow-dom]):not(:defined) li :is(ol, ul) {\n margin: 0 0 0.5rem 0.75rem;\n padding-inline-start: 0;\n }\n @media (max-width: 64rem) {\n uvalib-contents:not([collapse-below], [open]):not(:defined) {\n max-block-size: 44px;\n padding-block-start: 0;\n overflow: hidden;\n }\n }\n @keyframes uvalib-contents-reveal {\n to {\n visibility: visible;\n max-block-size: none;\n overflow: visible;\n }\n }\n /* A dialog before <uvalib-dialog> upgrades: its children are the dialog's content, never\n shown in the page, so nothing flashes or moves. Once defined, a closed dialog renders\n nothing (its host is display: contents around a closed <dialog>). */\n uvalib-dialog:not(:defined) {\n display: none;\n }\n /* A citation before <uvalib-citation> upgrades: only the first format's citation, boxed\n as it will be, with the label and 44px format bar held above it (none for hide-label)\n and the 44px Copy citation row below, so nothing moves when it upgrades (an app's\n citations property cannot be held). */\n uvalib-citation:not(:defined) {\n display: block;\n font-size: 1rem;\n line-height: 1.5;\n }\n uvalib-citation:not(:defined):has(> [data-format]) {\n padding-block: calc(2rem + 44px + 0.75rem) calc(0.75rem + 44px);\n }\n uvalib-citation[hide-label]:not(:defined):has(> [data-format]) {\n padding-block-start: calc(44px + 0.75rem);\n }\n uvalib-citation:not(:defined) > [data-format] {\n margin: 0;\n padding: 0.75rem 1rem;\n border: 1px solid transparent;\n overflow-wrap: anywhere;\n text-wrap: pretty;\n }\n uvalib-citation:not(:defined) > [data-format] ~ [data-format],\n uvalib-citation:not(:defined) > [slot] {\n display: none;\n }\n /* Printing a <site-page> (issue #20; its own styles leave out the chrome): a dark scheme\n prints light (the role tokens resolve to their light values), and the content's links\n are black and underlined, so they are told apart without colour. Content is <main> in\n light DOM and the unslotted children in shadow DOM. print-chrome keeps the page as it is\n shown, apart from the light scheme. */\n @media print {\n :root[data-uva-color-scheme]:has(site-page) {\n color-scheme: light;\n --uva-color-scheme: light;\n }\n /* Light DOM's trail, here too, as the pre-upgrade rule above (unlayered) would win. */\n site-page:not([print-chrome]) > [slot='breadcrumbs'] {\n display: none;\n }\n site-page:not([print-chrome]) > :not([slot], site-header, site-footer, .alerts-list) :any-link,\n site-page:not([print-chrome]) > :any-link:not([slot], .skip-link) {\n color: #000;\n text-decoration: underline;\n }\n }\n @keyframes uvalib-site-page-reveal {\n to {\n visibility: visible;\n }\n }\n`;\n"],"mappings":";;AAkBA,IAAaG,IAAe,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDzBC,IAAQ;CAAC;CAAO;CAAO;CAAO;AAAY;AAQhD,SAAgBC,EAAiB,GAAqB;CACpD,IAAMC,IAAQC,EAAI;CAClB,IAAKD,GAAO,MACZ,KAAK,IAAME,KAAQJ,GAAO,EAAM,KAAK,GAAGI,EAAK,6BAA6B,CAAC,CAAC,YAAY,CAAC,CAAC;AAC5F;;AC3EA,IAAaC,IAAS,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCOnBC,IAAkB,MAAM,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAMT,IAAI,CAAC,GAC5DU,IAAiBX,EACrBU,EAAgB,KAAK,MAAM;CACzB,IAAME,IAAQ,CACZ,+BAA+BC,EAAE,+EACjC,uDAAuDA,EAAE,iBAC3D;CACA,OACE,GAAGD,EAAM,KAAK,MAAM,GAAGE,EAAE,sBAAsBD,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,EAAE,uBAClED,EAAM,KAAK,MAAM,GAAGE,EAAE,sBAAsBD,IAAI,EAAE,UAAU,CAAC,CAAC,KAAK,KAAK,EAAE;AAEjF,CAAC,CAAC,CAAC,KAAK,IAAI,CACd,GAEaE,IAAc,uCASdC,IAAO,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoJnBL,EAAe"}
1
+ {"version":3,"file":"base-DmImIMld.js","names":["unsafeCSS","i","r","fontFallback","FACES","loadFontFallback","fonts","doc","face","tokens","METADATA_LIMITS","metadataLimits","lists","n","l","TYPEKIT_URL","base"],"sources":["../../src/styles/font-fallback.ts","../../src/styles/tokens.ts","../../src/styles/base.ts"],"sourcesContent":["import { css } from 'lit';\n\n/**\n * A metric-matched fallback for Franklin Gothic URW (issue #32). The Adobe Fonts kit uses\n * `font-display: auto`, so on a slow connection text is drawn in the next font of\n * `--uva-font-family` and redrawn when the kit's files arrive. Plain Arial is wider than\n * Franklin Gothic (by 6% regular, 9% bold), so paragraphs rewrapped and the page moved\n * (layout shift). \"UVA Franklin Fallback\" is the system's Arial scaled to Franklin Gothic's\n * average widths, with its ascent and descent, for each face the kit serves (400, 500, 700 and\n * 400 italic; a 600 rule gets the 700 face, as the kit's own matching does). Measured against\n * the kit in Chromium: the fallback wraps a paragraph like Franklin Gothic in about 99% of\n * widths from 260 to 700px at 16 to 20px, against 55 to 82% for plain Arial.\n *\n * `size-adjust` scales Arial's glyphs; the overrides are Franklin Gothic's ascent (0.95 em) and\n * descent (0.25 em) divided by that scale, with no line gap, so a line is as tall in both.\n * Liberation Sans (Linux) has Arial's metrics. Where neither is installed (Android has Roboto),\n * the face is skipped and the next font in the stack is used, as before.\n */\nexport const fontFallback = css`\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans');\n font-weight: 100 450;\n font-style: normal;\n size-adjust: 94.52%;\n ascent-override: 100.93%;\n descent-override: 26.56%;\n line-gap-override: 0%;\n }\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans');\n font-weight: 451 599;\n font-style: normal;\n size-adjust: 95.99%;\n ascent-override: 99.18%;\n descent-override: 26.04%;\n line-gap-override: 0%;\n }\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src:\n local('Arial Bold'), local('Arial-BoldMT'), local('Liberation Sans Bold'),\n local('LiberationSans-Bold');\n font-weight: 600 1000;\n font-style: normal;\n size-adjust: 91.32%;\n ascent-override: 104.03%;\n descent-override: 27.38%;\n line-gap-override: 0%;\n }\n @font-face {\n font-family: 'UVA Franklin Fallback';\n src:\n local('Arial Italic'), local('Arial-ItalicMT'), local('Liberation Sans Italic'),\n local('LiberationSans-Italic');\n font-weight: 100 599;\n font-style: italic;\n size-adjust: 95.06%;\n ascent-override: 101.09%;\n descent-override: 26.4%;\n line-gap-override: 0%;\n }\n`;\n\n/** One font per fallback face, so each one is asked for. */\nconst FACES = ['400', '500', '700', 'italic 400'];\n\n/**\n * Load every fallback face now (issue #35). A face from a local() font loads only when text\n * first needs it, so the first italic (or medium) text could be drawn in unscaled Arial and\n * redrawn a moment later. Called once the faces are installed; failures (no Arial or\n * Liberation Sans on the system) are left to the next font in the stack, as before.\n */\nexport function loadFontFallback(doc: Document): void {\n const fonts = doc.fonts;\n if (!fonts?.load) return;\n for (const face of FACES) fonts.load(`${face} 1em \"UVA Franklin Fallback\"`).catch(() => {});\n}\n","// GENERATED by scripts/sync-tokens.mjs from ../monorepo/packages/drupal_library_theme/src/scss/base — do not edit\nimport { css } from 'lit';\n\nexport const tokens = css`\n :root {\n --uva-brand-blue-lightest: #87B9D9;\n --uva-brand-blue-lighter: #3395D4;\n --uva-brand-blue-light: #0370B7;\n --uva-brand-blue-base: #232D4B;\n --uva-brand-blue-300: #87B9D9;\n --uva-brand-blue-200: #3395D4;\n --uva-brand-blue-100: #0370B7;\n --uva-brand-blue: #232D4B;\n --uva-brand-orange-lightest: #FFEAD6;\n --uva-brand-orange-lighter: #FFC999;\n --uva-brand-orange-light: #FFB370;\n --uva-brand-orange-base: #E57200;\n --uva-brand-orange-dark: #B35900;\n --uva-brand-orange-darker: #854200;\n --uva-brand-orange-300: #FFEAD6;\n --uva-brand-orange-200: #FFC999;\n --uva-brand-orange-100: #FFB370;\n --uva-brand-orange: #E57200;\n --uva-brand-orange-A: #B35900;\n --uva-brand-orange-B: #854200;\n --uva-blue-alt-lightest: #BFE7F7;\n --uva-blue-alt-lighter: #91D8F2;\n --uva-blue-alt-light: #55C4EC;\n --uva-blue-alt-base: #007BAC;\n --uva-blue-alt-dark: #005679;\n --uva-blue-alt-darkest: #141E3C;\n --uva-blue-alt-400: #e6f2f7;\n --uva-blue-alt-300: #BFE7F7;\n --uva-blue-alt-200: #91D8F2;\n --uva-blue-alt-100: #55C4EC;\n --uva-blue-alt: #007BAC;\n --uva-blue-alt-A: #005679;\n --uva-blue-alt-B: #141E3C;\n --uva-teal-lightest: #C8F2F4;\n --uva-teal-light: #5BD7DE;\n --uva-teal-base: #25CAD3;\n --uva-teal-dark: #1DA1A8;\n --uva-teal-darker: #16777C;\n --uva-teal-200: #C8F2F4;\n --uva-teal-100: #5BD7DE;\n --uva-teal: #25CAD3;\n --uva-teal-A: #1DA1A8;\n --uva-teal-B: #16777C;\n --uva-green-lightest: #DDEFDC;\n --uva-green-lighter: #89CC74;\n --uva-green-base: #62BB46;\n --uva-green-dark: #4E9737;\n --uva-green-200: #DDEFDC;\n --uva-green-100: #89CC74;\n --uva-green: #62BB46;\n --uva-green-A: #4E9737;\n --uva-red-lightest: #FBCFDA;\n --uva-red-base: #EF3F6B;\n --uva-red-dark: #DF1E43;\n --uva-red-darker: #B30000;\n --uva-red-100: #FBCFDA;\n --uva-red: #EF3F6B;\n --uva-red-A: #DF1E43;\n --uva-red-B: #B30000;\n --uva-yellow-lightest: #FEF6C8;\n --uva-yellow-base: #ECC602;\n --uva-yellow-dark: #B99C02;\n --uva-yellow-100: #FEF6C8;\n --uva-yellow: #ECC602;\n --uva-yellow-A: #B99C02;\n --uva-grey-lightest: #F1F1F1;\n --uva-grey-light: #DADADA;\n --uva-grey-base: #808080;\n --uva-grey-dark: #4F4F4F;\n --uva-grey-darkest: #2B2B2B;\n --uva-grey-200: #F1F1F1;\n --uva-grey-100: #DADADA;\n --uva-grey-50: #ADADAD;\n --uva-grey: #808080;\n --uva-grey-A: #4F4F4F;\n --uva-grey-B: #2B2B2B;\n --uva-font-family: franklin-gothic-urw, \"UVA Franklin Fallback\", Arial, Helvetica, sans-serif;\n --uva-font-size-base: 17px;\n }\n`;\n","import { css, unsafeCSS } from 'lit';\n\n/**\n * `<uvalib-metadata>` long lists before it upgrades (issue #34): a list of more than N values\n * shows its first N and a line for its \"Show all\" button (4px above a 32px button), as the\n * upgraded element does. CSS cannot read N from the attribute into :nth-child(), so the rules\n * are written out for limits 1 to 12; a page with a larger limit adds its own (README). A row's\n * own data-limit on its <dd> wins over list-limit (data-limit=\"0\" shows them all); a data-limit\n * on the list itself works once upgraded but is not held before.\n */\nconst METADATA_LIMITS = Array.from({ length: 12 }, (_, i) => i + 1);\nconst metadataLimits = unsafeCSS(\n METADATA_LIMITS.map((n) => {\n const lists = [\n `uvalib-metadata[list-limit=\"${n}\"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit])`,\n `uvalib-metadata:not(:defined) > dl > dd[data-limit=\"${n}\"] > :is(ul, ol)`,\n ];\n return (\n `${lists.map((l) => `${l} > li:nth-child(n + ${n + 1})`).join(',\\n')} { display: none; }\\n` +\n `${lists.map((l) => `${l}:has(> li:nth-child(${n + 1}))::after`).join(',\\n')} { content: ''; display: block; block-size: 2.25rem; }`\n );\n }).join('\\n'),\n);\n\nexport const TYPEKIT_URL = 'https://use.typekit.net/oym8nvz.css';\n\n// The body background has no fallback: without dark mode it stays transparent, as before.\n//\n// site-page:not(:defined) applies when base.css is linked in <head>, before the element\n// upgrades: its own formatting context (flow-root), so a heading's top margin cannot collapse\n// through to <body> and shift the page once the element upgrades, and invisible, so its\n// content does not paint above where the header will go. If the script never loads, the\n// content appears anyway after two seconds.\nexport const base = css`\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n html,\n body {\n font-family: var(\n --uva-font-family,\n franklin-gothic-urw,\n 'UVA Franklin Fallback',\n Arial,\n Helvetica,\n sans-serif\n );\n }\n html {\n font-size: var(--uva-font-size-base, 17px);\n }\n body {\n margin: 0;\n line-height: 1.5;\n min-height: 100vh;\n color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b));\n background-color: var(--uva-color-surface);\n }\n site-page:not(:defined) {\n display: flow-root;\n visibility: hidden;\n animation: uvalib-site-page-reveal 0s 2s forwards;\n }\n uvalib-breadcrumbs:not(:defined),\n uvalib-card:not(:defined),\n uvalib-card-grid:not(:defined),\n uvalib-pager:not(:defined),\n uvalib-contents:not(:defined),\n uvalib-metadata:not(:defined),\n uvalib-tag-list:not(:defined) {\n display: block;\n line-height: 1.5;\n visibility: hidden;\n animation: uvalib-site-page-reveal 0s 2s forwards;\n }\n /* A chip row: hidden, one 44px row tall (with the scrolling row's padding), the raw\n children kept on one line so they cannot make it taller. */\n uvalib-chip-group:not(:defined) {\n display: block;\n min-height: 44px;\n max-width: 100%;\n overflow: hidden;\n white-space: nowrap;\n visibility: hidden;\n animation: uvalib-site-page-reveal 0s 2s forwards;\n }\n uvalib-chip-group[scroll]:not(:defined) {\n min-height: calc(44px + 0.75rem);\n }\n /* A description: one line of it (0.875rem at 1.5, 0.25rem below the row). */\n uvalib-chip-group[description]:not(:defined) {\n padding-block-end: 1.5625rem;\n }\n /* Its text is drawn from attributes: hold one line until it upgrades. */\n uvalib-results-count:not(:defined) {\n display: block;\n min-block-size: 1.5em;\n }\n uvalib-tag-list:not(:defined)[hidden],\n uvalib-results-count:not(:defined)[hidden] {\n display: none;\n }\n /* The pre-upgrade rules here set display, which beats the hidden attribute's (issue #7).\n More specific than each of them (two pseudo-classes or attributes), so it needs no importance flag. */\n :where(\n site-page,\n uvalib-breadcrumbs,\n uvalib-card,\n uvalib-card-grid,\n uvalib-pager,\n uvalib-contents,\n uvalib-metadata,\n uvalib-chip-group,\n uvalib-tabs,\n uvalib-combobox,\n uvalib-image-regions,\n uvalib-map,\n uvalib-filter-drawer,\n uvalib-filter,\n uvalib-list-filter\n ):not(:defined)[hidden],\n :where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] {\n display: none;\n }\n /* A record's details before <uvalib-metadata> upgrades (issue #34): the rows already laid\n out as it lays them out (label beside value from 36rem of its own width, stacked below;\n 8px above and below each row, a 1px rule between rows; lists without bullets, 4px apart),\n so the page does not move when it upgrades. Rows the attributes add (creator, rights,\n citation) are not in the page's <dl> and cannot be held. */\n uvalib-metadata:not(:defined) {\n container-type: inline-size;\n font-size: 1rem;\n }\n uvalib-metadata:not(:defined) > dl {\n display: grid;\n grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr);\n column-gap: 1.5rem;\n margin: 0;\n }\n uvalib-metadata:not(:defined) > dl > dt {\n grid-column: 1;\n margin: 0;\n padding-block: 0.5rem;\n font-weight: 700;\n }\n uvalib-metadata:not(:defined) > dl > dd {\n grid-column: 2;\n margin: 0;\n padding-block: 0.5rem;\n }\n uvalib-metadata:not(:defined) > dl > dt:not(:first-child),\n uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {\n border-block-start: 1px solid transparent;\n }\n uvalib-metadata:not(:defined) > dl > dd > :is(ul, ol) {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n uvalib-metadata:not(:defined) > dl > dd li + li {\n margin-block-start: 0.25rem;\n }\n @container (width < 36rem) {\n uvalib-metadata:not(:defined) > dl {\n grid-template-columns: minmax(0, 1fr);\n }\n uvalib-metadata:not(:defined) > dl > :is(dt, dd) {\n grid-column: 1;\n }\n uvalib-metadata:not(:defined) > dl > dt {\n padding-block-end: 0;\n }\n uvalib-metadata:not(:defined) > dl > dd {\n padding-block-start: 0;\n }\n uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {\n border-block-start: 0;\n }\n }\n ${metadataLimits}\n /* Tabs stay readable before the script runs: a block, one panel, and a gap the\n size of the tab row (44px) plus its 1rem margin, so the first panel does not\n jump when the element upgrades. Later data-tab panels stay hidden. */\n uvalib-tabs:not(:defined) {\n display: block;\n padding-block-start: calc(44px + 1rem);\n }\n uvalib-tabs:not(:defined) > [data-tab] ~ [data-tab] {\n display: none;\n }\n /* A combobox: its label (from the attribute) and one 44px field (plus a one-line\n description) held, so nothing moves when it upgrades. A fallback <input list> child\n works meanwhile; the other children (options, a datalist) stay out of sight. */\n uvalib-combobox:not(:defined) {\n display: block;\n min-block-size: calc(1.5em + 0.25rem + 44px);\n line-height: 1.5;\n }\n uvalib-combobox[description]:not(:defined) {\n min-block-size: calc(3em + 0.5rem + 44px);\n }\n uvalib-combobox:not(:defined)::before {\n content: attr(label);\n display: block;\n margin-block-end: 0.25rem;\n font-weight: 600;\n }\n uvalib-combobox:not(:defined) > :not(input) {\n display: none;\n }\n uvalib-combobox:not(:defined) > input {\n display: block;\n box-sizing: border-box;\n inline-size: 100%;\n min-block-size: 44px;\n font: inherit;\n line-height: 1.2;\n }\n /* A list filter draws its label, a 44px field and a one-line count from attributes: hold\n their height (less the label with hide-label, less the count with results-count), so the\n list below does not move when it upgrades. The list itself is the page's and stays\n fully shown until then. */\n uvalib-list-filter:not(:defined) {\n display: block;\n font-size: 1rem;\n line-height: 1.5;\n min-block-size: calc(1.5em + 0.25rem + 44px + 0.25rem + 1.5em);\n }\n uvalib-list-filter[hide-label]:not(:defined) {\n min-block-size: calc(44px + 0.25rem + 1.5em);\n }\n uvalib-list-filter[results-count]:not(:defined) {\n min-block-size: calc(1.5em + 0.25rem + 44px);\n }\n uvalib-list-filter[hide-label][results-count]:not(:defined) {\n min-block-size: 44px;\n }\n /* Image regions: the image at its own width and the list beside it (or under it), the\n layout the element keeps once it upgrades, so the image does not move. */\n uvalib-image-regions:not(:defined) {\n display: flex;\n flex-wrap: wrap;\n gap: 1rem;\n align-items: flex-start;\n }\n uvalib-image-regions:not(:defined) > :is(img, picture) {\n display: block;\n flex: 0 1 auto;\n min-width: 0;\n max-width: 100%;\n height: auto;\n }\n uvalib-image-regions:not(:defined) > :is(ol, ul) {\n flex: 1 1 14rem;\n min-width: 0;\n }\n /* A map: its key instructions (the same text it shows) and the map's height held above\n the child list, so the list does not move when the map is drawn over the page's\n Leaflet. Padding, not margin, so it cannot collapse with the list's own top margin. */\n uvalib-map:not(:defined) {\n display: block;\n }\n uvalib-map:not(:defined)::before {\n content: 'Tab or arrow keys move between places; Enter opens one. With the map focused, arrow keys pan and + and − zoom.';\n display: block;\n padding-block-end: calc(0.5rem + max(12rem, var(--uvalib-map-height, min(24rem, 75vw))));\n font-size: 0.875rem;\n line-height: 1.5;\n color: var(--uva-color-text-muted, #4b5563);\n }\n /* A collapsed filter group (<uvalib-filter collapsible collapsed>) draws only its 44px\n legend button once it upgrades: hold that height. Low specificity, so the [hidden] rule\n above still wins. */\n :where(uvalib-filter[collapsible][collapsed]):not(:defined) {\n display: block;\n min-block-size: 44px;\n }\n /* A filter drawer on a phone (the default 48rem breakpoint): once it upgrades only its 44px\n \"Search and filters\" button shows, so hold that height and keep the form and filters out\n of sight meanwhile; nothing moves when it upgrades. A page with its own breakpoint adds the\n same two rules in a media query of that width (see the README). Low specificity, so the\n [hidden] rule above still wins. */\n @media (max-width: 48rem) {\n :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) {\n display: block;\n min-block-size: 44px;\n }\n :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) > * {\n display: none;\n }\n }\n /* A contents list before <uvalib-contents> upgrades (a .uvalib-sidebar-layout sidebar): the\n headline's line held above, the links already padded as it pads them (the rules drawn\n transparent while hidden), so the list does not move. Narrow (the default 64rem\n collapse-below, closed): only its 44px button shows once it upgrades, so hold that and\n clip the list; the reveal releases it, so the list still shows if the script never loads.\n The [hidden] rule above still wins (it alone sets display). */\n uvalib-contents:not(:defined) {\n padding-block-start: calc(1.125rem * 1.3 + 0.5rem);\n animation-name: uvalib-contents-reveal;\n }\n /* With full-href (issue #38): the full-contents link's line held below the list (0.5rem\n above a 44px link). A window=\"N\" list is not held: the whole list shows until it upgrades\n (in a sidebar beside the content, nothing else moves). */\n uvalib-contents[full-href]:not(:defined) {\n padding-block-end: calc(44px + 0.5rem);\n }\n :where(uvalib-contents):not(:defined) :is(ol, ul) {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n :where(uvalib-contents):not(:defined) > :is(ol, ul) {\n border-block: 1px solid transparent;\n }\n :where(uvalib-contents):not(:defined) > :is(ol, ul) > li + li {\n border-block-start: 1px solid transparent;\n }\n :where(uvalib-contents):not(:defined) li > a {\n display: block;\n padding: 0.5rem 0.75rem 0.5rem calc(0.75rem + 4px);\n }\n :where(uvalib-contents):not(:defined) li li > a {\n padding-block: 0.25rem;\n }\n :where(uvalib-contents):not(:defined) li :is(ol, ul) {\n padding-inline-start: 1rem;\n border-inline-start: 2px solid transparent;\n }\n /* In light DOM (no-shadow-dom) a nested list is indented by a margin, with 0.5rem below. */\n :where(uvalib-contents[no-shadow-dom]):not(:defined) li :is(ol, ul) {\n margin: 0 0 0.5rem 0.75rem;\n padding-inline-start: 0;\n }\n @media (max-width: 64rem) {\n uvalib-contents:not([collapse-below], [open]):not(:defined) {\n max-block-size: 44px;\n padding-block: 0;\n overflow: hidden;\n }\n }\n @keyframes uvalib-contents-reveal {\n to {\n visibility: visible;\n max-block-size: none;\n overflow: visible;\n }\n }\n /* A dialog before <uvalib-dialog> upgrades: its children are the dialog's content, never\n shown in the page, so nothing flashes or moves. Once defined, a closed dialog renders\n nothing (its host is display: contents around a closed <dialog>). */\n uvalib-dialog:not(:defined) {\n display: none;\n }\n /* A citation before <uvalib-citation> upgrades: only the first format's citation, boxed\n as it will be, with the label and 44px format bar held above it (none for hide-label)\n and the 44px Copy citation row below, so nothing moves when it upgrades (an app's\n citations property cannot be held). */\n uvalib-citation:not(:defined) {\n display: block;\n font-size: 1rem;\n line-height: 1.5;\n }\n uvalib-citation:not(:defined):has(> [data-format]) {\n padding-block: calc(2rem + 44px + 0.75rem) calc(0.75rem + 44px);\n }\n uvalib-citation[hide-label]:not(:defined):has(> [data-format]) {\n padding-block-start: calc(44px + 0.75rem);\n }\n uvalib-citation:not(:defined) > [data-format] {\n margin: 0;\n padding: 0.75rem 1rem;\n border: 1px solid transparent;\n overflow-wrap: anywhere;\n text-wrap: pretty;\n }\n uvalib-citation:not(:defined) > [data-format] ~ [data-format],\n uvalib-citation:not(:defined) > [slot] {\n display: none;\n }\n /* Printing a <site-page> (issue #20; its own styles leave out the chrome): a dark scheme\n prints light (the role tokens resolve to their light values), and the content's links\n are black and underlined, so they are told apart without colour. Content is <main> in\n light DOM and the unslotted children in shadow DOM. print-chrome keeps the page as it is\n shown, apart from the light scheme. */\n @media print {\n :root[data-uva-color-scheme]:has(site-page) {\n color-scheme: light;\n --uva-color-scheme: light;\n }\n /* Light DOM's trail, here too, as the pre-upgrade rule above (unlayered) would win. */\n site-page:not([print-chrome]) > [slot='breadcrumbs'] {\n display: none;\n }\n site-page:not([print-chrome]) > :not([slot], site-header, site-footer, .alerts-list) :any-link,\n site-page:not([print-chrome]) > :any-link:not([slot], .skip-link) {\n color: #000;\n text-decoration: underline;\n }\n }\n @keyframes uvalib-site-page-reveal {\n to {\n visibility: visible;\n }\n }\n`;\n"],"mappings":";;AAkBA,IAAaG,IAAe,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDzBC,IAAQ;CAAC;CAAO;CAAO;CAAO;AAAY;AAQhD,SAAgBC,EAAiB,GAAqB;CACpD,IAAMC,IAAQC,EAAI;CAClB,IAAKD,GAAO,MACZ,KAAK,IAAME,KAAQJ,GAAO,EAAM,KAAK,GAAGI,EAAK,6BAA6B,CAAC,CAAC,YAAY,CAAC,CAAC;AAC5F;;AC3EA,IAAaC,IAAS,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCOnBC,IAAkB,MAAM,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAMT,IAAI,CAAC,GAC5DU,IAAiBX,EACrBU,EAAgB,KAAK,MAAM;CACzB,IAAME,IAAQ,CACZ,+BAA+BC,EAAE,+EACjC,uDAAuDA,EAAE,iBAC3D;CACA,OACE,GAAGD,EAAM,KAAK,MAAM,GAAGE,EAAE,sBAAsBD,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,EAAE,uBAClED,EAAM,KAAK,MAAM,GAAGE,EAAE,sBAAsBD,IAAI,EAAE,UAAU,CAAC,CAAC,KAAK,KAAK,EAAE;AAEjF,CAAC,CAAC,CAAC,KAAK,IAAI,CACd,GAEaE,IAAc,uCASdC,IAAO,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoJnBL,EAAe"}