@uvalib/web-components 1.8.3 → 1.8.4
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.
- package/CHANGELOG.md +10 -0
- package/README.md +22 -0
- package/dist/base.css +103 -0
- package/dist/custom-elements.json +41 -41
- package/dist/styles/base.js +74 -1
- package/dist/styles/base.js.map +1 -1
- package/dist-cdn/base.css +103 -0
- package/dist-cdn/chunks/{base-CIX_-Rmo.js → base-DfLI8lpa.js} +65 -6
- package/dist-cdn/chunks/base-DfLI8lpa.js.map +1 -0
- package/dist-cdn/custom-elements.json +41 -41
- package/dist-cdn/manifest.json +1 -1
- package/dist-cdn/site-page.js +1 -1
- package/dist-cdn/site-style.js +1 -1
- package/dist-cdn/skills/uvalib-web-components/SKILL.md +1 -1
- package/package.json +1 -1
- package/skills/uvalib-web-components/SKILL.md +1 -1
- package/dist-cdn/chunks/base-CIX_-Rmo.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.8.4 — 2026-11-23
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- hold the upgraded layout before <uvalib-metadata> is defined (issue #34)
|
|
8
|
+
|
|
9
|
+
### Other
|
|
10
|
+
|
|
11
|
+
- Merge branch 'fix/metadata-preupgrade': hold <uvalib-metadata>'s layout before it upgrades (issue #34)
|
|
12
|
+
|
|
3
13
|
## v1.8.3 — 2026-11-23
|
|
4
14
|
|
|
5
15
|
### Other
|
package/README.md
CHANGED
|
@@ -531,6 +531,28 @@ Two components for Library sites with records and long texts, such as the Electr
|
|
|
531
531
|
- **The rows as a `<dl>` child**, so the page reads the same before the script runs: `<dt>` labels and `<dd>` values, optionally a `<div>` per row; several `<dd>` are several values. Values are copied as written (links, lists such as subjects, `download` attributes, and `lang`/`dir` on the `<dt>` and `<dd>`); a link whose href is not relative, http(s), `mailto:` or `tel:` is shown as its text, with one console warning. A link with `data-size` is shown as a download, "EPUB · 184 KB", read as "EPUB, 184 KB" (not added again when the link's text already ends with the size). Apps set `items` instead: `[{ label, value }]`, a value being text, a link `{ label, href, size?, download? }` or an array of them (a list).
|
|
532
532
|
- **Credit and rights**, as Special Collections asks: `creator` and `organization` rows first; `rights` last, a rightsstatements.org or Creative Commons URL shown as its short name ("In Copyright", "No Copyright – United States", "CC BY 4.0", "CC0 1.0") linked with `rel="license"`, another URL as `rights-label` (else "Rights statement"), or plain text; `rights-info` adds a "More about rights and permissions" link (the library's is `https://www.library.virginia.edu/policies/use-of-materials`).
|
|
533
533
|
- **Long lists.** `list-limit="8"` on the element shortens every value that is a list (a `<ul>` or `<ol>` directly in the `<dd>`) of more than 8 items: the first 8 show, then a real button, “Show all 34 participants” (`aria-expanded`, `aria-controls`; the count in its name), reveals the rest in place and moves focus to the first one revealed (its link, or the item itself with `tabindex="-1"`); it then reads “Show fewer”, which hides them again and keeps focus on the button. `data-limit` on a `<dd>` or its list sets that row's own limit and wins (`data-limit="0"`: never shortened). The noun is the row's label with a lowercase first letter (“Participants” → “participants”; a label that starts with an acronym, “ORCID iDs”, is kept as written); set `data-limit-label="people"` when that does not read well (a singular label, say). Apps set `limit` and `limitLabel` on an `items` row. The hidden values carry `hidden`, so they are not read until shown, and every value stays in the markup: without JavaScript the whole list shows. Before the script loads the element is hidden at its full height, so content below moves up once when it upgrades. The button is an underlined text button like `<uvalib-tag-list>`'s Show all: at least 2rem (34px) square (24px with `no-style`), `ButtonText` in forced colors, no animation (nothing to reduce). Analytics: `show-all` / `show-fewer` with `row N`, the row's place, never its label or values.
|
|
534
|
+
- **No jump on upgrade.** `base.css` lays the `<dl>` out as the element will (label beside value from 36rem, stacked below) and, for limits 1 to 12 (`list-limit`, or `data-limit` on a row's `<dd>`), already shows only the first N values and a line for the button, so the page does not move when the script runs. For a larger limit, add the same rule for your number to the page, here for 20:
|
|
535
|
+
|
|
536
|
+
```css
|
|
537
|
+
uvalib-metadata[list-limit='20']:not(:defined)
|
|
538
|
+
> dl
|
|
539
|
+
> dd:not([data-limit])
|
|
540
|
+
> :is(ul, ol)
|
|
541
|
+
> li:nth-child(n + 21) {
|
|
542
|
+
display: none;
|
|
543
|
+
}
|
|
544
|
+
uvalib-metadata[list-limit='20']:not(:defined)
|
|
545
|
+
> dl
|
|
546
|
+
> dd:not([data-limit])
|
|
547
|
+
> :is(ul, ol):has(> li:nth-child(21))::after {
|
|
548
|
+
content: '';
|
|
549
|
+
display: block;
|
|
550
|
+
block-size: 2.25rem;
|
|
551
|
+
}
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
The rows the attributes add (`creator`, `organization`, `rights`, a citation) are drawn by the script, so `base.css` cannot hold their height: the page moves by those rows, which are usually few and short.
|
|
555
|
+
|
|
534
556
|
- **How to cite.** `citation` (as written), or `citation-title` for the Special Collections formula "<title or collection>, Albert and Shirley Small Special Collections Library, University of Virginia". A Copy citation button copies it and says "Copied" in a polite status; where the clipboard is unavailable it selects the citation and says so.
|
|
535
557
|
- **Layout.** Label and value side by side when the element is 36rem wide or more, stacked below that (a container query: the element's own width). Labels in `--uva-color-text-muted`, rows divided by `--uva-color-border`.
|
|
536
558
|
|
package/dist/base.css
CHANGED
|
@@ -135,6 +135,109 @@
|
|
|
135
135
|
:where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] {
|
|
136
136
|
display: none;
|
|
137
137
|
}
|
|
138
|
+
/* A record's details before <uvalib-metadata> upgrades (issue #34): the rows already laid
|
|
139
|
+
out as it lays them out (label beside value from 36rem of its own width, stacked below;
|
|
140
|
+
8px above and below each row, a 1px rule between rows; lists without bullets, 4px apart),
|
|
141
|
+
so the page does not move when it upgrades. Rows the attributes add (creator, rights,
|
|
142
|
+
citation) are not in the page's <dl> and cannot be held. */
|
|
143
|
+
uvalib-metadata:not(:defined) {
|
|
144
|
+
container-type: inline-size;
|
|
145
|
+
font-size: 1rem;
|
|
146
|
+
}
|
|
147
|
+
uvalib-metadata:not(:defined) > dl {
|
|
148
|
+
display: grid;
|
|
149
|
+
grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr);
|
|
150
|
+
column-gap: 1.5rem;
|
|
151
|
+
margin: 0;
|
|
152
|
+
}
|
|
153
|
+
uvalib-metadata:not(:defined) > dl > dt {
|
|
154
|
+
grid-column: 1;
|
|
155
|
+
margin: 0;
|
|
156
|
+
padding-block: 0.5rem;
|
|
157
|
+
font-weight: 700;
|
|
158
|
+
}
|
|
159
|
+
uvalib-metadata:not(:defined) > dl > dd {
|
|
160
|
+
grid-column: 2;
|
|
161
|
+
margin: 0;
|
|
162
|
+
padding-block: 0.5rem;
|
|
163
|
+
}
|
|
164
|
+
uvalib-metadata:not(:defined) > dl > dt:not(:first-child),
|
|
165
|
+
uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {
|
|
166
|
+
border-block-start: 1px solid transparent;
|
|
167
|
+
}
|
|
168
|
+
uvalib-metadata:not(:defined) > dl > dd > :is(ul, ol) {
|
|
169
|
+
margin: 0;
|
|
170
|
+
padding: 0;
|
|
171
|
+
list-style: none;
|
|
172
|
+
}
|
|
173
|
+
uvalib-metadata:not(:defined) > dl > dd li + li {
|
|
174
|
+
margin-block-start: 0.25rem;
|
|
175
|
+
}
|
|
176
|
+
@container (width < 36rem) {
|
|
177
|
+
uvalib-metadata:not(:defined) > dl {
|
|
178
|
+
grid-template-columns: minmax(0, 1fr);
|
|
179
|
+
}
|
|
180
|
+
uvalib-metadata:not(:defined) > dl > :is(dt, dd) {
|
|
181
|
+
grid-column: 1;
|
|
182
|
+
}
|
|
183
|
+
uvalib-metadata:not(:defined) > dl > dt {
|
|
184
|
+
padding-block-end: 0;
|
|
185
|
+
}
|
|
186
|
+
uvalib-metadata:not(:defined) > dl > dd {
|
|
187
|
+
padding-block-start: 0;
|
|
188
|
+
}
|
|
189
|
+
uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {
|
|
190
|
+
border-block-start: 0;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
uvalib-metadata[list-limit="1"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 2),
|
|
194
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="1"] > :is(ul, ol) > li:nth-child(n + 2) { display: none; }
|
|
195
|
+
uvalib-metadata[list-limit="1"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(2))::after,
|
|
196
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="1"] > :is(ul, ol):has(> li:nth-child(2))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
197
|
+
uvalib-metadata[list-limit="2"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 3),
|
|
198
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="2"] > :is(ul, ol) > li:nth-child(n + 3) { display: none; }
|
|
199
|
+
uvalib-metadata[list-limit="2"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(3))::after,
|
|
200
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="2"] > :is(ul, ol):has(> li:nth-child(3))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
201
|
+
uvalib-metadata[list-limit="3"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 4),
|
|
202
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="3"] > :is(ul, ol) > li:nth-child(n + 4) { display: none; }
|
|
203
|
+
uvalib-metadata[list-limit="3"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(4))::after,
|
|
204
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="3"] > :is(ul, ol):has(> li:nth-child(4))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
205
|
+
uvalib-metadata[list-limit="4"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 5),
|
|
206
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="4"] > :is(ul, ol) > li:nth-child(n + 5) { display: none; }
|
|
207
|
+
uvalib-metadata[list-limit="4"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(5))::after,
|
|
208
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="4"] > :is(ul, ol):has(> li:nth-child(5))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
209
|
+
uvalib-metadata[list-limit="5"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 6),
|
|
210
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="5"] > :is(ul, ol) > li:nth-child(n + 6) { display: none; }
|
|
211
|
+
uvalib-metadata[list-limit="5"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(6))::after,
|
|
212
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="5"] > :is(ul, ol):has(> li:nth-child(6))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
213
|
+
uvalib-metadata[list-limit="6"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 7),
|
|
214
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="6"] > :is(ul, ol) > li:nth-child(n + 7) { display: none; }
|
|
215
|
+
uvalib-metadata[list-limit="6"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(7))::after,
|
|
216
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="6"] > :is(ul, ol):has(> li:nth-child(7))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
217
|
+
uvalib-metadata[list-limit="7"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 8),
|
|
218
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="7"] > :is(ul, ol) > li:nth-child(n + 8) { display: none; }
|
|
219
|
+
uvalib-metadata[list-limit="7"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(8))::after,
|
|
220
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="7"] > :is(ul, ol):has(> li:nth-child(8))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
221
|
+
uvalib-metadata[list-limit="8"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 9),
|
|
222
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="8"] > :is(ul, ol) > li:nth-child(n + 9) { display: none; }
|
|
223
|
+
uvalib-metadata[list-limit="8"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(9))::after,
|
|
224
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="8"] > :is(ul, ol):has(> li:nth-child(9))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
225
|
+
uvalib-metadata[list-limit="9"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 10),
|
|
226
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="9"] > :is(ul, ol) > li:nth-child(n + 10) { display: none; }
|
|
227
|
+
uvalib-metadata[list-limit="9"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(10))::after,
|
|
228
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="9"] > :is(ul, ol):has(> li:nth-child(10))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
229
|
+
uvalib-metadata[list-limit="10"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 11),
|
|
230
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="10"] > :is(ul, ol) > li:nth-child(n + 11) { display: none; }
|
|
231
|
+
uvalib-metadata[list-limit="10"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(11))::after,
|
|
232
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="10"] > :is(ul, ol):has(> li:nth-child(11))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
233
|
+
uvalib-metadata[list-limit="11"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 12),
|
|
234
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="11"] > :is(ul, ol) > li:nth-child(n + 12) { display: none; }
|
|
235
|
+
uvalib-metadata[list-limit="11"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(12))::after,
|
|
236
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="11"] > :is(ul, ol):has(> li:nth-child(12))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
237
|
+
uvalib-metadata[list-limit="12"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 13),
|
|
238
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="12"] > :is(ul, ol) > li:nth-child(n + 13) { display: none; }
|
|
239
|
+
uvalib-metadata[list-limit="12"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(13))::after,
|
|
240
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="12"] > :is(ul, ol):has(> li:nth-child(13))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
138
241
|
/* Tabs stay readable before the script runs: a block, one panel, and a gap the
|
|
139
242
|
size of the tab row (44px) plus its 1rem margin, so the first panel does not
|
|
140
243
|
jump when the element upgrades. Later data-tab panels stay hidden. */
|
|
@@ -2463,6 +2463,46 @@
|
|
|
2463
2463
|
}
|
|
2464
2464
|
]
|
|
2465
2465
|
},
|
|
2466
|
+
{
|
|
2467
|
+
"kind": "javascript-module",
|
|
2468
|
+
"path": "src/components/link.ts",
|
|
2469
|
+
"declarations": [
|
|
2470
|
+
{
|
|
2471
|
+
"kind": "function",
|
|
2472
|
+
"name": "siteLink",
|
|
2473
|
+
"return": {
|
|
2474
|
+
"type": {
|
|
2475
|
+
"text": "string"
|
|
2476
|
+
}
|
|
2477
|
+
},
|
|
2478
|
+
"parameters": [
|
|
2479
|
+
{
|
|
2480
|
+
"name": "root",
|
|
2481
|
+
"type": {
|
|
2482
|
+
"text": "string"
|
|
2483
|
+
}
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
"name": "path",
|
|
2487
|
+
"type": {
|
|
2488
|
+
"text": "string"
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
],
|
|
2492
|
+
"description": "Join a site root and a path with exactly one \"/\"; paths with a URL scheme or starting with // pass through."
|
|
2493
|
+
}
|
|
2494
|
+
],
|
|
2495
|
+
"exports": [
|
|
2496
|
+
{
|
|
2497
|
+
"kind": "js",
|
|
2498
|
+
"name": "siteLink",
|
|
2499
|
+
"declaration": {
|
|
2500
|
+
"name": "siteLink",
|
|
2501
|
+
"module": "src/components/link.ts"
|
|
2502
|
+
}
|
|
2503
|
+
}
|
|
2504
|
+
]
|
|
2505
|
+
},
|
|
2466
2506
|
{
|
|
2467
2507
|
"kind": "javascript-module",
|
|
2468
2508
|
"path": "src/data/fetch-json.ts",
|
|
@@ -2688,46 +2728,6 @@
|
|
|
2688
2728
|
}
|
|
2689
2729
|
]
|
|
2690
2730
|
},
|
|
2691
|
-
{
|
|
2692
|
-
"kind": "javascript-module",
|
|
2693
|
-
"path": "src/components/link.ts",
|
|
2694
|
-
"declarations": [
|
|
2695
|
-
{
|
|
2696
|
-
"kind": "function",
|
|
2697
|
-
"name": "siteLink",
|
|
2698
|
-
"return": {
|
|
2699
|
-
"type": {
|
|
2700
|
-
"text": "string"
|
|
2701
|
-
}
|
|
2702
|
-
},
|
|
2703
|
-
"parameters": [
|
|
2704
|
-
{
|
|
2705
|
-
"name": "root",
|
|
2706
|
-
"type": {
|
|
2707
|
-
"text": "string"
|
|
2708
|
-
}
|
|
2709
|
-
},
|
|
2710
|
-
{
|
|
2711
|
-
"name": "path",
|
|
2712
|
-
"type": {
|
|
2713
|
-
"text": "string"
|
|
2714
|
-
}
|
|
2715
|
-
}
|
|
2716
|
-
],
|
|
2717
|
-
"description": "Join a site root and a path with exactly one \"/\"; paths with a URL scheme or starting with // pass through."
|
|
2718
|
-
}
|
|
2719
|
-
],
|
|
2720
|
-
"exports": [
|
|
2721
|
-
{
|
|
2722
|
-
"kind": "js",
|
|
2723
|
-
"name": "siteLink",
|
|
2724
|
-
"declaration": {
|
|
2725
|
-
"name": "siteLink",
|
|
2726
|
-
"module": "src/components/link.ts"
|
|
2727
|
-
}
|
|
2728
|
-
}
|
|
2729
|
-
]
|
|
2730
|
-
},
|
|
2731
2731
|
{
|
|
2732
2732
|
"kind": "javascript-module",
|
|
2733
2733
|
"path": "src/styles/accessible.ts",
|
|
@@ -2764,7 +2764,7 @@
|
|
|
2764
2764
|
{
|
|
2765
2765
|
"kind": "variable",
|
|
2766
2766
|
"name": "base",
|
|
2767
|
-
"default": "css` *, *::before, *::after { box-sizing: border-box; } html, body { font-family: var( --uva-font-family, franklin-gothic-urw, 'UVA Franklin Fallback', Arial, Helvetica, sans-serif ); } html { font-size: var(--uva-font-size-base, 17px); } body { margin: 0; line-height: 1.5; min-height: 100vh; color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b)); background-color: var(--uva-color-surface); } site-page:not(:defined) { display: flow-root; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } uvalib-breadcrumbs:not(:defined), uvalib-card:not(:defined), uvalib-card-grid:not(:defined), uvalib-pager:not(:defined), uvalib-contents:not(:defined), uvalib-metadata:not(:defined), uvalib-tag-list:not(:defined) { display: block; line-height: 1.5; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } /* A chip row: hidden, one 44px row tall (with the scrolling row's padding), the raw children kept on one line so they cannot make it taller. */ uvalib-chip-group:not(:defined) { display: block; min-height: 44px; max-width: 100%; overflow: hidden; white-space: nowrap; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } uvalib-chip-group[scroll]:not(:defined) { min-height: calc(44px + 0.75rem); } /* A description: one line of it (0.875rem at 1.5, 0.25rem below the row). */ uvalib-chip-group[description]:not(:defined) { padding-block-end: 1.5625rem; } /* Its text is drawn from attributes: hold one line until it upgrades. */ uvalib-results-count:not(:defined) { display: block; min-block-size: 1.5em; } uvalib-tag-list:not(:defined)[hidden], uvalib-results-count:not(:defined)[hidden] { display: none; } /* The pre-upgrade rules here set display, which beats the hidden attribute's (issue #7). More specific than each of them (two pseudo-classes or attributes), so it needs no importance flag. */ :where( site-page, uvalib-breadcrumbs, uvalib-card, uvalib-card-grid, uvalib-pager, uvalib-contents, uvalib-metadata, uvalib-chip-group, uvalib-tabs, uvalib-combobox, uvalib-image-regions, uvalib-map, uvalib-filter-drawer ):not(:defined)[hidden], :where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] { display: none; } /* Tabs stay readable before the script runs: a block, one panel, and a gap the size of the tab row (44px) plus its 1rem margin, so the first panel does not jump when the element upgrades. Later data-tab panels stay hidden. */ uvalib-tabs:not(:defined) { display: block; padding-block-start: calc(44px + 1rem); } uvalib-tabs:not(:defined) > [data-tab] ~ [data-tab] { display: none; } /* A combobox: its label (from the attribute) and one 44px field (plus a one-line description) held, so nothing moves when it upgrades. A fallback <input list> child works meanwhile; the other children (options, a datalist) stay out of sight. */ uvalib-combobox:not(:defined) { display: block; min-block-size: calc(1.5em + 0.25rem + 44px); line-height: 1.5; } uvalib-combobox[description]:not(:defined) { min-block-size: calc(3em + 0.5rem + 44px); } uvalib-combobox:not(:defined)::before { content: attr(label); display: block; margin-block-end: 0.25rem; font-weight: 600; } uvalib-combobox:not(:defined) > :not(input) { display: none; } uvalib-combobox:not(:defined) > input { display: block; box-sizing: border-box; inline-size: 100%; min-block-size: 44px; font: inherit; line-height: 1.2; } /* Image regions: the image at its own width and the list beside it (or under it), the layout the element keeps once it upgrades, so the image does not move. */ uvalib-image-regions:not(:defined) { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; } uvalib-image-regions:not(:defined) > :is(img, picture) { display: block; flex: 0 1 auto; min-width: 0; max-width: 100%; height: auto; } uvalib-image-regions:not(:defined) > :is(ol, ul) { flex: 1 1 14rem; min-width: 0; } /* A map: its key instructions (the same text it shows) and the map's height held above the child list, so the list does not move when the map is drawn over the page's Leaflet. Padding, not margin, so it cannot collapse with the list's own top margin. */ uvalib-map:not(:defined) { display: block; } uvalib-map:not(:defined)::before { content: 'Tab or arrow keys move between places; Enter opens one. With the map focused, arrow keys pan and + and − zoom.'; display: block; padding-block-end: calc(0.5rem + max(12rem, var(--uvalib-map-height, min(24rem, 75vw)))); font-size: 0.875rem; line-height: 1.5; color: var(--uva-color-text-muted, #4b5563); } /* A filter drawer on a phone (the default 48rem breakpoint): once it upgrades only its 44px \"Search and filters\" button shows, so hold that height and keep the form and filters out of sight meanwhile; nothing moves when it upgrades. A page with its own breakpoint adds the same two rules in a media query of that width (see the README). Low specificity, so the [hidden] rule above still wins. */ @media (max-width: 48rem) { :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) { display: block; min-block-size: 44px; } :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) > * { display: none; } } /* Printing a <site-page> (issue #20; its own styles leave out the chrome): a dark scheme prints light (the role tokens resolve to their light values), and the content's links are black and underlined, so they are told apart without colour. Content is <main> in light DOM and the unslotted children in shadow DOM. print-chrome keeps the page as it is shown, apart from the light scheme. */ @media print { :root[data-uva-color-scheme]:has(site-page) { color-scheme: light; --uva-color-scheme: light; } /* Light DOM's trail, here too, as the pre-upgrade rule above (unlayered) would win. */ site-page:not([print-chrome]) > [slot='breadcrumbs'] { display: none; } site-page:not([print-chrome]) > :not([slot], site-header, site-footer, .alerts-list) :any-link, site-page:not([print-chrome]) > :any-link:not([slot], .skip-link) { color: #000; text-decoration: underline; } } @keyframes uvalib-site-page-reveal { to { visibility: visible; } } `"
|
|
2767
|
+
"default": "css` *, *::before, *::after { box-sizing: border-box; } html, body { font-family: var( --uva-font-family, franklin-gothic-urw, 'UVA Franklin Fallback', Arial, Helvetica, sans-serif ); } html { font-size: var(--uva-font-size-base, 17px); } body { margin: 0; line-height: 1.5; min-height: 100vh; color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b)); background-color: var(--uva-color-surface); } site-page:not(:defined) { display: flow-root; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } uvalib-breadcrumbs:not(:defined), uvalib-card:not(:defined), uvalib-card-grid:not(:defined), uvalib-pager:not(:defined), uvalib-contents:not(:defined), uvalib-metadata:not(:defined), uvalib-tag-list:not(:defined) { display: block; line-height: 1.5; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } /* A chip row: hidden, one 44px row tall (with the scrolling row's padding), the raw children kept on one line so they cannot make it taller. */ uvalib-chip-group:not(:defined) { display: block; min-height: 44px; max-width: 100%; overflow: hidden; white-space: nowrap; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } uvalib-chip-group[scroll]:not(:defined) { min-height: calc(44px + 0.75rem); } /* A description: one line of it (0.875rem at 1.5, 0.25rem below the row). */ uvalib-chip-group[description]:not(:defined) { padding-block-end: 1.5625rem; } /* Its text is drawn from attributes: hold one line until it upgrades. */ uvalib-results-count:not(:defined) { display: block; min-block-size: 1.5em; } uvalib-tag-list:not(:defined)[hidden], uvalib-results-count:not(:defined)[hidden] { display: none; } /* The pre-upgrade rules here set display, which beats the hidden attribute's (issue #7). More specific than each of them (two pseudo-classes or attributes), so it needs no importance flag. */ :where( site-page, uvalib-breadcrumbs, uvalib-card, uvalib-card-grid, uvalib-pager, uvalib-contents, uvalib-metadata, uvalib-chip-group, uvalib-tabs, uvalib-combobox, uvalib-image-regions, uvalib-map, uvalib-filter-drawer ):not(:defined)[hidden], :where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] { display: none; } /* A record's details before <uvalib-metadata> upgrades (issue #34): the rows already laid out as it lays them out (label beside value from 36rem of its own width, stacked below; 8px above and below each row, a 1px rule between rows; lists without bullets, 4px apart), so the page does not move when it upgrades. Rows the attributes add (creator, rights, citation) are not in the page's <dl> and cannot be held. */ uvalib-metadata:not(:defined) { container-type: inline-size; font-size: 1rem; } uvalib-metadata:not(:defined) > dl { display: grid; grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr); column-gap: 1.5rem; margin: 0; } uvalib-metadata:not(:defined) > dl > dt { grid-column: 1; margin: 0; padding-block: 0.5rem; font-weight: 700; } uvalib-metadata:not(:defined) > dl > dd { grid-column: 2; margin: 0; padding-block: 0.5rem; } uvalib-metadata:not(:defined) > dl > dt:not(:first-child), uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd { border-block-start: 1px solid transparent; } uvalib-metadata:not(:defined) > dl > dd > :is(ul, ol) { margin: 0; padding: 0; list-style: none; } uvalib-metadata:not(:defined) > dl > dd li + li { margin-block-start: 0.25rem; } @container (width < 36rem) { uvalib-metadata:not(:defined) > dl { grid-template-columns: minmax(0, 1fr); } uvalib-metadata:not(:defined) > dl > :is(dt, dd) { grid-column: 1; } uvalib-metadata:not(:defined) > dl > dt { padding-block-end: 0; } uvalib-metadata:not(:defined) > dl > dd { padding-block-start: 0; } uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd { border-block-start: 0; } } ${metadataLimits} /* Tabs stay readable before the script runs: a block, one panel, and a gap the size of the tab row (44px) plus its 1rem margin, so the first panel does not jump when the element upgrades. Later data-tab panels stay hidden. */ uvalib-tabs:not(:defined) { display: block; padding-block-start: calc(44px + 1rem); } uvalib-tabs:not(:defined) > [data-tab] ~ [data-tab] { display: none; } /* A combobox: its label (from the attribute) and one 44px field (plus a one-line description) held, so nothing moves when it upgrades. A fallback <input list> child works meanwhile; the other children (options, a datalist) stay out of sight. */ uvalib-combobox:not(:defined) { display: block; min-block-size: calc(1.5em + 0.25rem + 44px); line-height: 1.5; } uvalib-combobox[description]:not(:defined) { min-block-size: calc(3em + 0.5rem + 44px); } uvalib-combobox:not(:defined)::before { content: attr(label); display: block; margin-block-end: 0.25rem; font-weight: 600; } uvalib-combobox:not(:defined) > :not(input) { display: none; } uvalib-combobox:not(:defined) > input { display: block; box-sizing: border-box; inline-size: 100%; min-block-size: 44px; font: inherit; line-height: 1.2; } /* Image regions: the image at its own width and the list beside it (or under it), the layout the element keeps once it upgrades, so the image does not move. */ uvalib-image-regions:not(:defined) { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; } uvalib-image-regions:not(:defined) > :is(img, picture) { display: block; flex: 0 1 auto; min-width: 0; max-width: 100%; height: auto; } uvalib-image-regions:not(:defined) > :is(ol, ul) { flex: 1 1 14rem; min-width: 0; } /* A map: its key instructions (the same text it shows) and the map's height held above the child list, so the list does not move when the map is drawn over the page's Leaflet. Padding, not margin, so it cannot collapse with the list's own top margin. */ uvalib-map:not(:defined) { display: block; } uvalib-map:not(:defined)::before { content: 'Tab or arrow keys move between places; Enter opens one. With the map focused, arrow keys pan and + and − zoom.'; display: block; padding-block-end: calc(0.5rem + max(12rem, var(--uvalib-map-height, min(24rem, 75vw)))); font-size: 0.875rem; line-height: 1.5; color: var(--uva-color-text-muted, #4b5563); } /* A filter drawer on a phone (the default 48rem breakpoint): once it upgrades only its 44px \"Search and filters\" button shows, so hold that height and keep the form and filters out of sight meanwhile; nothing moves when it upgrades. A page with its own breakpoint adds the same two rules in a media query of that width (see the README). Low specificity, so the [hidden] rule above still wins. */ @media (max-width: 48rem) { :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) { display: block; min-block-size: 44px; } :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) > * { display: none; } } /* Printing a <site-page> (issue #20; its own styles leave out the chrome): a dark scheme prints light (the role tokens resolve to their light values), and the content's links are black and underlined, so they are told apart without colour. Content is <main> in light DOM and the unslotted children in shadow DOM. print-chrome keeps the page as it is shown, apart from the light scheme. */ @media print { :root[data-uva-color-scheme]:has(site-page) { color-scheme: light; --uva-color-scheme: light; } /* Light DOM's trail, here too, as the pre-upgrade rule above (unlayered) would win. */ site-page:not([print-chrome]) > [slot='breadcrumbs'] { display: none; } site-page:not([print-chrome]) > :not([slot], site-header, site-footer, .alerts-list) :any-link, site-page:not([print-chrome]) > :any-link:not([slot], .skip-link) { color: #000; text-decoration: underline; } } @keyframes uvalib-site-page-reveal { to { visibility: visible; } } `"
|
|
2768
2768
|
}
|
|
2769
2769
|
],
|
|
2770
2770
|
"exports": [
|
package/dist/styles/base.js
CHANGED
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
1
|
+
import { css, unsafeCSS } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* `<uvalib-metadata>` long lists before it upgrades (issue #34): a list of more than N values
|
|
4
|
+
* shows its first N and a line for its "Show all" button (4px above a 32px button), as the
|
|
5
|
+
* upgraded element does. CSS cannot read N from the attribute into :nth-child(), so the rules
|
|
6
|
+
* are written out for limits 1 to 12; a page with a larger limit adds its own (README). A row's
|
|
7
|
+
* own data-limit on its <dd> wins over list-limit (data-limit="0" shows them all); a data-limit
|
|
8
|
+
* on the list itself works once upgraded but is not held before.
|
|
9
|
+
*/
|
|
10
|
+
const METADATA_LIMITS = Array.from({ length: 12 }, (_, i) => i + 1);
|
|
11
|
+
const metadataLimits = unsafeCSS(METADATA_LIMITS.map((n) => {
|
|
12
|
+
const lists = [
|
|
13
|
+
`uvalib-metadata[list-limit="${n}"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit])`,
|
|
14
|
+
`uvalib-metadata:not(:defined) > dl > dd[data-limit="${n}"] > :is(ul, ol)`,
|
|
15
|
+
];
|
|
16
|
+
return (`${lists.map((l) => `${l} > li:nth-child(n + ${n + 1})`).join(',\n')} { display: none; }\n` +
|
|
17
|
+
`${lists.map((l) => `${l}:has(> li:nth-child(${n + 1}))::after`).join(',\n')} { content: ''; display: block; block-size: 2.25rem; }`);
|
|
18
|
+
}).join('\n'));
|
|
2
19
|
export const TYPEKIT_URL = 'https://use.typekit.net/oym8nvz.css';
|
|
3
20
|
// The body background has no fallback: without dark mode it stays transparent, as before.
|
|
4
21
|
//
|
|
@@ -98,6 +115,62 @@ export const base = css `
|
|
|
98
115
|
:where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] {
|
|
99
116
|
display: none;
|
|
100
117
|
}
|
|
118
|
+
/* A record's details before <uvalib-metadata> upgrades (issue #34): the rows already laid
|
|
119
|
+
out as it lays them out (label beside value from 36rem of its own width, stacked below;
|
|
120
|
+
8px above and below each row, a 1px rule between rows; lists without bullets, 4px apart),
|
|
121
|
+
so the page does not move when it upgrades. Rows the attributes add (creator, rights,
|
|
122
|
+
citation) are not in the page's <dl> and cannot be held. */
|
|
123
|
+
uvalib-metadata:not(:defined) {
|
|
124
|
+
container-type: inline-size;
|
|
125
|
+
font-size: 1rem;
|
|
126
|
+
}
|
|
127
|
+
uvalib-metadata:not(:defined) > dl {
|
|
128
|
+
display: grid;
|
|
129
|
+
grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr);
|
|
130
|
+
column-gap: 1.5rem;
|
|
131
|
+
margin: 0;
|
|
132
|
+
}
|
|
133
|
+
uvalib-metadata:not(:defined) > dl > dt {
|
|
134
|
+
grid-column: 1;
|
|
135
|
+
margin: 0;
|
|
136
|
+
padding-block: 0.5rem;
|
|
137
|
+
font-weight: 700;
|
|
138
|
+
}
|
|
139
|
+
uvalib-metadata:not(:defined) > dl > dd {
|
|
140
|
+
grid-column: 2;
|
|
141
|
+
margin: 0;
|
|
142
|
+
padding-block: 0.5rem;
|
|
143
|
+
}
|
|
144
|
+
uvalib-metadata:not(:defined) > dl > dt:not(:first-child),
|
|
145
|
+
uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {
|
|
146
|
+
border-block-start: 1px solid transparent;
|
|
147
|
+
}
|
|
148
|
+
uvalib-metadata:not(:defined) > dl > dd > :is(ul, ol) {
|
|
149
|
+
margin: 0;
|
|
150
|
+
padding: 0;
|
|
151
|
+
list-style: none;
|
|
152
|
+
}
|
|
153
|
+
uvalib-metadata:not(:defined) > dl > dd li + li {
|
|
154
|
+
margin-block-start: 0.25rem;
|
|
155
|
+
}
|
|
156
|
+
@container (width < 36rem) {
|
|
157
|
+
uvalib-metadata:not(:defined) > dl {
|
|
158
|
+
grid-template-columns: minmax(0, 1fr);
|
|
159
|
+
}
|
|
160
|
+
uvalib-metadata:not(:defined) > dl > :is(dt, dd) {
|
|
161
|
+
grid-column: 1;
|
|
162
|
+
}
|
|
163
|
+
uvalib-metadata:not(:defined) > dl > dt {
|
|
164
|
+
padding-block-end: 0;
|
|
165
|
+
}
|
|
166
|
+
uvalib-metadata:not(:defined) > dl > dd {
|
|
167
|
+
padding-block-start: 0;
|
|
168
|
+
}
|
|
169
|
+
uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {
|
|
170
|
+
border-block-start: 0;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
${metadataLimits}
|
|
101
174
|
/* Tabs stay readable before the script runs: a block, one panel, and a gap the
|
|
102
175
|
size of the tab row (44px) plus its 1rem margin, so the first panel does not
|
|
103
176
|
jump when the element upgrades. Later data-tab panels stay hidden. */
|
package/dist/styles/base.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/styles/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;
|
|
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,GAAG,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,wDAAwD,CACrI,CAAC;AACJ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CACd,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,qCAAqC,CAAC;AAEjE,0FAA0F;AAC1F,EAAE;AACF,wFAAwF;AACxF,8FAA8F;AAC9F,wFAAwF;AACxF,wFAAwF;AACxF,4CAA4C;AAC5C,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkJnB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+GjB,CAAC"}
|
package/dist-cdn/base.css
CHANGED
|
@@ -135,6 +135,109 @@
|
|
|
135
135
|
:where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] {
|
|
136
136
|
display: none;
|
|
137
137
|
}
|
|
138
|
+
/* A record's details before <uvalib-metadata> upgrades (issue #34): the rows already laid
|
|
139
|
+
out as it lays them out (label beside value from 36rem of its own width, stacked below;
|
|
140
|
+
8px above and below each row, a 1px rule between rows; lists without bullets, 4px apart),
|
|
141
|
+
so the page does not move when it upgrades. Rows the attributes add (creator, rights,
|
|
142
|
+
citation) are not in the page's <dl> and cannot be held. */
|
|
143
|
+
uvalib-metadata:not(:defined) {
|
|
144
|
+
container-type: inline-size;
|
|
145
|
+
font-size: 1rem;
|
|
146
|
+
}
|
|
147
|
+
uvalib-metadata:not(:defined) > dl {
|
|
148
|
+
display: grid;
|
|
149
|
+
grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr);
|
|
150
|
+
column-gap: 1.5rem;
|
|
151
|
+
margin: 0;
|
|
152
|
+
}
|
|
153
|
+
uvalib-metadata:not(:defined) > dl > dt {
|
|
154
|
+
grid-column: 1;
|
|
155
|
+
margin: 0;
|
|
156
|
+
padding-block: 0.5rem;
|
|
157
|
+
font-weight: 700;
|
|
158
|
+
}
|
|
159
|
+
uvalib-metadata:not(:defined) > dl > dd {
|
|
160
|
+
grid-column: 2;
|
|
161
|
+
margin: 0;
|
|
162
|
+
padding-block: 0.5rem;
|
|
163
|
+
}
|
|
164
|
+
uvalib-metadata:not(:defined) > dl > dt:not(:first-child),
|
|
165
|
+
uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {
|
|
166
|
+
border-block-start: 1px solid transparent;
|
|
167
|
+
}
|
|
168
|
+
uvalib-metadata:not(:defined) > dl > dd > :is(ul, ol) {
|
|
169
|
+
margin: 0;
|
|
170
|
+
padding: 0;
|
|
171
|
+
list-style: none;
|
|
172
|
+
}
|
|
173
|
+
uvalib-metadata:not(:defined) > dl > dd li + li {
|
|
174
|
+
margin-block-start: 0.25rem;
|
|
175
|
+
}
|
|
176
|
+
@container (width < 36rem) {
|
|
177
|
+
uvalib-metadata:not(:defined) > dl {
|
|
178
|
+
grid-template-columns: minmax(0, 1fr);
|
|
179
|
+
}
|
|
180
|
+
uvalib-metadata:not(:defined) > dl > :is(dt, dd) {
|
|
181
|
+
grid-column: 1;
|
|
182
|
+
}
|
|
183
|
+
uvalib-metadata:not(:defined) > dl > dt {
|
|
184
|
+
padding-block-end: 0;
|
|
185
|
+
}
|
|
186
|
+
uvalib-metadata:not(:defined) > dl > dd {
|
|
187
|
+
padding-block-start: 0;
|
|
188
|
+
}
|
|
189
|
+
uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {
|
|
190
|
+
border-block-start: 0;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
uvalib-metadata[list-limit="1"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 2),
|
|
194
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="1"] > :is(ul, ol) > li:nth-child(n + 2) { display: none; }
|
|
195
|
+
uvalib-metadata[list-limit="1"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(2))::after,
|
|
196
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="1"] > :is(ul, ol):has(> li:nth-child(2))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
197
|
+
uvalib-metadata[list-limit="2"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 3),
|
|
198
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="2"] > :is(ul, ol) > li:nth-child(n + 3) { display: none; }
|
|
199
|
+
uvalib-metadata[list-limit="2"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(3))::after,
|
|
200
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="2"] > :is(ul, ol):has(> li:nth-child(3))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
201
|
+
uvalib-metadata[list-limit="3"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 4),
|
|
202
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="3"] > :is(ul, ol) > li:nth-child(n + 4) { display: none; }
|
|
203
|
+
uvalib-metadata[list-limit="3"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(4))::after,
|
|
204
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="3"] > :is(ul, ol):has(> li:nth-child(4))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
205
|
+
uvalib-metadata[list-limit="4"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 5),
|
|
206
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="4"] > :is(ul, ol) > li:nth-child(n + 5) { display: none; }
|
|
207
|
+
uvalib-metadata[list-limit="4"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(5))::after,
|
|
208
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="4"] > :is(ul, ol):has(> li:nth-child(5))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
209
|
+
uvalib-metadata[list-limit="5"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 6),
|
|
210
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="5"] > :is(ul, ol) > li:nth-child(n + 6) { display: none; }
|
|
211
|
+
uvalib-metadata[list-limit="5"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(6))::after,
|
|
212
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="5"] > :is(ul, ol):has(> li:nth-child(6))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
213
|
+
uvalib-metadata[list-limit="6"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 7),
|
|
214
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="6"] > :is(ul, ol) > li:nth-child(n + 7) { display: none; }
|
|
215
|
+
uvalib-metadata[list-limit="6"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(7))::after,
|
|
216
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="6"] > :is(ul, ol):has(> li:nth-child(7))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
217
|
+
uvalib-metadata[list-limit="7"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 8),
|
|
218
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="7"] > :is(ul, ol) > li:nth-child(n + 8) { display: none; }
|
|
219
|
+
uvalib-metadata[list-limit="7"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(8))::after,
|
|
220
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="7"] > :is(ul, ol):has(> li:nth-child(8))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
221
|
+
uvalib-metadata[list-limit="8"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 9),
|
|
222
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="8"] > :is(ul, ol) > li:nth-child(n + 9) { display: none; }
|
|
223
|
+
uvalib-metadata[list-limit="8"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(9))::after,
|
|
224
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="8"] > :is(ul, ol):has(> li:nth-child(9))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
225
|
+
uvalib-metadata[list-limit="9"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 10),
|
|
226
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="9"] > :is(ul, ol) > li:nth-child(n + 10) { display: none; }
|
|
227
|
+
uvalib-metadata[list-limit="9"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(10))::after,
|
|
228
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="9"] > :is(ul, ol):has(> li:nth-child(10))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
229
|
+
uvalib-metadata[list-limit="10"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 11),
|
|
230
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="10"] > :is(ul, ol) > li:nth-child(n + 11) { display: none; }
|
|
231
|
+
uvalib-metadata[list-limit="10"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(11))::after,
|
|
232
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="10"] > :is(ul, ol):has(> li:nth-child(11))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
233
|
+
uvalib-metadata[list-limit="11"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 12),
|
|
234
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="11"] > :is(ul, ol) > li:nth-child(n + 12) { display: none; }
|
|
235
|
+
uvalib-metadata[list-limit="11"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(12))::after,
|
|
236
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="11"] > :is(ul, ol):has(> li:nth-child(12))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
237
|
+
uvalib-metadata[list-limit="12"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]) > li:nth-child(n + 13),
|
|
238
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="12"] > :is(ul, ol) > li:nth-child(n + 13) { display: none; }
|
|
239
|
+
uvalib-metadata[list-limit="12"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit]):has(> li:nth-child(13))::after,
|
|
240
|
+
uvalib-metadata:not(:defined) > dl > dd[data-limit="12"] > :is(ul, ol):has(> li:nth-child(13))::after { content: ''; display: block; block-size: 2.25rem; }
|
|
138
241
|
/* Tabs stay readable before the script runs: a block, one panel, and a gap the
|
|
139
242
|
size of the tab row (44px) plus its 1rem margin, so the first panel does not
|
|
140
243
|
jump when the element upgrades. Later data-tab panels stay hidden. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { f as e } from "./UvalibElement-pGONDAwB.js";
|
|
1
|
+
import { f as e, p as t } from "./UvalibElement-pGONDAwB.js";
|
|
2
2
|
// src/styles/font-fallback.ts
|
|
3
|
-
var
|
|
3
|
+
var n = e`
|
|
4
4
|
@font-face {
|
|
5
5
|
font-family: 'UVA Franklin Fallback';
|
|
6
6
|
src: local('Arial'), local('ArialMT'), local('Liberation Sans'), local('LiberationSans');
|
|
@@ -45,7 +45,7 @@ var t = e`
|
|
|
45
45
|
descent-override: 26.4%;
|
|
46
46
|
line-gap-override: 0%;
|
|
47
47
|
}
|
|
48
|
-
`,
|
|
48
|
+
`, r = e`
|
|
49
49
|
:root {
|
|
50
50
|
--uva-brand-blue-lightest: #87B9D9;
|
|
51
51
|
--uva-brand-blue-lighter: #3395D4;
|
|
@@ -126,7 +126,10 @@ var t = e`
|
|
|
126
126
|
--uva-font-family: franklin-gothic-urw, "UVA Franklin Fallback", Arial, Helvetica, sans-serif;
|
|
127
127
|
--uva-font-size-base: 17px;
|
|
128
128
|
}
|
|
129
|
-
`,
|
|
129
|
+
`, i = Array.from({ length: 12 }, (e, t) => t + 1), a = t(i.map((e) => {
|
|
130
|
+
let t = [`uvalib-metadata[list-limit="${e}"]:not(:defined) > dl > dd:not([data-limit]) > :is(ul, ol):not([data-limit])`, `uvalib-metadata:not(:defined) > dl > dd[data-limit="${e}"] > :is(ul, ol)`];
|
|
131
|
+
return `${t.map((t) => `${t} > li:nth-child(n + ${e + 1})`).join(",\n")} { display: none; }\n${t.map((t) => `${t}:has(> li:nth-child(${e + 1}))::after`).join(",\n")} { content: ''; display: block; block-size: 2.25rem; }`;
|
|
132
|
+
}).join("\n")), o = "https://use.typekit.net/oym8nvz.css", s = e`
|
|
130
133
|
*,
|
|
131
134
|
*::before,
|
|
132
135
|
*::after {
|
|
@@ -217,6 +220,62 @@ var t = e`
|
|
|
217
220
|
:where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] {
|
|
218
221
|
display: none;
|
|
219
222
|
}
|
|
223
|
+
/* A record's details before <uvalib-metadata> upgrades (issue #34): the rows already laid
|
|
224
|
+
out as it lays them out (label beside value from 36rem of its own width, stacked below;
|
|
225
|
+
8px above and below each row, a 1px rule between rows; lists without bullets, 4px apart),
|
|
226
|
+
so the page does not move when it upgrades. Rows the attributes add (creator, rights,
|
|
227
|
+
citation) are not in the page's <dl> and cannot be held. */
|
|
228
|
+
uvalib-metadata:not(:defined) {
|
|
229
|
+
container-type: inline-size;
|
|
230
|
+
font-size: 1rem;
|
|
231
|
+
}
|
|
232
|
+
uvalib-metadata:not(:defined) > dl {
|
|
233
|
+
display: grid;
|
|
234
|
+
grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr);
|
|
235
|
+
column-gap: 1.5rem;
|
|
236
|
+
margin: 0;
|
|
237
|
+
}
|
|
238
|
+
uvalib-metadata:not(:defined) > dl > dt {
|
|
239
|
+
grid-column: 1;
|
|
240
|
+
margin: 0;
|
|
241
|
+
padding-block: 0.5rem;
|
|
242
|
+
font-weight: 700;
|
|
243
|
+
}
|
|
244
|
+
uvalib-metadata:not(:defined) > dl > dd {
|
|
245
|
+
grid-column: 2;
|
|
246
|
+
margin: 0;
|
|
247
|
+
padding-block: 0.5rem;
|
|
248
|
+
}
|
|
249
|
+
uvalib-metadata:not(:defined) > dl > dt:not(:first-child),
|
|
250
|
+
uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {
|
|
251
|
+
border-block-start: 1px solid transparent;
|
|
252
|
+
}
|
|
253
|
+
uvalib-metadata:not(:defined) > dl > dd > :is(ul, ol) {
|
|
254
|
+
margin: 0;
|
|
255
|
+
padding: 0;
|
|
256
|
+
list-style: none;
|
|
257
|
+
}
|
|
258
|
+
uvalib-metadata:not(:defined) > dl > dd li + li {
|
|
259
|
+
margin-block-start: 0.25rem;
|
|
260
|
+
}
|
|
261
|
+
@container (width < 36rem) {
|
|
262
|
+
uvalib-metadata:not(:defined) > dl {
|
|
263
|
+
grid-template-columns: minmax(0, 1fr);
|
|
264
|
+
}
|
|
265
|
+
uvalib-metadata:not(:defined) > dl > :is(dt, dd) {
|
|
266
|
+
grid-column: 1;
|
|
267
|
+
}
|
|
268
|
+
uvalib-metadata:not(:defined) > dl > dt {
|
|
269
|
+
padding-block-end: 0;
|
|
270
|
+
}
|
|
271
|
+
uvalib-metadata:not(:defined) > dl > dd {
|
|
272
|
+
padding-block-start: 0;
|
|
273
|
+
}
|
|
274
|
+
uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd {
|
|
275
|
+
border-block-start: 0;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
${a}
|
|
220
279
|
/* Tabs stay readable before the script runs: a block, one panel, and a gap the
|
|
221
280
|
size of the tab row (44px) plus its 1rem margin, so the first panel does not
|
|
222
281
|
jump when the element upgrades. Later data-tab panels stay hidden. */
|
|
@@ -328,6 +387,6 @@ var t = e`
|
|
|
328
387
|
}
|
|
329
388
|
}
|
|
330
389
|
`;
|
|
331
|
-
export {
|
|
390
|
+
export { n as i, s as n, r, o as t };
|
|
332
391
|
|
|
333
|
-
//# sourceMappingURL=base-
|
|
392
|
+
//# sourceMappingURL=base-DfLI8lpa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-DfLI8lpa.js","names":["unsafeCSS","i","r","fontFallback","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","// 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 ):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 /* 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 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 /* 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCflBC,IAAS,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCOnBC,IAAkB,MAAM,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAMJ,IAAI,CAAC,GAC5DK,IAAiBN,EACrBK,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkJnBL,EAAe"}
|
|
@@ -2463,6 +2463,46 @@
|
|
|
2463
2463
|
}
|
|
2464
2464
|
]
|
|
2465
2465
|
},
|
|
2466
|
+
{
|
|
2467
|
+
"kind": "javascript-module",
|
|
2468
|
+
"path": "src/components/link.ts",
|
|
2469
|
+
"declarations": [
|
|
2470
|
+
{
|
|
2471
|
+
"kind": "function",
|
|
2472
|
+
"name": "siteLink",
|
|
2473
|
+
"return": {
|
|
2474
|
+
"type": {
|
|
2475
|
+
"text": "string"
|
|
2476
|
+
}
|
|
2477
|
+
},
|
|
2478
|
+
"parameters": [
|
|
2479
|
+
{
|
|
2480
|
+
"name": "root",
|
|
2481
|
+
"type": {
|
|
2482
|
+
"text": "string"
|
|
2483
|
+
}
|
|
2484
|
+
},
|
|
2485
|
+
{
|
|
2486
|
+
"name": "path",
|
|
2487
|
+
"type": {
|
|
2488
|
+
"text": "string"
|
|
2489
|
+
}
|
|
2490
|
+
}
|
|
2491
|
+
],
|
|
2492
|
+
"description": "Join a site root and a path with exactly one \"/\"; paths with a URL scheme or starting with // pass through."
|
|
2493
|
+
}
|
|
2494
|
+
],
|
|
2495
|
+
"exports": [
|
|
2496
|
+
{
|
|
2497
|
+
"kind": "js",
|
|
2498
|
+
"name": "siteLink",
|
|
2499
|
+
"declaration": {
|
|
2500
|
+
"name": "siteLink",
|
|
2501
|
+
"module": "src/components/link.ts"
|
|
2502
|
+
}
|
|
2503
|
+
}
|
|
2504
|
+
]
|
|
2505
|
+
},
|
|
2466
2506
|
{
|
|
2467
2507
|
"kind": "javascript-module",
|
|
2468
2508
|
"path": "src/data/fetch-json.ts",
|
|
@@ -2688,46 +2728,6 @@
|
|
|
2688
2728
|
}
|
|
2689
2729
|
]
|
|
2690
2730
|
},
|
|
2691
|
-
{
|
|
2692
|
-
"kind": "javascript-module",
|
|
2693
|
-
"path": "src/components/link.ts",
|
|
2694
|
-
"declarations": [
|
|
2695
|
-
{
|
|
2696
|
-
"kind": "function",
|
|
2697
|
-
"name": "siteLink",
|
|
2698
|
-
"return": {
|
|
2699
|
-
"type": {
|
|
2700
|
-
"text": "string"
|
|
2701
|
-
}
|
|
2702
|
-
},
|
|
2703
|
-
"parameters": [
|
|
2704
|
-
{
|
|
2705
|
-
"name": "root",
|
|
2706
|
-
"type": {
|
|
2707
|
-
"text": "string"
|
|
2708
|
-
}
|
|
2709
|
-
},
|
|
2710
|
-
{
|
|
2711
|
-
"name": "path",
|
|
2712
|
-
"type": {
|
|
2713
|
-
"text": "string"
|
|
2714
|
-
}
|
|
2715
|
-
}
|
|
2716
|
-
],
|
|
2717
|
-
"description": "Join a site root and a path with exactly one \"/\"; paths with a URL scheme or starting with // pass through."
|
|
2718
|
-
}
|
|
2719
|
-
],
|
|
2720
|
-
"exports": [
|
|
2721
|
-
{
|
|
2722
|
-
"kind": "js",
|
|
2723
|
-
"name": "siteLink",
|
|
2724
|
-
"declaration": {
|
|
2725
|
-
"name": "siteLink",
|
|
2726
|
-
"module": "src/components/link.ts"
|
|
2727
|
-
}
|
|
2728
|
-
}
|
|
2729
|
-
]
|
|
2730
|
-
},
|
|
2731
2731
|
{
|
|
2732
2732
|
"kind": "javascript-module",
|
|
2733
2733
|
"path": "src/styles/accessible.ts",
|
|
@@ -2764,7 +2764,7 @@
|
|
|
2764
2764
|
{
|
|
2765
2765
|
"kind": "variable",
|
|
2766
2766
|
"name": "base",
|
|
2767
|
-
"default": "css` *, *::before, *::after { box-sizing: border-box; } html, body { font-family: var( --uva-font-family, franklin-gothic-urw, 'UVA Franklin Fallback', Arial, Helvetica, sans-serif ); } html { font-size: var(--uva-font-size-base, 17px); } body { margin: 0; line-height: 1.5; min-height: 100vh; color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b)); background-color: var(--uva-color-surface); } site-page:not(:defined) { display: flow-root; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } uvalib-breadcrumbs:not(:defined), uvalib-card:not(:defined), uvalib-card-grid:not(:defined), uvalib-pager:not(:defined), uvalib-contents:not(:defined), uvalib-metadata:not(:defined), uvalib-tag-list:not(:defined) { display: block; line-height: 1.5; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } /* A chip row: hidden, one 44px row tall (with the scrolling row's padding), the raw children kept on one line so they cannot make it taller. */ uvalib-chip-group:not(:defined) { display: block; min-height: 44px; max-width: 100%; overflow: hidden; white-space: nowrap; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } uvalib-chip-group[scroll]:not(:defined) { min-height: calc(44px + 0.75rem); } /* A description: one line of it (0.875rem at 1.5, 0.25rem below the row). */ uvalib-chip-group[description]:not(:defined) { padding-block-end: 1.5625rem; } /* Its text is drawn from attributes: hold one line until it upgrades. */ uvalib-results-count:not(:defined) { display: block; min-block-size: 1.5em; } uvalib-tag-list:not(:defined)[hidden], uvalib-results-count:not(:defined)[hidden] { display: none; } /* The pre-upgrade rules here set display, which beats the hidden attribute's (issue #7). More specific than each of them (two pseudo-classes or attributes), so it needs no importance flag. */ :where( site-page, uvalib-breadcrumbs, uvalib-card, uvalib-card-grid, uvalib-pager, uvalib-contents, uvalib-metadata, uvalib-chip-group, uvalib-tabs, uvalib-combobox, uvalib-image-regions, uvalib-map, uvalib-filter-drawer ):not(:defined)[hidden], :where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] { display: none; } /* Tabs stay readable before the script runs: a block, one panel, and a gap the size of the tab row (44px) plus its 1rem margin, so the first panel does not jump when the element upgrades. Later data-tab panels stay hidden. */ uvalib-tabs:not(:defined) { display: block; padding-block-start: calc(44px + 1rem); } uvalib-tabs:not(:defined) > [data-tab] ~ [data-tab] { display: none; } /* A combobox: its label (from the attribute) and one 44px field (plus a one-line description) held, so nothing moves when it upgrades. A fallback <input list> child works meanwhile; the other children (options, a datalist) stay out of sight. */ uvalib-combobox:not(:defined) { display: block; min-block-size: calc(1.5em + 0.25rem + 44px); line-height: 1.5; } uvalib-combobox[description]:not(:defined) { min-block-size: calc(3em + 0.5rem + 44px); } uvalib-combobox:not(:defined)::before { content: attr(label); display: block; margin-block-end: 0.25rem; font-weight: 600; } uvalib-combobox:not(:defined) > :not(input) { display: none; } uvalib-combobox:not(:defined) > input { display: block; box-sizing: border-box; inline-size: 100%; min-block-size: 44px; font: inherit; line-height: 1.2; } /* Image regions: the image at its own width and the list beside it (or under it), the layout the element keeps once it upgrades, so the image does not move. */ uvalib-image-regions:not(:defined) { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; } uvalib-image-regions:not(:defined) > :is(img, picture) { display: block; flex: 0 1 auto; min-width: 0; max-width: 100%; height: auto; } uvalib-image-regions:not(:defined) > :is(ol, ul) { flex: 1 1 14rem; min-width: 0; } /* A map: its key instructions (the same text it shows) and the map's height held above the child list, so the list does not move when the map is drawn over the page's Leaflet. Padding, not margin, so it cannot collapse with the list's own top margin. */ uvalib-map:not(:defined) { display: block; } uvalib-map:not(:defined)::before { content: 'Tab or arrow keys move between places; Enter opens one. With the map focused, arrow keys pan and + and − zoom.'; display: block; padding-block-end: calc(0.5rem + max(12rem, var(--uvalib-map-height, min(24rem, 75vw)))); font-size: 0.875rem; line-height: 1.5; color: var(--uva-color-text-muted, #4b5563); } /* A filter drawer on a phone (the default 48rem breakpoint): once it upgrades only its 44px \"Search and filters\" button shows, so hold that height and keep the form and filters out of sight meanwhile; nothing moves when it upgrades. A page with its own breakpoint adds the same two rules in a media query of that width (see the README). Low specificity, so the [hidden] rule above still wins. */ @media (max-width: 48rem) { :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) { display: block; min-block-size: 44px; } :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) > * { display: none; } } /* Printing a <site-page> (issue #20; its own styles leave out the chrome): a dark scheme prints light (the role tokens resolve to their light values), and the content's links are black and underlined, so they are told apart without colour. Content is <main> in light DOM and the unslotted children in shadow DOM. print-chrome keeps the page as it is shown, apart from the light scheme. */ @media print { :root[data-uva-color-scheme]:has(site-page) { color-scheme: light; --uva-color-scheme: light; } /* Light DOM's trail, here too, as the pre-upgrade rule above (unlayered) would win. */ site-page:not([print-chrome]) > [slot='breadcrumbs'] { display: none; } site-page:not([print-chrome]) > :not([slot], site-header, site-footer, .alerts-list) :any-link, site-page:not([print-chrome]) > :any-link:not([slot], .skip-link) { color: #000; text-decoration: underline; } } @keyframes uvalib-site-page-reveal { to { visibility: visible; } } `"
|
|
2767
|
+
"default": "css` *, *::before, *::after { box-sizing: border-box; } html, body { font-family: var( --uva-font-family, franklin-gothic-urw, 'UVA Franklin Fallback', Arial, Helvetica, sans-serif ); } html { font-size: var(--uva-font-size-base, 17px); } body { margin: 0; line-height: 1.5; min-height: 100vh; color: var(--uva-color-text, var(--uva-grey-darkest, #2b2b2b)); background-color: var(--uva-color-surface); } site-page:not(:defined) { display: flow-root; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } uvalib-breadcrumbs:not(:defined), uvalib-card:not(:defined), uvalib-card-grid:not(:defined), uvalib-pager:not(:defined), uvalib-contents:not(:defined), uvalib-metadata:not(:defined), uvalib-tag-list:not(:defined) { display: block; line-height: 1.5; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } /* A chip row: hidden, one 44px row tall (with the scrolling row's padding), the raw children kept on one line so they cannot make it taller. */ uvalib-chip-group:not(:defined) { display: block; min-height: 44px; max-width: 100%; overflow: hidden; white-space: nowrap; visibility: hidden; animation: uvalib-site-page-reveal 0s 2s forwards; } uvalib-chip-group[scroll]:not(:defined) { min-height: calc(44px + 0.75rem); } /* A description: one line of it (0.875rem at 1.5, 0.25rem below the row). */ uvalib-chip-group[description]:not(:defined) { padding-block-end: 1.5625rem; } /* Its text is drawn from attributes: hold one line until it upgrades. */ uvalib-results-count:not(:defined) { display: block; min-block-size: 1.5em; } uvalib-tag-list:not(:defined)[hidden], uvalib-results-count:not(:defined)[hidden] { display: none; } /* The pre-upgrade rules here set display, which beats the hidden attribute's (issue #7). More specific than each of them (two pseudo-classes or attributes), so it needs no importance flag. */ :where( site-page, uvalib-breadcrumbs, uvalib-card, uvalib-card-grid, uvalib-pager, uvalib-contents, uvalib-metadata, uvalib-chip-group, uvalib-tabs, uvalib-combobox, uvalib-image-regions, uvalib-map, uvalib-filter-drawer ):not(:defined)[hidden], :where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] { display: none; } /* A record's details before <uvalib-metadata> upgrades (issue #34): the rows already laid out as it lays them out (label beside value from 36rem of its own width, stacked below; 8px above and below each row, a 1px rule between rows; lists without bullets, 4px apart), so the page does not move when it upgrades. Rows the attributes add (creator, rights, citation) are not in the page's <dl> and cannot be held. */ uvalib-metadata:not(:defined) { container-type: inline-size; font-size: 1rem; } uvalib-metadata:not(:defined) > dl { display: grid; grid-template-columns: minmax(7rem, 12rem) minmax(0, 1fr); column-gap: 1.5rem; margin: 0; } uvalib-metadata:not(:defined) > dl > dt { grid-column: 1; margin: 0; padding-block: 0.5rem; font-weight: 700; } uvalib-metadata:not(:defined) > dl > dd { grid-column: 2; margin: 0; padding-block: 0.5rem; } uvalib-metadata:not(:defined) > dl > dt:not(:first-child), uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd { border-block-start: 1px solid transparent; } uvalib-metadata:not(:defined) > dl > dd > :is(ul, ol) { margin: 0; padding: 0; list-style: none; } uvalib-metadata:not(:defined) > dl > dd li + li { margin-block-start: 0.25rem; } @container (width < 36rem) { uvalib-metadata:not(:defined) > dl { grid-template-columns: minmax(0, 1fr); } uvalib-metadata:not(:defined) > dl > :is(dt, dd) { grid-column: 1; } uvalib-metadata:not(:defined) > dl > dt { padding-block-end: 0; } uvalib-metadata:not(:defined) > dl > dd { padding-block-start: 0; } uvalib-metadata:not(:defined) > dl > dt:not(:first-child) + dd { border-block-start: 0; } } ${metadataLimits} /* Tabs stay readable before the script runs: a block, one panel, and a gap the size of the tab row (44px) plus its 1rem margin, so the first panel does not jump when the element upgrades. Later data-tab panels stay hidden. */ uvalib-tabs:not(:defined) { display: block; padding-block-start: calc(44px + 1rem); } uvalib-tabs:not(:defined) > [data-tab] ~ [data-tab] { display: none; } /* A combobox: its label (from the attribute) and one 44px field (plus a one-line description) held, so nothing moves when it upgrades. A fallback <input list> child works meanwhile; the other children (options, a datalist) stay out of sight. */ uvalib-combobox:not(:defined) { display: block; min-block-size: calc(1.5em + 0.25rem + 44px); line-height: 1.5; } uvalib-combobox[description]:not(:defined) { min-block-size: calc(3em + 0.5rem + 44px); } uvalib-combobox:not(:defined)::before { content: attr(label); display: block; margin-block-end: 0.25rem; font-weight: 600; } uvalib-combobox:not(:defined) > :not(input) { display: none; } uvalib-combobox:not(:defined) > input { display: block; box-sizing: border-box; inline-size: 100%; min-block-size: 44px; font: inherit; line-height: 1.2; } /* Image regions: the image at its own width and the list beside it (or under it), the layout the element keeps once it upgrades, so the image does not move. */ uvalib-image-regions:not(:defined) { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; } uvalib-image-regions:not(:defined) > :is(img, picture) { display: block; flex: 0 1 auto; min-width: 0; max-width: 100%; height: auto; } uvalib-image-regions:not(:defined) > :is(ol, ul) { flex: 1 1 14rem; min-width: 0; } /* A map: its key instructions (the same text it shows) and the map's height held above the child list, so the list does not move when the map is drawn over the page's Leaflet. Padding, not margin, so it cannot collapse with the list's own top margin. */ uvalib-map:not(:defined) { display: block; } uvalib-map:not(:defined)::before { content: 'Tab or arrow keys move between places; Enter opens one. With the map focused, arrow keys pan and + and − zoom.'; display: block; padding-block-end: calc(0.5rem + max(12rem, var(--uvalib-map-height, min(24rem, 75vw)))); font-size: 0.875rem; line-height: 1.5; color: var(--uva-color-text-muted, #4b5563); } /* A filter drawer on a phone (the default 48rem breakpoint): once it upgrades only its 44px \"Search and filters\" button shows, so hold that height and keep the form and filters out of sight meanwhile; nothing moves when it upgrades. A page with its own breakpoint adds the same two rules in a media query of that width (see the README). Low specificity, so the [hidden] rule above still wins. */ @media (max-width: 48rem) { :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) { display: block; min-block-size: 44px; } :where(uvalib-filter-drawer:not([breakpoint])):not(:defined) > * { display: none; } } /* Printing a <site-page> (issue #20; its own styles leave out the chrome): a dark scheme prints light (the role tokens resolve to their light values), and the content's links are black and underlined, so they are told apart without colour. Content is <main> in light DOM and the unslotted children in shadow DOM. print-chrome keeps the page as it is shown, apart from the light scheme. */ @media print { :root[data-uva-color-scheme]:has(site-page) { color-scheme: light; --uva-color-scheme: light; } /* Light DOM's trail, here too, as the pre-upgrade rule above (unlayered) would win. */ site-page:not([print-chrome]) > [slot='breadcrumbs'] { display: none; } site-page:not([print-chrome]) > :not([slot], site-header, site-footer, .alerts-list) :any-link, site-page:not([print-chrome]) > :any-link:not([slot], .skip-link) { color: #000; text-decoration: underline; } } @keyframes uvalib-site-page-reveal { to { visibility: visible; } } `"
|
|
2768
2768
|
}
|
|
2769
2769
|
],
|
|
2770
2770
|
"exports": [
|
package/dist-cdn/manifest.json
CHANGED
package/dist-cdn/site-page.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e, f as t, i as n, l as r, m as i, n as a, o, r as s, t as c } from "./chunks/UvalibElement-pGONDAwB.js";
|
|
2
2
|
import { i as l } from "./chunks/site-main-nav-CAwKq_x5.js";
|
|
3
|
-
import { i as u, n as d, r as f, t as p } from "./chunks/base-
|
|
3
|
+
import { i as u, n as d, r as f, t as p } from "./chunks/base-DfLI8lpa.js";
|
|
4
4
|
import { t as m } from "./chunks/accessible-DJv7YOtS.js";
|
|
5
5
|
import { t as h } from "./chunks/site-header-CEmNtmk5.js";
|
|
6
6
|
import { a as g } from "./chunks/analytics-DTTihuBD.js";
|
package/dist-cdn/site-style.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, l as t, m as n, n as r, o as i, r as a, t as o } from "./chunks/UvalibElement-pGONDAwB.js";
|
|
2
|
-
import { i as s, n as c, r as l } from "./chunks/base-
|
|
2
|
+
import { i as s, n as c, r as l } from "./chunks/base-DfLI8lpa.js";
|
|
3
3
|
// src/components/site-style/SiteStyle.ts
|
|
4
4
|
var u = class extends o {
|
|
5
5
|
constructor(...e) {
|
|
@@ -42,7 +42,7 @@ Loading rules:
|
|
|
42
42
|
- Breadcrumbs: a `<uvalib-breadcrumbs slot="breadcrumbs">` (from `uvalib-breadcrumbs.js`) inside `<site-page>`, never a hand-built trail. Its children are `<a href>` links ending with the current page (`<span>Title</span>`, or `<a href aria-current="page">`); apps can set its `items` property (`[{ label, href? }]`) instead. `<site-page>` places it between the header and `<main>`, outside `<main>`. Outside `<site-page>` it goes first in the content, above the `<h1>`. To return to the search the visitor came from, give that crumb `data-return-from="<search path>"` (it links to the same-origin referrer when it is that path with a query), never an inline script. In a single-page app with history routing, listen for `uvalib-breadcrumbs-navigate` and call `preventDefault()` to route in place (hash links need nothing).
|
|
43
43
|
- Cards and paging: a collection or photo is a `<uvalib-card>` (`uvalib-card.js`), inside `<uvalib-card-grid>` (`uvalib-card-grid.js`) when there are several. `href` makes the heading the one link for the whole card: never wrap the card in an `<a>`, and do not put another link, button or other control inside a clickable card. The heading needs an accessible name, or the link is hidden. A card with no `href` may contain its own links, including an `actions` slot row (“Read the story”, “Photos (132)”). Do not put that row in a clickable card: the card link covers it, and the component warns. `media-shape="circle"` draws a person or avatar as a circle and keeps the image alt; the count badge still sits on it. An image needs a real alt, or `alt=""` when the heading already names it. Previous/next sections, numbered pages, or `mode="load-more"` (a Load more button and “Showing N of M”, or “Showing N” with no `total`; with an unknown total add `has-more` and remove it, or set `hasMore = false`, after the last page) are one `<uvalib-pager>` (`uvalib-pager.js`); a second pager on the same page needs its own `label`. Load more fires `load-more` (`detail: { page }`, the next page). Call `loaded(firstNew)`, or set `for` to the list id and call `loaded()`, so focus moves to the new item. `<uvalib-tabs>` (`uvalib-tabs.js`) is a tab set: each child with `data-tab` is a panel, or pair `<button slot="tab">` with panels. Arrow keys move, Home and End jump, and `activation="manual"` waits for Enter or Space. `url-param` (or `url-param="hash"`) makes the selected tab linkable and Back restores it. In a single-page app, listen for `uvalib-card-navigate` and `uvalib-pager-navigate` and call `preventDefault()` to route in place.
|
|
44
44
|
- Sub-navigation and tables of contents: a `<uvalib-contents>` (from `uvalib-contents.js`) holding one `<ol>`/`<ul>` of `<li><a href>` entries, nested lists for sub-entries (plain text in an `<li>` for a group label), never a hand-built `<nav>` list or `<details>` for it. It is the `<nav>` landmark (named and headed by `label`, default "Contents"; set `heading-level` to fit the outline) and marks the current page (`aria-current="page"`) and in-page section (`"location"`, from the hash) itself: do not add `aria-current` by hand unless the route is not the URL, and then prefer `current="<url>"`. It collapses into a disclosure button at 64rem and below (`collapse-below`), closed until opened. In a sidebar add `sticky`. For a long document's table of contents without a build-time list, `headings-from="#article"` (with `levels="2-3"`, `min`) builds it from the headings and adds ids; a build-time list (children) is better where possible, since it works without JavaScript. Apps can set `items` (`[{ label, href?, children? }]`); with history routing, cancel `uvalib-contents-navigate` to route in place.
|
|
45
|
-
- Record details: a `<uvalib-metadata>` (from `uvalib-metadata.js`) around a plain `<dl>` (`<dt>` label, `<dd>` values; lists such as subjects as a `<ul>` in the `<dd>`). Downloads are `<a href download data-size="184 KB">EPUB</a>`. For credit and rights use its attributes, not your own rows: `creator`, `organization`, `rights` (a rightsstatements.org or Creative Commons URL; it shows the short name), `rights-info` (`https://www.library.virginia.edu/policies/use-of-materials`) and `citation` or `citation-title` (the Special Collections citation "<title>, Albert and Shirley Small Special Collections Library, University of Virginia"), which adds a Copy citation button. A long list (30 participants) gets `list-limit="8"` (or `data-limit` on its `<dd>`), not your own Show more script. Do not add icons from rightsstatements.org or creativecommons.org.
|
|
45
|
+
- Record details: a `<uvalib-metadata>` (from `uvalib-metadata.js`) around a plain `<dl>` (`<dt>` label, `<dd>` values; lists such as subjects as a `<ul>` in the `<dd>`). Downloads are `<a href download data-size="184 KB">EPUB</a>`. For credit and rights use its attributes, not your own rows: `creator`, `organization`, `rights` (a rightsstatements.org or Creative Commons URL; it shows the short name), `rights-info` (`https://www.library.virginia.edu/policies/use-of-materials`) and `citation` or `citation-title` (the Special Collections citation "<title>, Albert and Shirley Small Special Collections Library, University of Virginia"), which adds a Copy citation button. A long list (30 participants) gets `list-limit="8"` (or `data-limit` on its `<dd>`), not your own Show more script. Do not add icons from rightsstatements.org or creativecommons.org. With `base.css` linked the page does not move when it upgrades, including `list-limit` (or `data-limit`) from 1 to 12; for a larger limit add the page rule from the README ("No jump on upgrade").
|
|
46
46
|
- Long pages (minutes, finding aids, transcriptions, long result lists): a `<uvalib-back-to-top>` (from `uvalib-back-to-top.js`) last in the content inside `<site-page>`, never a hand-built button and scroll script. It stays hidden (`visibility: hidden`, not a tab stop) until the top 400px (`offset`) scroll away, then floats in the bottom corner; activating it scrolls to the top (smooth unless reduced motion) and moves focus to the page's `<h1>` (or `target`, a selector), adding `tabindex="-1"`. The element keeps 4.75rem of space at the end and the button rests there at the bottom, so it never covers the last lines or the footer: do not add your own padding for it. `label` changes its text. `<site-page>` has no attribute for it. It reports `click` to analytics itself.
|
|
47
47
|
- Content for a band above the footer: put an element with `slot="pre-footer"` inside `<site-page>`.
|
|
48
48
|
- `no-footer` on `<site-page>` hides the footer (and any pre-footer band). Use it only for tool or app-like pages, such as a full-screen editor, where the site footer does not belong; normal content pages keep the footer.
|
package/package.json
CHANGED
|
@@ -42,7 +42,7 @@ Loading rules:
|
|
|
42
42
|
- Breadcrumbs: a `<uvalib-breadcrumbs slot="breadcrumbs">` (from `uvalib-breadcrumbs.js`) inside `<site-page>`, never a hand-built trail. Its children are `<a href>` links ending with the current page (`<span>Title</span>`, or `<a href aria-current="page">`); apps can set its `items` property (`[{ label, href? }]`) instead. `<site-page>` places it between the header and `<main>`, outside `<main>`. Outside `<site-page>` it goes first in the content, above the `<h1>`. To return to the search the visitor came from, give that crumb `data-return-from="<search path>"` (it links to the same-origin referrer when it is that path with a query), never an inline script. In a single-page app with history routing, listen for `uvalib-breadcrumbs-navigate` and call `preventDefault()` to route in place (hash links need nothing).
|
|
43
43
|
- Cards and paging: a collection or photo is a `<uvalib-card>` (`uvalib-card.js`), inside `<uvalib-card-grid>` (`uvalib-card-grid.js`) when there are several. `href` makes the heading the one link for the whole card: never wrap the card in an `<a>`, and do not put another link, button or other control inside a clickable card. The heading needs an accessible name, or the link is hidden. A card with no `href` may contain its own links, including an `actions` slot row (“Read the story”, “Photos (132)”). Do not put that row in a clickable card: the card link covers it, and the component warns. `media-shape="circle"` draws a person or avatar as a circle and keeps the image alt; the count badge still sits on it. An image needs a real alt, or `alt=""` when the heading already names it. Previous/next sections, numbered pages, or `mode="load-more"` (a Load more button and “Showing N of M”, or “Showing N” with no `total`; with an unknown total add `has-more` and remove it, or set `hasMore = false`, after the last page) are one `<uvalib-pager>` (`uvalib-pager.js`); a second pager on the same page needs its own `label`. Load more fires `load-more` (`detail: { page }`, the next page). Call `loaded(firstNew)`, or set `for` to the list id and call `loaded()`, so focus moves to the new item. `<uvalib-tabs>` (`uvalib-tabs.js`) is a tab set: each child with `data-tab` is a panel, or pair `<button slot="tab">` with panels. Arrow keys move, Home and End jump, and `activation="manual"` waits for Enter or Space. `url-param` (or `url-param="hash"`) makes the selected tab linkable and Back restores it. In a single-page app, listen for `uvalib-card-navigate` and `uvalib-pager-navigate` and call `preventDefault()` to route in place.
|
|
44
44
|
- Sub-navigation and tables of contents: a `<uvalib-contents>` (from `uvalib-contents.js`) holding one `<ol>`/`<ul>` of `<li><a href>` entries, nested lists for sub-entries (plain text in an `<li>` for a group label), never a hand-built `<nav>` list or `<details>` for it. It is the `<nav>` landmark (named and headed by `label`, default "Contents"; set `heading-level` to fit the outline) and marks the current page (`aria-current="page"`) and in-page section (`"location"`, from the hash) itself: do not add `aria-current` by hand unless the route is not the URL, and then prefer `current="<url>"`. It collapses into a disclosure button at 64rem and below (`collapse-below`), closed until opened. In a sidebar add `sticky`. For a long document's table of contents without a build-time list, `headings-from="#article"` (with `levels="2-3"`, `min`) builds it from the headings and adds ids; a build-time list (children) is better where possible, since it works without JavaScript. Apps can set `items` (`[{ label, href?, children? }]`); with history routing, cancel `uvalib-contents-navigate` to route in place.
|
|
45
|
-
- Record details: a `<uvalib-metadata>` (from `uvalib-metadata.js`) around a plain `<dl>` (`<dt>` label, `<dd>` values; lists such as subjects as a `<ul>` in the `<dd>`). Downloads are `<a href download data-size="184 KB">EPUB</a>`. For credit and rights use its attributes, not your own rows: `creator`, `organization`, `rights` (a rightsstatements.org or Creative Commons URL; it shows the short name), `rights-info` (`https://www.library.virginia.edu/policies/use-of-materials`) and `citation` or `citation-title` (the Special Collections citation "<title>, Albert and Shirley Small Special Collections Library, University of Virginia"), which adds a Copy citation button. A long list (30 participants) gets `list-limit="8"` (or `data-limit` on its `<dd>`), not your own Show more script. Do not add icons from rightsstatements.org or creativecommons.org.
|
|
45
|
+
- Record details: a `<uvalib-metadata>` (from `uvalib-metadata.js`) around a plain `<dl>` (`<dt>` label, `<dd>` values; lists such as subjects as a `<ul>` in the `<dd>`). Downloads are `<a href download data-size="184 KB">EPUB</a>`. For credit and rights use its attributes, not your own rows: `creator`, `organization`, `rights` (a rightsstatements.org or Creative Commons URL; it shows the short name), `rights-info` (`https://www.library.virginia.edu/policies/use-of-materials`) and `citation` or `citation-title` (the Special Collections citation "<title>, Albert and Shirley Small Special Collections Library, University of Virginia"), which adds a Copy citation button. A long list (30 participants) gets `list-limit="8"` (or `data-limit` on its `<dd>`), not your own Show more script. Do not add icons from rightsstatements.org or creativecommons.org. With `base.css` linked the page does not move when it upgrades, including `list-limit` (or `data-limit`) from 1 to 12; for a larger limit add the page rule from the README ("No jump on upgrade").
|
|
46
46
|
- Long pages (minutes, finding aids, transcriptions, long result lists): a `<uvalib-back-to-top>` (from `uvalib-back-to-top.js`) last in the content inside `<site-page>`, never a hand-built button and scroll script. It stays hidden (`visibility: hidden`, not a tab stop) until the top 400px (`offset`) scroll away, then floats in the bottom corner; activating it scrolls to the top (smooth unless reduced motion) and moves focus to the page's `<h1>` (or `target`, a selector), adding `tabindex="-1"`. The element keeps 4.75rem of space at the end and the button rests there at the bottom, so it never covers the last lines or the footer: do not add your own padding for it. `label` changes its text. `<site-page>` has no attribute for it. It reports `click` to analytics itself.
|
|
47
47
|
- Content for a band above the footer: put an element with `slot="pre-footer"` inside `<site-page>`.
|
|
48
48
|
- `no-footer` on `<site-page>` hides the footer (and any pre-footer band). Use it only for tool or app-like pages, such as a full-screen editor, where the site footer does not belong; normal content pages keep the footer.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-CIX_-Rmo.js","names":["i","fontFallback","tokens","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","// 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 } from 'lit';\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 ):not(:defined)[hidden],\n :where(uvalib-combobox, uvalib-image-regions):not(:defined) > [hidden] {\n display: none;\n }\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 /* 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 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 /* 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,IAAaC,IAAe,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCflBC,IAAS,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GCDZC,IAAc,uCASdC,IAAO,CAAG"}
|