@guildofgleks/ui 21.6.0 → 21.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guildofgleks/ui",
3
- "version": "21.6.0",
3
+ "version": "21.7.0",
4
4
  "engines": {
5
5
  "node": ">=20.19.0"
6
6
  },
package/styles/button.css CHANGED
@@ -19,43 +19,31 @@
19
19
  /* Scopes the spinner rendered inside a loading button to the variant's spinner colour. */
20
20
  --gog-spinner-color: var(
21
21
  --gog-button-spinner-color,
22
- var(
23
- --gog-btn-spinner-color,
24
- var(--gog-button-variant-spinner-color, var(--gog-button-primary-spinner-color))
25
- )
22
+ var(--gog-button-variant-spinner-color, var(--gog-button-primary-spinner-color))
26
23
  );
27
24
 
28
25
  gap: var(--gog-button-gap);
29
26
  border: var(--gog-button-border-width) var(--gog-button-border-style)
30
- var(
31
- --gog-button-border,
32
- var(--gog-btn-border, var(--gog-button-variant-border, var(--gog-button-primary-border)))
33
- );
27
+ var(--gog-button-border, var(--gog-button-variant-border, var(--gog-button-primary-border)));
34
28
  border-radius: var(--gog-button-radius);
35
- padding: var(
36
- --gog-button-padding,
37
- var(--gog-btn-padding, var(--gog-button-size-padding, var(--gog-button-md-padding)))
38
- );
29
+ padding: var(--gog-button-padding, var(--gog-button-size-padding, var(--gog-button-md-padding)));
39
30
  font-family: var(--gog-button-font-family);
40
31
  font-weight: var(--gog-button-font-weight);
41
32
  font-size: var(
42
33
  --gog-button-font-size,
43
- var(--gog-btn-font-size, var(--gog-button-size-font-size, var(--gog-button-md-font-size)))
34
+ var(--gog-button-size-font-size, var(--gog-button-md-font-size))
44
35
  );
45
36
  letter-spacing: var(--gog-button-letter-spacing);
46
37
  text-transform: var(--gog-button-text-transform);
47
38
  line-height: var(--gog-button-line-height);
48
39
  background-color: var(
49
40
  --gog-button-bg,
50
- var(--gog-btn-bg, var(--gog-button-variant-bg, var(--gog-button-primary-bg)))
51
- );
52
- color: var(
53
- --gog-button-color,
54
- var(--gog-btn-color, var(--gog-button-variant-color, var(--gog-button-primary-color)))
41
+ var(--gog-button-variant-bg, var(--gog-button-primary-bg))
55
42
  );
43
+ color: var(--gog-button-color, var(--gog-button-variant-color, var(--gog-button-primary-color)));
56
44
  box-shadow: var(
57
45
  --gog-button-shadow,
58
- var(--gog-btn-shadow, var(--gog-button-variant-shadow, var(--gog-button-primary-shadow)))
46
+ var(--gog-button-variant-shadow, var(--gog-button-primary-shadow))
59
47
  );
60
48
  cursor: pointer;
61
49
  /* An `<a>` carries the UA underline; a `<button>` never did, which is why the component never
@@ -88,10 +76,7 @@
88
76
  outline: var(--gog-button-focus-ring-width) solid
89
77
  var(
90
78
  --gog-button-hover-bg,
91
- var(
92
- --gog-btn-hover-bg,
93
- var(--gog-button-variant-hover-bg, var(--gog-button-primary-hover-bg))
94
- )
79
+ var(--gog-button-variant-hover-bg, var(--gog-button-primary-hover-bg))
95
80
  );
96
81
  outline-offset: var(--gog-button-focus-ring-offset);
97
82
  }
@@ -99,21 +84,15 @@
99
84
  .gog-btn:hover:not(:disabled) {
100
85
  background-color: var(
101
86
  --gog-button-hover-bg,
102
- var(--gog-btn-hover-bg, var(--gog-button-variant-hover-bg, var(--gog-button-primary-hover-bg)))
87
+ var(--gog-button-variant-hover-bg, var(--gog-button-primary-hover-bg))
103
88
  );
104
89
  color: var(
105
90
  --gog-button-hover-color,
106
- var(
107
- --gog-btn-hover-color,
108
- var(--gog-button-variant-hover-color, var(--gog-button-primary-hover-color))
109
- )
91
+ var(--gog-button-variant-hover-color, var(--gog-button-primary-hover-color))
110
92
  );
111
93
  box-shadow: var(
112
94
  --gog-button-hover-shadow,
113
- var(
114
- --gog-btn-hover-shadow,
115
- var(--gog-button-variant-hover-shadow, var(--gog-button-primary-hover-shadow))
116
- )
95
+ var(--gog-button-variant-hover-shadow, var(--gog-button-primary-hover-shadow))
117
96
  );
118
97
  }
119
98
 
package/styles/index.css CHANGED
@@ -19,3 +19,8 @@
19
19
  @import './button.css';
20
20
  /* Same reason: `gogMenuItem` marks a consumer's own <button>. */
21
21
  @import './menu.css';
22
+ /* Same reason again: `gogCardHeader`, `gogCardMedia`, `gogCardFooter`, `gogCardLink`,
23
+ `gogPanelHeader` and `gogPanelFooter` all mark a consumer's own element. */
24
+ @import './surfaces.css';
25
+ /* Same reason once more: `gogRipple` paints into a consumer's own element. */
26
+ @import './ripple.css';
@@ -0,0 +1,82 @@
1
+ /*
2
+ * `bevel` — the high-chrome early-web look: grey panels, raised buttons, navy accent, square
3
+ * corners. The other half of `docs/themes.md`'s Retro family, and the one that dates itself by
4
+ * *shape* rather than by palette.
5
+ *
6
+ * Import it after `index.css`, then put the attribute on the root — or on any subtree:
7
+ *
8
+ * @import '@guildofgleks/ui/styles/index.css';
9
+ * @import '@guildofgleks/ui/styles/presets/bevel.css';
10
+ *
11
+ * <html data-theme="bevel">
12
+ *
13
+ * Palette plus the character layer, no per-component overrides and no font download — the face
14
+ * this look wants (Tahoma, Verdana, MS Sans Serif) is a system face on the platforms that have
15
+ * it and degrades to the platform sans elsewhere, which is exactly what it did at the time.
16
+ *
17
+ * **`--gog-border-style: outset` is what makes this theme.** Every raised surface in the library
18
+ * reads that token, so one declaration puts a bevel on buttons, panels and chips at once — the
19
+ * reason the character layer carries a border *style* and not just a width. `inset` on form
20
+ * fields is its counterpart: a sunken well is how a text input was drawn before a 1px outline
21
+ * was enough to say "type here".
22
+ */
23
+
24
+ :root[data-theme='bevel'],
25
+ [data-theme='bevel'] {
26
+ color-scheme: light;
27
+
28
+ /* Palette — the default desktop grey, and the navy that every link and title bar used */
29
+ --gog-background-color: #c0c0c0;
30
+ --gog-surface-color: #d8d8d8;
31
+ --gog-hover-color: #cacaca;
32
+ --gog-border-color: #808080;
33
+ --gog-text-color: #0a0a0a;
34
+ --gog-accent-text-color: #ffffff;
35
+ --gog-muted-text-color: #3d3d3d;
36
+ --gog-primary-color: #0a0a0a;
37
+ --gog-accent-color: #000080;
38
+ --gog-accent-bright: #1a1aa8;
39
+ --gog-accent-dim: #000080;
40
+ --gog-accent-pale: #b8b8cc;
41
+ --gog-secondary-color: #4a4a5a;
42
+ --gog-success-color: #006400;
43
+ --gog-danger-color: #8b0000;
44
+ --gog-warning-color: #7a5c00;
45
+ --gog-info-color: #005a6e;
46
+
47
+ /* No blur. A drop shadow of this era was a solid black offset rectangle, if it existed. */
48
+ --gog-panel-shadow: 2px 2px 0 rgba(0, 0, 0, 0.35);
49
+ --gog-spinner-overlay-bg: rgba(192, 192, 192, 0.85);
50
+
51
+ /* Character layer — square, bevelled, compact, and shouting in caps the way a title bar did */
52
+ --gog-font-heading: Tahoma, Verdana, 'MS Sans Serif', Geneva, sans-serif;
53
+ --gog-font-body: Tahoma, Verdana, 'MS Sans Serif', Geneva, sans-serif;
54
+ --gog-radius: 0;
55
+ --gog-density: 0.9;
56
+ --gog-border-width: 2px;
57
+ --gog-border-style: outset;
58
+ --gog-panel-border-width: 2px;
59
+ --gog-panel-border-style: outset;
60
+ --gog-control-border-width: 2px;
61
+ --gog-control-border-style: inset;
62
+
63
+ /* The one per-component override in this file, and the reason it is needed: a button is a
64
+ "control" like a text field is, so it inherits `--gog-control-border-style` — which here has
65
+ to be `inset`, because a sunken well is how a text input was drawn. But a button of this era
66
+ is the opposite shape: raised, and it *pressed in* when you clicked it. The character layer
67
+ has one control tier and this theme needs two halves of it to disagree, so the button says
68
+ so itself. Everything else raised (panels, cards, chips, tags) gets `outset` from the tiers
69
+ above with nothing named. */
70
+ --gog-button-border-width: 2px;
71
+ --gog-button-border-style: outset;
72
+ /* `outset` draws its highlight and shade *from the border colour*, so a transparent border —
73
+ which is the library's default for a filled button, and correct everywhere else — renders a
74
+ bevel that is not there. Naming a colour is what makes the style visible at all. */
75
+ --gog-button-primary-border: #8a8ab0;
76
+
77
+ --gog-text-transform: none;
78
+ --gog-letter-spacing: normal;
79
+ --gog-duration-fast: 0s;
80
+ --gog-duration-base: 0s;
81
+ --gog-duration-slow: 0s;
82
+ }
@@ -0,0 +1,66 @@
1
+ /*
2
+ * `ledger` — the square-cornered, hard-shadowed, system-font look. Beige and grey, thin
3
+ * borders, no motion to speak of: the administrative-software identity, from before rounded
4
+ * corners and soft blur shadows were the default assumption. This is `docs/themes.md`'s
5
+ * "Classic" catalogue *family* — the preset itself needed its own name, since `ui-showcase`
6
+ * already uses "Classic" as the display label for `data-theme="light"`
7
+ * (`projects/ui-showcase/src/app/showcase-themes.ts`).
8
+ *
9
+ * Import it after `index.css`, then put the attribute on the root — or on any subtree:
10
+ *
11
+ * @import '@guildofgleks/ui/styles/index.css';
12
+ * @import '@guildofgleks/ui/styles/presets/ledger.css';
13
+ *
14
+ * <html data-theme="ledger">
15
+ *
16
+ * Palette plus the `docs/themes.md` iteration-1 character layer — no per-component overrides
17
+ * needed, which is exactly the point of that layer existing (see `slate.css` for the same
18
+ * argument, palette-only). Fonts are untouched on purpose: the library's own default is already
19
+ * a plain system-ui stack, which is the "system-font" look this preset asks for.
20
+ */
21
+
22
+ :root[data-theme='ledger'],
23
+ [data-theme='ledger'] {
24
+ color-scheme: light;
25
+
26
+ /* Palette — beige and grey, a muted navy accent */
27
+ --gog-background-color: #d8d3c7;
28
+ --gog-surface-color: #ffffff;
29
+ --gog-hover-color: #ccc6b8;
30
+ --gog-border-color: #a39d8f;
31
+ --gog-text-color: #262420;
32
+ --gog-accent-text-color: #ffffff;
33
+ --gog-muted-text-color: #4f4a3f;
34
+ --gog-primary-color: #262420;
35
+ --gog-accent-color: #35507a;
36
+ --gog-accent-bright: #4a6a9c;
37
+ --gog-accent-dim: #23374f;
38
+ --gog-accent-pale: #e4e8ee;
39
+ --gog-secondary-color: #6b6558;
40
+ --gog-success-color: #4a6b4a;
41
+ --gog-danger-color: #8b3a3a;
42
+ --gog-warning-color: #96702f;
43
+ --gog-info-color: #3d6b7a;
44
+
45
+ /* Hard-edged, not blurred — an offset with no blur radius reads as a printed drop shadow,
46
+ not a soft elevation cue. */
47
+ --gog-panel-shadow: 2px 2px 0 rgba(38, 36, 32, 0.25);
48
+ --gog-spinner-overlay-bg: rgba(216, 211, 199, 0.85);
49
+
50
+ /* Character layer — square corners, uniform 1px borders (down from the 2px form-field
51
+ default), sentence-case labels instead of shouty caps, and no motion: set all three
52
+ durations to 0s rather than lower each component's own transition individually, which is
53
+ the whole reason the character layer's foundation tokens exist. Components still honour
54
+ `prefers-reduced-motion` independently of this. */
55
+ --gog-radius: 0;
56
+ /* Tighter than the library's default, because the look this reproduces packed a screen:
57
+ administrative software was designed for people who read a whole table at once, not for
58
+ touch targets. One number, and every padding and gap in the library follows it. */
59
+ --gog-density: 0.9;
60
+ --gog-control-border-width: 1px;
61
+ --gog-text-transform: none;
62
+ --gog-letter-spacing: normal;
63
+ --gog-duration-fast: 0s;
64
+ --gog-duration-base: 0s;
65
+ --gog-duration-slow: 0s;
66
+ }
@@ -0,0 +1,111 @@
1
+ /*
2
+ * `material` — Material Design 3 baseline (light), as a @guildofgleks/ui theme.
3
+ *
4
+ * Import it after `index.css`, then put the attribute on the root — or on any subtree:
5
+ *
6
+ * @import '@guildofgleks/ui/styles/index.css';
7
+ * @import '@guildofgleks/ui/styles/presets/material.css';
8
+ *
9
+ * <html data-theme="material">
10
+ *
11
+ * Unlike `slate.css`/`one-dark.css`/`one-light.css`, this is not palette-only — see
12
+ * `primeng.css`'s header for why, and `docs/themes.md` iteration 3 for how this file was
13
+ * ported from `gleks-ui-lab`'s hand-authored `[data-theme='material']` block. M3's shape scale
14
+ * isn't uniform the way PrimeNG's is: buttons are pill-shaped, checkboxes are near-square and
15
+ * dialogs get a large radius, so `--gog-radius` sets the *base* (fields, checkboxes) and three
16
+ * components still opt into their own shape on top of it.
17
+ */
18
+
19
+ :root[data-theme='material'],
20
+ [data-theme='material'] {
21
+ color-scheme: light;
22
+
23
+ /* Palette */
24
+ --gog-background-color: #fef7ff;
25
+ --gog-surface-color: #f7f2fa;
26
+ --gog-hover-color: #ece6f0;
27
+ --gog-border-color: #cac4d0;
28
+ --gog-text-color: #1c1b1f;
29
+ --gog-accent-text-color: #ffffff;
30
+ --gog-muted-text-color: #49454f;
31
+ --gog-primary-color: #1c1b1f;
32
+ --gog-accent-color: #6750a4;
33
+ --gog-accent-bright: #7f67be;
34
+ --gog-accent-dim: #4f378b;
35
+ --gog-accent-pale: #eaddff;
36
+ --gog-secondary-color: #625b71;
37
+ --gog-success-color: #2e7d32;
38
+ --gog-danger-color: #b3261e;
39
+ --gog-warning-color: #f9a825;
40
+ --gog-info-color: #0288d1;
41
+ --gog-panel-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
42
+ --gog-spinner-overlay-bg: rgba(254, 247, 255, 0.75);
43
+
44
+ /* Fonts — Material is Roboto end to end, no heading/body split */
45
+ --gog-font-heading: Roboto, 'Segoe UI', Helvetica, Arial, sans-serif;
46
+ --gog-font-body: Roboto, 'Segoe UI', Helvetica, Arial, sans-serif;
47
+ --gog-font-mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
48
+
49
+ /* Character layer — small 4px base radius (fields, checkboxes), sentence-case labels
50
+ instead of shouty caps. As with `primeng.css`, this replaces ten hand-listed
51
+ letter-spacing/text-transform overrides with two foundation ones, and in doing so also
52
+ covers six components the original lab authoring had missed (button-toggle,
53
+ calendar-weekday, autocomplete-label, datepicker-label, slider-label, table-total) — see
54
+ `primeng.css`'s header for the full account, identical here. */
55
+ --gog-radius: 4px;
56
+ /* Roomier than the library's default: M3's whole posture is generous touch targets and
57
+ breathing room, and reproducing it without the spacing reproduces only its colours. */
58
+ --gog-density: 1.1;
59
+ --gog-control-border-width: 1px;
60
+ --gog-focus-ring-width: 2px;
61
+ --gog-focus-ring-offset: 2px;
62
+ --gog-text-transform: none;
63
+ --gog-letter-spacing: normal;
64
+
65
+ /* Button — pill-shaped, medium weight, body font (casing/tracking from the character layer) */
66
+ --gog-button-font-family: var(--gog-font-body);
67
+ --gog-button-font-weight: 500;
68
+ --gog-button-radius: 20px;
69
+
70
+ /* Field labels — on-surface-variant gray (casing/tracking from the character layer) */
71
+ --gog-input-label-color: var(--gog-muted-text-color);
72
+ --gog-input-label-font-family: var(--gog-font-body);
73
+ --gog-input-field-border: var(--gog-border-color);
74
+ --gog-select-label-color: var(--gog-muted-text-color);
75
+ --gog-select-label-font-family: var(--gog-font-body);
76
+ --gog-select-field-border: var(--gog-border-color);
77
+ --gog-multiselect-label-color: var(--gog-muted-text-color);
78
+ --gog-multiselect-label-font-family: var(--gog-font-body);
79
+ --gog-multiselect-field-border: var(--gog-border-color);
80
+ --gog-multiselect-checkbox-border: var(--gog-border-color);
81
+
82
+ /* Checkbox — small square radius, on-surface-variant border */
83
+ --gog-checkbox-radius: 2px;
84
+ --gog-checkbox-border-color: var(--gog-border-color);
85
+ --gog-checkbox-label-color: var(--gog-text-color);
86
+
87
+ /* Accordion — rounded panel, surface header (casing from the character layer) */
88
+ --gog-accordion-font-family: var(--gog-font-body);
89
+ --gog-accordion-header-bg: var(--gog-surface-color);
90
+ --gog-accordion-hover-bg: var(--gog-hover-color);
91
+ --gog-accordion-body-bg: var(--gog-surface-color);
92
+ --gog-accordion-border-color: var(--gog-border-color);
93
+ --gog-accordion-radius: 12px;
94
+ --gog-accordion-body-radius: 12px;
95
+
96
+ /* Table — neutral row hover (header casing from the character layer) */
97
+ --gog-table-header-font-family: var(--gog-font-body);
98
+ --gog-table-border-color: var(--gog-border-color);
99
+ --gog-table-hover-bg: var(--gog-hover-color);
100
+
101
+ /* Slider / spinner — neutral track instead of accent-tinted */
102
+ --gog-slider-track-bg: var(--gog-border-color);
103
+ --gog-slider-label-color: var(--gog-muted-text-color);
104
+ --gog-spinner-track-color: var(--gog-border-color);
105
+
106
+ /* Dialog (M3 "extra-large" shape) / toast (M3 snackbar shape) */
107
+ --gog-dialog-backdrop-bg: rgba(0, 0, 0, 0.32);
108
+ --gog-dialog-radius: 28px;
109
+ --gog-dialog-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
110
+ --gog-toast-radius: 4px;
111
+ }
@@ -8,16 +8,30 @@
8
8
  *
9
9
  * <html data-theme="one-dark">
10
10
  *
11
- * Like every preset here it declares palette tokens only see `slate.css` for why that is
12
- * enough to restyle the whole library. The syntax-highlighting hues map onto the library's
13
- * semantic roles: One Dark's blue is the accent, its green/red/yellow/cyan become
14
- * success/danger/warning/info.
11
+ * The syntax-highlighting hues map onto the library's semantic roles: One Dark's blue is the
12
+ * accent, its green/red/yellow/cyan become success/danger/warning/info.
13
+ *
14
+ * Palette plus the character layer. It was palette-only until 21.7.0, which made it a recoloured
15
+ * default wearing an editor's palette — and the editor this reproduces does not look like the
16
+ * library's default shape. Editor chrome is small-radius, thin-bordered, compact, and it never
17
+ * shouts in caps; four foundation tokens and a density say all of that, with no per-component
18
+ * override needed. See `docs/themes.md` iterations 1 and 6.
15
19
  */
16
20
 
17
21
  :root[data-theme='one-dark'],
18
22
  [data-theme='one-dark'] {
19
23
  color-scheme: dark;
20
24
 
25
+ /* Character layer — editor chrome. A 4px radius (panels, tabs and buttons in this family of
26
+ editors are barely rounded, not pill-shaped), 1px borders instead of the library's 2px form
27
+ default, sentence-case labels, and a compact density: an editor's UI exists to leave room
28
+ for the buffer. */
29
+ --gog-radius: 4px;
30
+ --gog-density: 0.9;
31
+ --gog-control-border-width: 1px;
32
+ --gog-text-transform: none;
33
+ --gog-letter-spacing: normal;
34
+
21
35
  /* Editor chrome */
22
36
  --gog-background-color: #282c34;
23
37
  --gog-surface-color: #21252b;
@@ -27,7 +41,10 @@
27
41
  /* Type */
28
42
  --gog-text-color: #abb2bf;
29
43
  --gog-accent-text-color: #282c34;
30
- --gog-muted-text-color: #5c6370;
44
+ /* Lightened from One Dark's own #5c6370 in 21.7.0. That is the editor's comment colour, and
45
+ it reads at 2.32:1 on this background — fine for code a reader skims, well under AA for UI
46
+ text a reader has to act on. Fidelity loses to legibility on this one token. */
47
+ --gog-muted-text-color: #9099a8;
31
48
 
32
49
  /* Brand — One Dark's blue */
33
50
  --gog-primary-color: #abb2bf;
@@ -10,13 +10,22 @@
10
10
  *
11
11
  * The light counterpart to `one-dark.css`, using the same hue roles: blue is the accent,
12
12
  * green/red/yellow/cyan become success/danger/warning/info. Pair the two behind a toggle and
13
- * `ThemeService.setTheme('one-dark' | 'one-light')` switches between them.
13
+ * `ThemeService.setTheme('one-dark' | 'one-light')` switches between them — including the
14
+ * character layer below, which is deliberately identical in the two: they are one editor UI in
15
+ * two palettes, so a toggle between them must change tone and nothing else.
14
16
  */
15
17
 
16
18
  :root[data-theme='one-light'],
17
19
  [data-theme='one-light'] {
18
20
  color-scheme: light;
19
21
 
22
+ /* Character layer — identical to `one-dark.css`'s, on purpose. See that file's comment. */
23
+ --gog-radius: 4px;
24
+ --gog-density: 0.9;
25
+ --gog-control-border-width: 1px;
26
+ --gog-text-transform: none;
27
+ --gog-letter-spacing: normal;
28
+
20
29
  /* Editor chrome */
21
30
  --gog-background-color: #fafafa;
22
31
  --gog-surface-color: #ffffff;
@@ -26,12 +35,16 @@
26
35
  /* Type */
27
36
  --gog-text-color: #383a42;
28
37
  --gog-accent-text-color: #ffffff;
29
- --gog-muted-text-color: #a0a1a7;
38
+ /* Darkened from One Light's own #a0a1a7 (2.47:1) for the same reason as one-dark's. */
39
+ --gog-muted-text-color: #6e6f77;
30
40
 
31
41
  /* Brand — One Light's blue */
32
42
  --gog-primary-color: #383a42;
33
- --gog-accent-color: #4078f2;
34
- --gog-accent-bright: #5b8dff;
43
+ /* Deepened from #4078f2 / #5b8dff in 21.7.0: white on the original was 4.05:1 at rest and
44
+ 3.13:1 on hover. As in `light`, the hover is now darker than the rest state rather than
45
+ lighter — a blue light enough to read as a highlight cannot carry white text. */
46
+ --gog-accent-color: #2f66db;
47
+ --gog-accent-bright: #2456c4;
35
48
  --gog-accent-dim: #2f5fd0;
36
49
  --gog-accent-pale: #dce7fd;
37
50
  --gog-secondary-color: #a626a4;
@@ -0,0 +1,63 @@
1
+ /*
2
+ * `parchment` — ink on laid paper. Warm neutrals, a serif body, square corners, an oxblood
3
+ * accent: `docs/themes.md`'s Historical family, the one the plan flagged as blocked on fonts.
4
+ *
5
+ * Import it after `index.css`, then put the attribute on the root — or on any subtree:
6
+ *
7
+ * @import '@guildofgleks/ui/styles/index.css';
8
+ * @import '@guildofgleks/ui/styles/presets/parchment.css';
9
+ *
10
+ * <html data-theme="parchment">
11
+ *
12
+ * **How the font blocker was resolved.** A period serif is most of what makes this read as
13
+ * historical, and a preset must never add a network request by being imported. So this file sets
14
+ * a *stack* of old-style serifs that ship with real operating systems — Iowan Old Style, Palatino,
15
+ * Book Antiqua, Georgia — and every one of them is a genuine old-style face with the right colour
16
+ * on the page. It looks deliberate on every platform, with no download.
17
+ *
18
+ * For the fuller period look, `presets/parchment.fonts.css` is an optional second import that
19
+ * pulls EB Garamond and points the same tokens at it. That file is the only one here that makes
20
+ * a request, and importing it is the consumer's decision, not this file's.
21
+ */
22
+
23
+ :root[data-theme='parchment'],
24
+ [data-theme='parchment'] {
25
+ color-scheme: light;
26
+
27
+ /* Palette — aged paper, iron-gall ink, an oxblood rubric */
28
+ --gog-background-color: #e8dfc8;
29
+ --gog-surface-color: #f5efe0;
30
+ --gog-hover-color: #ded3b8;
31
+ --gog-border-color: #b8a888;
32
+ --gog-text-color: #241d14;
33
+ --gog-accent-text-color: #f5efe0;
34
+ --gog-muted-text-color: #57493a;
35
+ --gog-primary-color: #241d14;
36
+ --gog-accent-color: #6b2f2f;
37
+ --gog-accent-bright: #8a4040;
38
+ --gog-accent-dim: #5a2626;
39
+ --gog-accent-pale: #e3d4c4;
40
+ --gog-secondary-color: #6b5b45;
41
+
42
+ /* Semantics — the colours a scribe actually had: verdigris, vermilion, orpiment, indigo */
43
+ --gog-success-color: #3f5f3f;
44
+ --gog-danger-color: #8b2f26;
45
+ --gog-warning-color: #8a6516;
46
+ --gog-info-color: #3a5570;
47
+
48
+ /* Paper does not float. A soft, close shadow reads as a sheet resting on the desk. */
49
+ --gog-panel-shadow: 0 1px 3px rgba(36, 29, 20, 0.22);
50
+ --gog-spinner-overlay-bg: rgba(232, 223, 200, 0.88);
51
+
52
+ /* Character layer — a book, not an application. Serif throughout, square corners, hairline
53
+ rules, and roomier than the house default: printed pages have margins, and cramping this
54
+ palette into a dense grid is what would make it read as a skin rather than a design. */
55
+ --gog-font-heading:
56
+ 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
57
+ --gog-font-body: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, serif;
58
+ --gog-radius: 0;
59
+ --gog-density: 1.1;
60
+ --gog-control-border-width: 1px;
61
+ --gog-text-transform: none;
62
+ --gog-letter-spacing: normal;
63
+ }
@@ -0,0 +1,29 @@
1
+ /*
2
+ * `parchment.fonts.css` — the optional webfont half of `presets/parchment.css`.
3
+ *
4
+ * **This file makes a network request. That is the whole reason it is a separate file.**
5
+ *
6
+ * A preset must be safe to import: `@import '…/presets/parchment.css'` never downloads
7
+ * anything, and the stack it sets is a real old-style serif on every platform. This file is for
8
+ * consumers who want the fuller period look and are willing to pay a font request for it:
9
+ *
10
+ * @import '@guildofgleks/ui/styles/index.css';
11
+ * @import '@guildofgleks/ui/styles/presets/parchment.css';
12
+ * @import '@guildofgleks/ui/styles/presets/parchment.fonts.css'; ← opt in
13
+ *
14
+ * Import it *after* the preset — it re-points the same two tokens, and later wins.
15
+ *
16
+ * If your app already self-hosts a font, or your CSP forbids Google Fonts, skip this file and
17
+ * point `--gog-font-heading`/`--gog-font-body` at your own family inside `[data-theme='parchment']`
18
+ * instead. Nothing else in the preset needs to change: the character layer does not care which
19
+ * serif it is.
20
+ */
21
+
22
+ @import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap');
23
+
24
+ :root[data-theme='parchment'],
25
+ [data-theme='parchment'] {
26
+ --gog-font-heading:
27
+ 'EB Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
28
+ --gog-font-body: 'EB Garamond', 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
29
+ }