@charmland/gem 0.1.1 → 0.2.1

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": "@charmland/gem",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Gem's Elm sources, default application, browser runtime, UI kit, stylesheet and fonts.",
5
5
  "keywords": ["gem", "elm", "documentation", "theme", "ui"],
6
6
  "homepage": "https://github.com/charmbracelet/gem/tree/main/packages/gem",
@@ -52,7 +52,6 @@
52
52
  "./source/ui/*": "./src/ui/*",
53
53
  "./source/styles/*": "./src/styles/*",
54
54
  "./source/elm.json": "./elm.json",
55
- "./fonts/*": "./assets/fonts/*",
56
55
  "./package.json": "./package.json"
57
56
  },
58
57
  "files": [
@@ -63,7 +62,6 @@
63
62
  "src/app",
64
63
  "src/ui",
65
64
  "src/styles",
66
- "assets/fonts",
67
65
  "elm.json",
68
66
  "LICENSE",
69
67
  "NOTICE"
@@ -77,7 +75,7 @@
77
75
  "prepack": "bun run build"
78
76
  },
79
77
  "dependencies": {
80
- "@charmland/gem-compiler": "0.1.1"
78
+ "@charmland/gem-compiler": "0.2.1"
81
79
  },
82
80
  "devDependencies": {
83
81
  "@types/node": "^26.6.5",
@@ -85,7 +85,6 @@ type Msg
85
85
  | TocToggled
86
86
  | AnchorsMeasured Measurements
87
87
  | SearchShortcut
88
- | ScrolledTo (Result Dom.Error ())
89
88
  | Noop
90
89
 
91
90
 
@@ -148,8 +147,7 @@ init slots flags url key =
148
147
  in
149
148
  ( model
150
149
  , Cmd.batch
151
- [ scrollTo url
152
- , measureAnchors (pageAnchors page)
150
+ [ measureAnchors (pageAnchors page)
153
151
  , setMeta model
154
152
  ]
155
153
  )
@@ -242,8 +240,7 @@ update msg model =
242
240
  in
243
241
  ( next
244
242
  , Cmd.batch
245
- [ scrollTo url
246
- , measureAnchors (pageAnchors page)
243
+ [ measureAnchors (pageAnchors page)
247
244
  , setMeta next
248
245
  ]
249
246
  )
@@ -504,22 +501,29 @@ update msg model =
504
501
  else
505
502
  ( model, Cmd.none )
506
503
 
507
- ScrolledTo _ ->
508
- ( model, Cmd.none )
509
-
510
504
  Noop ->
511
505
  ( model, Cmd.none )
512
506
 
513
507
 
514
508
  subscriptions : Model -> Sub Msg
515
509
  subscriptions model =
510
+ let
511
+ header =
512
+ model.site.chrome.header
513
+
514
+ shell =
515
+ model.error == Nothing
516
+
517
+ docsSwitcher =
518
+ shell && header.docs && List.length model.site.docs > 1
519
+ in
516
520
  Sub.batch
517
521
  [ Sub.map SearchMsg (Ui.Search.subscriptions model.search)
518
522
  , Sub.map BurgerMsg (Ui.Burger.subscriptions model.burger)
519
- , Sub.map DocsTabsMsg (Ui.Tabs.subscriptions True model.docsTabs)
520
- , Sub.map MenuDocsTabsMsg (Ui.Tabs.subscriptions model.burger.open model.menuDocsTabs)
521
- , Sub.map ThemeTabsMsg (Ui.Tabs.subscriptions True model.themeTabs)
522
- , Sub.map MenuTabsMsg (Ui.Tabs.subscriptions model.burger.open model.menuTabs)
523
+ , Sub.map DocsTabsMsg (Ui.Tabs.subscriptions docsSwitcher model.docsTabs)
524
+ , Sub.map MenuDocsTabsMsg (Ui.Tabs.subscriptions (model.burger.open && docsSwitcher) model.menuDocsTabs)
525
+ , Sub.map ThemeTabsMsg (Ui.Tabs.subscriptions (shell && header.theme) model.themeTabs)
526
+ , Sub.map MenuTabsMsg (Ui.Tabs.subscriptions (model.burger.open && shell && header.theme) model.menuTabs)
523
527
  , Ui.Dropdown.subscriptions "ai-dropdown" model.aiOpen AiToggled
524
528
  , Ports.onScroll Scrolled
525
529
  , Browser.Events.onKeyDown searchShortcutKey
@@ -1222,18 +1226,6 @@ closeBurger burger =
1222
1226
  burger
1223
1227
 
1224
1228
 
1225
- scrollTo : Url -> Cmd Msg
1226
- scrollTo url =
1227
- case url.fragment of
1228
- Just id ->
1229
- Dom.getElement id
1230
- |> Task.andThen (\element -> Dom.setViewport 0 element.element.y)
1231
- |> Task.attempt ScrolledTo
1232
-
1233
- Nothing ->
1234
- Dom.setViewport 0 0 |> Task.attempt ScrolledTo
1235
-
1236
-
1237
1229
  emptySite : Site
1238
1230
  emptySite =
1239
1231
  { meta =
@@ -192,7 +192,7 @@ header config =
192
192
  ]
193
193
  ([ if chrome.logo then
194
194
  Html.a [ A.class "docs-header-title", A.href (Page.href config.site config.doc.root) ]
195
- [ logoView config.site.meta.logo config ]
195
+ [ logoView config ]
196
196
 
197
197
  else
198
198
  Html.text ""
@@ -256,15 +256,34 @@ headerAction config action =
256
256
  (Page.href config.site action.href)
257
257
 
258
258
 
259
- {-| A site brand: its configured logo image when it has one, otherwise the
260
- text label. The image is the same node in the bar, the drawer and the
261
- footer; each context sizes it.
259
+ {-| A site brand: its configured logo image, its configured logo text, or
260
+ both. The image and the wordmark are the same nodes in the bar and the
261
+ drawer; each context sizes them.
262
262
  -}
263
- logoView : String -> Config msg -> Html msg
264
- logoView label config =
263
+ logoView : Config msg -> Html msg
264
+ logoView config =
265
+ let
266
+ logo =
267
+ config.site.meta.logo
268
+
269
+ label =
270
+ if String.isEmpty logo then
271
+ config.site.meta.title
272
+
273
+ else
274
+ logo
275
+
276
+ wordmark =
277
+ if String.isEmpty logo then
278
+ []
279
+
280
+ else
281
+ [ Html.span [ A.class "site-brand-text" ] [ Html.text logo ] ]
282
+ in
265
283
  case config.site.meta.logoImage of
266
284
  Just src ->
267
- Html.node "img" [ A.class "site-logo", A.src (Page.href config.site src), A.alt label ] []
285
+ Html.span [ A.class "site-brand" ]
286
+ (Html.node "img" [ A.class "site-logo", A.src (Page.href config.site src), A.alt label ] [] :: wordmark)
268
287
 
269
288
  Nothing ->
270
289
  Html.text label
@@ -903,7 +922,7 @@ drawer config =
903
922
  Ui.Burger.view
904
923
  { label = "Menu"
905
924
  , logo =
906
- Just (Html.span [ A.class "burger-wordmark" ] [ logoView config.site.meta.logo config ])
925
+ Just (Html.span [ A.class "burger-wordmark" ] [ logoView config ])
907
926
  , header =
908
927
  Just
909
928
  (Html.div [ A.class "burger-panel" ]
@@ -12,15 +12,12 @@
12
12
  // Gem's additions live in ./gem.scss and load after this file.
13
13
 
14
14
  // The shell: the whole docs site constrained to max-w-7xl and
15
- // centered; the navbar and the content column both span it. Its
16
- // hairlines run the full viewport height — down the left of the
17
- // sidebar and down the right of the ToC, the navbar included.
15
+ // centered; the navbar and the content column both span it. It carries
16
+ // no hairlines: the columns separate by their own padding alone.
18
17
  .shell {
19
18
  max-width: 88rem;
20
19
  min-height: 100vh;
21
20
  margin-inline: auto;
22
- border-left: 1px solid var(--frame);
23
- border-right: 1px solid var(--frame);
24
21
  }
25
22
 
26
23
  // The bar's height is the rail's sticky offset: they have to agree, or the
@@ -28,21 +25,29 @@
28
25
  // One value, used by the bar, the rail and the layout's min-height.
29
26
  $header-height: 3.8125rem;
30
27
 
28
+ // The sticky ToC band on the narrow layout: it and the headings' scroll
29
+ // margin share the value, so a fragment jump clears both.
30
+ $toc-band-height: 2.3125rem;
31
+
31
32
  .docs {
32
33
  display: flex;
33
34
  align-items: stretch;
34
35
  min-height: calc(100vh - #{$header-height});
35
36
  }
36
37
 
38
+ // The section starts 1.5rem below the navbar's border, not flush on it.
39
+ // The gap lives inside each column rather than on `.docs`: the rail is
40
+ // sticky at the bar's height, so a gap above it would be scrolled away
41
+ // over the first 1.5rem and the rail would creep up on its own.
42
+ $section-gap: 1.5rem;
43
+
37
44
  .docs-sidebar {
38
45
  position: sticky;
39
46
  top: $header-height;
40
47
  height: calc(100vh - #{$header-height});
41
- border-right: 1px solid var(--frame);
42
-
43
- .sidebar {
44
- height: 100%;
45
- }
48
+ // `.docs-sidebar` is the `.sidebar` itself, so its gap is its own
49
+ // padding, outside the scroller that carries the fade mask.
50
+ padding-top: $section-gap;
46
51
  }
47
52
 
48
53
  // The content column: the sidebar and the ToC rail separate it from
@@ -52,10 +57,11 @@ $header-height: 3.8125rem;
52
57
  min-width: 0;
53
58
  display: flex;
54
59
  flex-direction: column;
60
+ padding-top: $section-gap;
55
61
  }
56
62
 
57
63
  .docs-content {
58
- padding: 3rem 5rem;
64
+ padding: 0.5rem 5rem 3rem;
59
65
  }
60
66
 
61
67
  .docs-header {
@@ -64,7 +70,6 @@ $header-height: 3.8125rem;
64
70
  gap: 1.5rem;
65
71
  min-height: $header-height;
66
72
  padding: 0.75rem 1.5rem;
67
- border-bottom: 1px solid var(--frame);
68
73
  position: sticky;
69
74
  top: 0;
70
75
  background: var(--bg);
@@ -75,17 +80,13 @@ $header-height: 3.8125rem;
75
80
  display: inline-flex;
76
81
  align-items: center;
77
82
  gap: 0.45rem;
78
- font-family: "Hypography Web", "Charmform Web", system-ui, sans-serif;
83
+ font-family: "Charmform Web", system-ui, sans-serif;
79
84
  font-size: 1.35rem;
85
+ font-weight: 800;
80
86
  color: var(--fg);
81
87
  text-decoration: none;
82
88
  flex-shrink: 0;
83
89
 
84
- // The wordmark wears the house pink, same as the footer's.
85
- span {
86
- color: charmtone.$blush;
87
- }
88
-
89
90
  .sprout-mark {
90
91
  // Sits a touch high so the leaves read level with the x-height.
91
92
  margin-top: -0.1rem;
@@ -122,15 +123,22 @@ $header-height: 3.8125rem;
122
123
  }
123
124
  }
124
125
 
126
+ .site-brand {
127
+ display: inline-flex;
128
+ align-items: center;
129
+ gap: 0.45rem;
130
+ }
131
+
125
132
  .docs-page {
126
133
  position: relative;
127
134
  max-width: 60rem;
128
135
  }
129
136
 
130
- // The narrow layout is the one that hides the header on scroll: the ToC
131
- // band then owns the top edge, so something useful stays pinned. A wide
132
- // screen keeps its header, and its ToC rail is off to the side.
133
- @media (max-width: 1024px) {
137
+ // Only the phone layout hides the header on scroll: the ToC band then
138
+ // owns the top edge, so something useful stays pinned. Anywhere the
139
+ // desktop rail is still on screen (tablet and up) the header stays put,
140
+ // so the rail and the bar never move on their own while reading.
141
+ @media (max-width: 768px) {
134
142
  .docs-header.is-hidden {
135
143
  transform: translateY(-100%);
136
144
  }
@@ -140,21 +148,6 @@ $header-height: 3.8125rem;
140
148
  .shell:has(.docs-header.is-hidden) .docs-toc {
141
149
  top: 0;
142
150
  }
143
-
144
- // Between the phone and wide layouts the rail is still on screen, so
145
- // it follows the bar up too, or it would hang a header's height below
146
- // the viewport edge with an empty strip above it. Same timing as the
147
- // bar's slide, so the two move as one.
148
- .docs-sidebar {
149
- transition:
150
- top 180ms ease,
151
- height 180ms ease;
152
- }
153
-
154
- .shell:has(.docs-header.is-hidden) .docs-sidebar {
155
- top: 0;
156
- height: 100vh;
157
- }
158
151
  }
159
152
 
160
153
  .docs-lede {
@@ -231,7 +224,7 @@ $header-height: 3.8125rem;
231
224
 
232
225
  .docs-eof-mark {
233
226
  display: block;
234
- font-family: "Fraktion Mono Web", ui-monospace, monospace;
227
+ font-family: "JetBrains Mono", ui-monospace, monospace;
235
228
  font-size: 0.875rem;
236
229
  font-weight: 640;
237
230
  letter-spacing: 0.16em;
@@ -266,7 +259,7 @@ $header-height: 3.8125rem;
266
259
  border-radius: calc(0.4rem * var(--squircle-scale, 1));
267
260
  background: var(--well);
268
261
  color: var(--fg);
269
- font-family: "Fraktion Mono Web", ui-monospace, monospace;
262
+ font-family: "JetBrains Mono", ui-monospace, monospace;
270
263
  font-size: 0.8125rem;
271
264
  overflow-wrap: anywhere;
272
265
  }
@@ -385,13 +378,13 @@ $header-height: 3.8125rem;
385
378
  }
386
379
 
387
380
  .swatch-name {
388
- font-family: "JetBrains Mono Variable", ui-monospace, monospace;
381
+ font-family: "JetBrains Mono", ui-monospace, monospace;
389
382
  font-size: 0.75rem;
390
383
  font-weight: 620;
391
384
  }
392
385
 
393
386
  .swatch-hex {
394
- font-family: "JetBrains Mono Variable", ui-monospace, monospace;
387
+ font-family: "JetBrains Mono", ui-monospace, monospace;
395
388
  font-size: 0.6875rem;
396
389
  color: var(--muted);
397
390
  }
@@ -429,13 +422,6 @@ ul.rows {
429
422
  flex-direction: column;
430
423
  }
431
424
 
432
- // The frame's vertical hairlines don't read on a phone — the
433
- // viewport edges are the borders there.
434
- .shell {
435
- border-left: none;
436
- border-right: none;
437
- }
438
-
439
425
  // The desktop rail steps aside on mobile: the burger drawer carries
440
426
  // the docs nav instead.
441
427
  .docs-sidebar {
@@ -495,13 +481,9 @@ ul.rows {
495
481
  grid-row: 1;
496
482
  }
497
483
 
498
- // The ToC column stretches the full height of the content, so its
499
- // left hairline runs border to border; the sticky wrapper keeps the
500
- // nav pinned inside it. The title lines up with the item labels.
501
- .docs-toc {
502
- border-left: 1px solid var(--frame);
503
- }
504
-
484
+ // The sticky wrapper keeps the nav pinned inside the ToC column,
485
+ // which stretches the full height of the content. The title lines up
486
+ // with the item labels.
505
487
  .docs-toc-sticky {
506
488
  position: sticky;
507
489
  top: 4.75rem;
@@ -527,8 +509,6 @@ ul.rows {
527
509
  top: 3.8125rem;
528
510
  z-index: 25;
529
511
  margin: 0;
530
- border-left: none;
531
- border-bottom: 1px solid var(--frame);
532
512
  background: var(--plate);
533
513
  transition: top 180ms ease;
534
514
  }
@@ -536,6 +516,7 @@ ul.rows {
536
516
  .docs-toc-sticky {
537
517
  display: flex;
538
518
  align-items: center;
519
+ min-height: $toc-band-height;
539
520
  padding: 0.55rem 0.9rem;
540
521
 
541
522
  // The nav is a flex item and would shrink to its content;
@@ -627,6 +608,11 @@ ul.rows {
627
608
  font-weight: 800;
628
609
  font-variation-settings: "OPTK" -10;
629
610
  outline: none;
611
+ scroll-margin-top: calc(#{$header-height} + 0.5rem);
612
+
613
+ @media (max-width: 1024px) {
614
+ scroll-margin-top: calc(#{$header-height} + #{$toc-band-height} + 0.5rem);
615
+ }
630
616
  }
631
617
 
632
618
  .md-h1 {
@@ -647,7 +633,7 @@ ul.rows {
647
633
  padding-top: 1.5rem;
648
634
  font-size: 1.5rem;
649
635
  line-height: 1.3333333;
650
- font-variation-settings: "OPTK" -15;
636
+ font-variation-settings: "OPTK" -35;
651
637
  }
652
638
 
653
639
  .md-h3 {
@@ -708,10 +694,23 @@ ul.rows {
708
694
  // The app-global footer, following Hyper's footer: the brand on the page
709
695
  // surface, the configured link columns, and a quiet legal bar.
710
696
  .site-footer {
711
- border-top: 1px solid var(--frame);
697
+ position: relative;
712
698
  background: var(--bg);
713
699
  overflow: hidden;
714
700
 
701
+ // The edge above the footer is inset to its content padding rather than
702
+ // running the full width: a frame-to-frame line read as a second frame
703
+ // around the page, on desktop and on mobile alike.
704
+ &::before {
705
+ content: "";
706
+ position: absolute;
707
+ top: 0;
708
+ left: 2.5rem;
709
+ right: 2.5rem;
710
+ height: 1px;
711
+ background: var(--frame);
712
+ }
713
+
715
714
  .site-footer-inner {
716
715
  display: grid;
717
716
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
@@ -737,7 +736,7 @@ ul.rows {
737
736
  }
738
737
 
739
738
  .site-footer-wordmark {
740
- font-family: "Hypography Web", "Charmform Web", system-ui, sans-serif;
739
+ font-family: "Charmform Web", system-ui, sans-serif;
741
740
  font-size: 2.25rem;
742
741
  letter-spacing: -0.03em;
743
742
  color: charmtone.$blush;
@@ -813,7 +812,6 @@ ul.rows {
813
812
  justify-content: space-between;
814
813
  gap: 1rem;
815
814
  padding: 1.1rem 2.5rem;
816
- border-top: 1px solid var(--frame);
817
815
  font-size: 0.75rem;
818
816
  color: var(--tertiary);
819
817
  }
@@ -832,6 +830,10 @@ ul.rows {
832
830
  .site-footer .site-footer-inner {
833
831
  grid-template-columns: 1fr 1fr;
834
832
  }
833
+
834
+ .site-footer .site-footer-bar {
835
+ padding-right: 5.5rem;
836
+ }
835
837
  }
836
838
 
837
839
  // Icon-only theme tabs: square glyph tiles.
@@ -1031,7 +1033,7 @@ ul.rows {
1031
1033
 
1032
1034
  .detail {
1033
1035
  color: var(--tertiary);
1034
- font-family: "Fraktion Mono Web", ui-monospace, monospace;
1036
+ font-family: "JetBrains Mono", ui-monospace, monospace;
1035
1037
  font-size: 0.65rem;
1036
1038
  letter-spacing: 0.06em;
1037
1039
  text-transform: uppercase;
@@ -1,51 +1,53 @@
1
- @import url("https://stuff.charm.land/fonts/charmform/charmform.css");
2
-
3
1
  @font-face {
4
- font-family: "Fraktion Mono Web";
5
- src: url("../../assets/fonts/PPFraktionMono-Variable.ttf") format("truetype-variations");
6
- font-weight: 200 800;
2
+ font-family: "JetBrains Mono";
3
+ src: url("https://stuff.charm.land/fonts/jetbrains-mono/JetBrainsMono-Regular.woff2")
4
+ format("woff2");
5
+ font-weight: 400;
7
6
  font-style: normal;
8
7
  font-display: swap;
9
8
  }
10
9
 
11
10
  @font-face {
12
- font-family: "Fraktion Mono Web";
13
- src: url("../../assets/fonts/PPFraktionMonoItalic-Variable.ttf")
14
- format("truetype-variations");
15
- font-weight: 200 800;
11
+ font-family: "JetBrains Mono";
12
+ src: url("https://stuff.charm.land/fonts/jetbrains-mono/JetBrainsMono-Italic.woff2")
13
+ format("woff2");
14
+ font-weight: 400;
16
15
  font-style: italic;
17
16
  font-display: swap;
18
17
  }
19
18
 
20
19
  @font-face {
21
- font-family: "Fraktion Sans Web";
22
- src: url("../../assets/fonts/PPFraktionSans-Variable.ttf") format("truetype-variations");
23
- font-weight: 200 800;
20
+ font-family: "JetBrains Mono";
21
+ src: url("https://stuff.charm.land/fonts/jetbrains-mono/JetBrainsMono-Medium.woff2")
22
+ format("woff2");
23
+ font-weight: 500;
24
24
  font-style: normal;
25
25
  font-display: swap;
26
26
  }
27
27
 
28
28
  @font-face {
29
- font-family: "Fraktion Sans Web";
30
- src: url("../../assets/fonts/PPFraktionSansItalic-Variable.ttf")
31
- format("truetype-variations");
32
- font-weight: 200 800;
29
+ font-family: "JetBrains Mono";
30
+ src: url("https://stuff.charm.land/fonts/jetbrains-mono/JetBrainsMono-Medium-Italic.woff2")
31
+ format("woff2");
32
+ font-weight: 500;
33
33
  font-style: italic;
34
34
  font-display: swap;
35
35
  }
36
36
 
37
37
  @font-face {
38
- font-family: "Hypography Web";
39
- src: url("../../assets/fonts/Hypography-Regular.woff2") format("woff2");
40
- font-weight: 400;
38
+ font-family: "JetBrains Mono";
39
+ src: url("https://stuff.charm.land/fonts/jetbrains-mono/JetBrainsMono-Bold.woff2")
40
+ format("woff2");
41
+ font-weight: 700;
41
42
  font-style: normal;
42
43
  font-display: swap;
43
44
  }
44
45
 
45
46
  @font-face {
46
- font-family: "Hypography Web";
47
- src: url("../../assets/fonts/Hypography-Italic.woff2") format("woff2");
48
- font-weight: 400;
47
+ font-family: "JetBrains Mono";
48
+ src: url("https://stuff.charm.land/fonts/jetbrains-mono/JetBrainsMono-Bold-Italic.woff2")
49
+ format("woff2");
50
+ font-weight: 700;
49
51
  font-style: italic;
50
52
  font-display: swap;
51
53
  }
@@ -34,6 +34,73 @@
34
34
  border-radius: 0.5rem;
35
35
  }
36
36
 
37
+ .md-image[role="button"] {
38
+ cursor: zoom-in;
39
+ }
40
+
41
+ // The module measures the scrollbar into --gem-lightbox-gap.
42
+ :root.gem-lightbox-open {
43
+ overflow: hidden;
44
+ padding-right: var(--gem-lightbox-gap, 0px);
45
+ }
46
+
47
+ // The image is a child, so the backdrop fades on a pseudo element.
48
+ .gem-lightbox {
49
+ position: fixed;
50
+ inset: 0;
51
+ z-index: 240;
52
+ display: flex;
53
+ align-items: center;
54
+ justify-content: center;
55
+ padding: clamp(0.5rem, 2vw, 1.5rem);
56
+
57
+ &[hidden] {
58
+ display: none;
59
+ }
60
+
61
+ &:focus {
62
+ outline: none;
63
+ }
64
+
65
+ &::before {
66
+ content: "";
67
+ position: absolute;
68
+ inset: 0;
69
+ background: color-mix(in srgb, var(--bg) 55%, transparent);
70
+ backdrop-filter: blur(0.75rem);
71
+ -webkit-backdrop-filter: blur(0.75rem);
72
+ opacity: 0;
73
+ // Matches DURATION in lightbox.ts.
74
+ transition: opacity 300ms ease;
75
+ }
76
+
77
+ &.open::before {
78
+ opacity: 1;
79
+ }
80
+ }
81
+
82
+ .gem-lightbox-image {
83
+ position: relative;
84
+ max-width: min(94vw, 1600px);
85
+ max-height: 90vh;
86
+ border-radius: calc(0.75rem * var(--squircle-scale, 1));
87
+ box-shadow: 0 1.5rem 4rem rgba(charmtone.$char, 0.45);
88
+ cursor: zoom-out;
89
+ }
90
+
91
+ // Matches NARROW in lightbox.ts.
92
+ @media (max-width: 768px) {
93
+ .gem-lightbox {
94
+ padding: 0;
95
+ }
96
+
97
+ .gem-lightbox-image {
98
+ max-width: 100vw;
99
+ max-height: 100vh;
100
+ border-radius: 0;
101
+ }
102
+ }
103
+
37
104
  .md-quote {
38
105
  margin: 1rem 0;
39
106
  padding-left: 1rem;
@@ -152,7 +219,7 @@
152
219
 
153
220
  .code-title {
154
221
  overflow: hidden;
155
- font-family: "Fraktion Mono Web", ui-monospace, monospace;
222
+ font-family: "JetBrains Mono", ui-monospace, monospace;
156
223
  font-size: 0.72rem;
157
224
  font-weight: 600;
158
225
  color: var(--fg);
@@ -171,7 +238,7 @@
171
238
  border-color: transparent;
172
239
  background: transparent;
173
240
  color: var(--tertiary);
174
- font-family: "Fraktion Mono Web", ui-monospace, monospace;
241
+ font-family: "JetBrains Mono", ui-monospace, monospace;
175
242
  font-size: 0.6875rem;
176
243
  font-weight: 520;
177
244
  letter-spacing: 0.06em;
@@ -208,7 +275,7 @@
208
275
  .code-block pre {
209
276
  margin: 0;
210
277
  padding: 0.9rem 1.15rem 1rem 0.5rem;
211
- font-family: "JetBrains Mono Variable", ui-monospace, monospace;
278
+ font-family: "JetBrains Mono", ui-monospace, monospace;
212
279
  font-size: 0.8125rem;
213
280
  line-height: 1.7;
214
281
  color: var(--fg);
@@ -294,14 +361,14 @@
294
361
  background: color-mix(in srgb, var(--fg) 6%, transparent);
295
362
  border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
296
363
  border-radius: calc(0.3rem * var(--squircle-scale, 1));
297
- font-family: "JetBrains Mono Variable", ui-monospace, monospace;
364
+ font-family: "JetBrains Mono", ui-monospace, monospace;
298
365
  font-size: 0.82em;
299
366
  color: var(--fg);
300
367
  white-space: nowrap;
301
368
  }
302
369
 
303
370
  .gem-raw {
304
- font-family: "Fraktion Mono Web", ui-monospace, monospace;
371
+ font-family: "JetBrains Mono", ui-monospace, monospace;
305
372
  font-size: 0.8125rem;
306
373
  color: var(--tertiary);
307
374
  }
@@ -318,7 +385,7 @@
318
385
  content: "unregistered component: " attr(data-component);
319
386
  display: block;
320
387
  margin-bottom: 0.35rem;
321
- font-family: "Fraktion Mono Web", ui-monospace, monospace;
388
+ font-family: "JetBrains Mono", ui-monospace, monospace;
322
389
  font-size: 0.7rem;
323
390
  color: var(--tertiary);
324
391
  }
@@ -327,7 +394,7 @@
327
394
  .gem-error {
328
395
  margin: 2rem;
329
396
  padding: 1rem;
330
- font-family: "Fraktion Mono Web", ui-monospace, monospace;
397
+ font-family: "JetBrains Mono", ui-monospace, monospace;
331
398
  font-size: 0.8125rem;
332
399
  white-space: pre-wrap;
333
400
  color: var(--fg);