@charmland/gem 0.2.0 → 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.
@@ -71,7 +71,7 @@
71
71
  figcaption {
72
72
  margin: 0;
73
73
  padding: 0;
74
- font-weight: normal;
74
+ font-weight: inherit;
75
75
  font-style: normal;
76
76
  text-align: left;
77
77
  }
@@ -197,7 +197,7 @@ html,
197
197
  body {
198
198
  height: 100%;
199
199
  font-family: "Charmform Web", system-ui, -apple-system, sans-serif;
200
- font-weight: 500;
200
+ font-weight: 460;
201
201
  color: var(--fg);
202
202
  background: var(--bg);
203
203
  -webkit-font-smoothing: antialiased;
@@ -217,30 +217,41 @@ textarea {
217
217
 
218
218
  * {
219
219
  scrollbar-width: thin;
220
- scrollbar-color: #6b50ff var(--well);
220
+ scrollbar-color: transparent transparent;
221
+ }
222
+
223
+ *:hover {
224
+ scrollbar-color: color-mix(in srgb, var(--fg) 28%, transparent) transparent;
221
225
  }
222
226
 
223
227
  *::-webkit-scrollbar {
224
- width: 0.625rem;
225
- height: 0.625rem;
228
+ width: 0.5rem;
229
+ height: 0.5rem;
226
230
  }
227
231
 
228
232
  *::-webkit-scrollbar-track {
229
- border-radius: 9999px;
230
- background: var(--well);
233
+ background: transparent;
231
234
  }
232
235
 
233
236
  *::-webkit-scrollbar-thumb {
237
+ border: 1px solid transparent;
234
238
  border-radius: 9999px;
235
- background: linear-gradient(90deg, #6b50ff, #ff60ff);
236
- border: 1px solid var(--bg);
239
+ background: transparent;
240
+ background-clip: content-box;
241
+ }
242
+
243
+ *:hover::-webkit-scrollbar-thumb {
244
+ background: color-mix(in srgb, var(--fg) 28%, transparent);
245
+ background-clip: content-box;
237
246
  }
247
+
238
248
  *::-webkit-scrollbar-thumb:hover {
239
- background: linear-gradient(90deg, #8b75ff, #d46eff);
249
+ background: color-mix(in srgb, var(--fg) 45%, transparent);
250
+ background-clip: content-box;
240
251
  }
241
252
 
242
253
  *::-webkit-scrollbar-corner {
243
- background: var(--well);
254
+ background: transparent;
244
255
  }
245
256
 
246
257
  @supports (corner-shape: squircle) {
@@ -1135,7 +1146,7 @@ table a:hover {
1135
1146
  .toolbar h1 {
1136
1147
  font-size: 2.7rem;
1137
1148
  font-weight: 800;
1138
- font-variation-settings: "OPTK" -15;
1149
+ font-variation-settings: "OPTK" -45;
1139
1150
  margin: 0;
1140
1151
  }
1141
1152
  .toolbar .actions {
@@ -1581,7 +1592,7 @@ button.copy.done {
1581
1592
  transition: opacity 150ms ease, visibility 150ms ease;
1582
1593
  }
1583
1594
 
1584
- @media (max-width: 768px) {
1595
+ @media (max-width: 1024px) {
1585
1596
  .dropdown .menu {
1586
1597
  left: auto;
1587
1598
  right: 0;
@@ -3035,6 +3046,16 @@ a.social.disabled {
3035
3046
  border-top: 1px solid rgba(247, 246, 251, 0.2);
3036
3047
  }
3037
3048
 
3049
+ @property --sidebar-fade-top {
3050
+ syntax: "<length>";
3051
+ inherits: false;
3052
+ initial-value: 0px;
3053
+ }
3054
+ @property --sidebar-fade-bottom {
3055
+ syntax: "<length>";
3056
+ inherits: false;
3057
+ initial-value: 0px;
3058
+ }
3038
3059
  .sidebar {
3039
3060
  display: flex;
3040
3061
  flex-direction: column;
@@ -3045,10 +3066,16 @@ a.social.disabled {
3045
3066
  flex: 1;
3046
3067
  min-height: 0;
3047
3068
  overflow-y: auto;
3048
- background: linear-gradient(var(--bg) 33%, rgba(255, 255, 255, 0)) local center top, linear-gradient(rgba(255, 255, 255, 0), var(--bg) 67%) local center bottom, radial-gradient(farthest-side at 50% 0%, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0)) scroll center top, radial-gradient(farthest-side at 50% 100%, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0)) scroll center bottom;
3049
- background-repeat: no-repeat;
3050
- background-size: 100% 4rem, 100% 4rem, 100% 1rem, 100% 1rem;
3051
- background-attachment: local, local, scroll, scroll;
3069
+ scrollbar-gutter: stable;
3070
+ -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--sidebar-fade-top), #000 calc(100% - var(--sidebar-fade-bottom)), transparent 100%);
3071
+ mask-image: linear-gradient(to bottom, transparent 0, #000 var(--sidebar-fade-top), #000 calc(100% - var(--sidebar-fade-bottom)), transparent 100%);
3072
+ }
3073
+ @supports (animation-timeline: scroll()) {
3074
+ .sidebar .sidebar-items {
3075
+ animation: sidebar-fade-top linear both, sidebar-fade-bottom linear both;
3076
+ animation-timeline: scroll(self block), scroll(self block);
3077
+ animation-range: 0 2.5rem, calc(100% - 2.5rem) 100%;
3078
+ }
3052
3079
  }
3053
3080
  .sidebar ul {
3054
3081
  list-style: none;
@@ -3068,8 +3095,8 @@ a.social.disabled {
3068
3095
  margin-top: 0;
3069
3096
  }
3070
3097
  .sidebar li.section .section-label {
3071
- padding: 0.35rem 1.5rem;
3072
- font-weight: 620;
3098
+ padding: 0.35rem 1rem 0.35rem 1.5rem;
3099
+ font-weight: 735;
3073
3100
  letter-spacing: -0.01em;
3074
3101
  color: var(--fg);
3075
3102
  }
@@ -3078,7 +3105,7 @@ a.social.disabled {
3078
3105
  align-items: center;
3079
3106
  justify-content: space-between;
3080
3107
  width: 100%;
3081
- padding: 0.35rem 1.5rem;
3108
+ padding: 0.35rem 1rem 0.35rem 1.5rem;
3082
3109
  border: none;
3083
3110
  background: none;
3084
3111
  cursor: pointer;
@@ -3107,11 +3134,11 @@ a.social.disabled {
3107
3134
  display: flex;
3108
3135
  align-items: center;
3109
3136
  gap: 0.5rem;
3110
- padding: 0.5rem 1.5rem;
3137
+ padding: 0.5rem 1rem 0.5rem 1.5rem;
3111
3138
  text-decoration: none;
3112
3139
  color: var(--muted);
3113
3140
  font-size: 0.9375rem;
3114
- font-weight: 520;
3141
+ font-weight: 560;
3115
3142
  cursor: pointer;
3116
3143
  --active-border: 0.375rem;
3117
3144
  }
@@ -3156,7 +3183,7 @@ a.social.disabled {
3156
3183
  border-left: var(--active-border) solid #ff84ff;
3157
3184
  padding-left: calc(1.5rem - var(--active-border));
3158
3185
  color: var(--fg);
3159
- font-weight: 620;
3186
+ font-weight: 660;
3160
3187
  }
3161
3188
  .sidebar ul > li.section ~ li.active > a {
3162
3189
  padding-left: calc(2.25rem - var(--active-border));
@@ -3187,6 +3214,22 @@ a.social.disabled {
3187
3214
  padding-right: 0.6rem;
3188
3215
  }
3189
3216
 
3217
+ @keyframes sidebar-fade-top {
3218
+ from {
3219
+ --sidebar-fade-top: 0rem;
3220
+ }
3221
+ to {
3222
+ --sidebar-fade-top: 2.5rem;
3223
+ }
3224
+ }
3225
+ @keyframes sidebar-fade-bottom {
3226
+ from {
3227
+ --sidebar-fade-bottom: 2.5rem;
3228
+ }
3229
+ to {
3230
+ --sidebar-fade-bottom: 0rem;
3231
+ }
3232
+ }
3190
3233
  .toc {
3191
3234
  font-size: 0.8125rem;
3192
3235
  }
@@ -3211,11 +3254,10 @@ a.social.disabled {
3211
3254
  .toc li a {
3212
3255
  display: block;
3213
3256
  padding: 0.3rem 0.9rem;
3214
- border-left: 2px solid transparent;
3215
3257
  color: var(--muted);
3216
3258
  text-decoration: none;
3217
3259
  line-height: 1.4;
3218
- transition: color 125ms ease, border-color 125ms ease;
3260
+ transition: color 125ms ease;
3219
3261
  }
3220
3262
  .toc li a:hover {
3221
3263
  color: var(--fg);
@@ -3223,9 +3265,8 @@ a.social.disabled {
3223
3265
  .toc li li a {
3224
3266
  padding-left: 1.6rem;
3225
3267
  }
3226
- .toc li.active a {
3227
- border-left-color: #ff84ff;
3228
- color: var(--fg);
3268
+ .toc li.active > a {
3269
+ color: #ff84ff;
3229
3270
  font-weight: 620;
3230
3271
  }
3231
3272
  .toc.collapsible ul {
@@ -3241,7 +3282,7 @@ a.social.disabled {
3241
3282
  width: 100%;
3242
3283
  margin: 0;
3243
3284
  padding: 0;
3244
- padding-left: calc(0.9rem + 2px);
3285
+ padding-left: 0.9rem;
3245
3286
  border: none;
3246
3287
  background: none;
3247
3288
  cursor: pointer;
@@ -3282,17 +3323,20 @@ a.social.disabled {
3282
3323
  .page-nav {
3283
3324
  display: flex;
3284
3325
  justify-content: space-between;
3285
- gap: 1rem;
3326
+ gap: 1.5rem;
3286
3327
  margin-top: 2.5rem;
3287
3328
  padding-top: 1.5rem;
3288
- border-top: 1px solid var(--rule);
3329
+ }
3330
+
3331
+ .page-nav-link.next:only-child {
3332
+ margin-left: auto;
3289
3333
  }
3290
3334
 
3291
3335
  .page-nav-link {
3292
3336
  display: flex;
3337
+ flex: 1;
3293
3338
  flex-direction: column;
3294
3339
  gap: 0.25rem;
3295
- max-width: 45%;
3296
3340
  min-width: 0;
3297
3341
  padding: 0.75rem 1rem;
3298
3342
  border: 1px solid var(--frame);
@@ -3325,7 +3369,6 @@ a.social.disabled {
3325
3369
  color: #ff84ff;
3326
3370
  }
3327
3371
  .page-nav-link.next {
3328
- margin-left: auto;
3329
3372
  text-align: right;
3330
3373
  }
3331
3374
 
@@ -3530,8 +3573,6 @@ a.social.disabled {
3530
3573
  max-width: 88rem;
3531
3574
  min-height: 100vh;
3532
3575
  margin-inline: auto;
3533
- border-left: 1px solid var(--frame);
3534
- border-right: 1px solid var(--frame);
3535
3576
  }
3536
3577
 
3537
3578
  .docs {
@@ -3544,10 +3585,7 @@ a.social.disabled {
3544
3585
  position: sticky;
3545
3586
  top: 3.8125rem;
3546
3587
  height: calc(100vh - 3.8125rem);
3547
- border-right: 1px solid var(--frame);
3548
- }
3549
- .docs-sidebar .sidebar {
3550
- height: 100%;
3588
+ padding-top: 1.5rem;
3551
3589
  }
3552
3590
 
3553
3591
  .docs-main {
@@ -3555,10 +3593,11 @@ a.social.disabled {
3555
3593
  min-width: 0;
3556
3594
  display: flex;
3557
3595
  flex-direction: column;
3596
+ padding-top: 1.5rem;
3558
3597
  }
3559
3598
 
3560
3599
  .docs-content {
3561
- padding: 3rem 5rem;
3600
+ padding: 0.5rem 5rem 3rem;
3562
3601
  }
3563
3602
 
3564
3603
  .docs-header {
@@ -3567,7 +3606,6 @@ a.social.disabled {
3567
3606
  gap: 1.5rem;
3568
3607
  min-height: 3.8125rem;
3569
3608
  padding: 0.75rem 1.5rem;
3570
- border-bottom: 1px solid var(--frame);
3571
3609
  position: sticky;
3572
3610
  top: 0;
3573
3611
  background: var(--bg);
@@ -3622,20 +3660,13 @@ a.social.disabled {
3622
3660
  max-width: 60rem;
3623
3661
  }
3624
3662
 
3625
- @media (max-width: 1024px) {
3663
+ @media (max-width: 768px) {
3626
3664
  .docs-header.is-hidden {
3627
3665
  transform: translateY(-100%);
3628
3666
  }
3629
3667
  .shell:has(.docs-header.is-hidden) .docs-toc {
3630
3668
  top: 0;
3631
3669
  }
3632
- .docs-sidebar {
3633
- transition: top 180ms ease, height 180ms ease;
3634
- }
3635
- .shell:has(.docs-header.is-hidden) .docs-sidebar {
3636
- top: 0;
3637
- height: 100vh;
3638
- }
3639
3670
  }
3640
3671
  .docs-lede {
3641
3672
  margin: 0 0 1rem;
@@ -3865,10 +3896,6 @@ ul.rows .list-row + .list-row {
3865
3896
  .docs {
3866
3897
  flex-direction: column;
3867
3898
  }
3868
- .shell {
3869
- border-left: none;
3870
- border-right: none;
3871
- }
3872
3899
  .docs-sidebar {
3873
3900
  display: none;
3874
3901
  }
@@ -3910,9 +3937,6 @@ ul.rows .list-row + .list-row {
3910
3937
  grid-column: 2;
3911
3938
  grid-row: 1;
3912
3939
  }
3913
- .docs-with-toc .docs-toc {
3914
- border-left: 1px solid var(--frame);
3915
- }
3916
3940
  .docs-with-toc .docs-toc-sticky {
3917
3941
  position: sticky;
3918
3942
  top: 4.75rem;
@@ -3929,8 +3953,6 @@ ul.rows .list-row + .list-row {
3929
3953
  top: 3.8125rem;
3930
3954
  z-index: 25;
3931
3955
  margin: 0;
3932
- border-left: none;
3933
- border-bottom: 1px solid var(--frame);
3934
3956
  background: var(--plate);
3935
3957
  transition: top 180ms ease;
3936
3958
  }
@@ -4030,7 +4052,7 @@ ul.rows .list-row + .list-row {
4030
4052
  padding-top: 1.5rem;
4031
4053
  font-size: 1.5rem;
4032
4054
  line-height: 1.3333333;
4033
- font-variation-settings: "OPTK" -15;
4055
+ font-variation-settings: "OPTK" -35;
4034
4056
  }
4035
4057
  .md .md-h3 {
4036
4058
  margin: 2rem 0 0;
@@ -4074,10 +4096,19 @@ ul.rows .list-row + .list-row {
4074
4096
  }
4075
4097
 
4076
4098
  .site-footer {
4077
- border-top: 1px solid var(--frame);
4099
+ position: relative;
4078
4100
  background: var(--bg);
4079
4101
  overflow: hidden;
4080
4102
  }
4103
+ .site-footer::before {
4104
+ content: "";
4105
+ position: absolute;
4106
+ top: 0;
4107
+ left: 2.5rem;
4108
+ right: 2.5rem;
4109
+ height: 1px;
4110
+ background: var(--frame);
4111
+ }
4081
4112
  .site-footer .site-footer-inner {
4082
4113
  display: grid;
4083
4114
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
@@ -4163,7 +4194,6 @@ ul.rows .list-row + .list-row {
4163
4194
  justify-content: space-between;
4164
4195
  gap: 1rem;
4165
4196
  padding: 1.1rem 2.5rem;
4166
- border-top: 1px solid var(--frame);
4167
4197
  font-size: 0.75rem;
4168
4198
  color: var(--tertiary);
4169
4199
  }
@@ -4179,6 +4209,9 @@ ul.rows .list-row + .list-row {
4179
4209
  .site-footer .site-footer-inner {
4180
4210
  grid-template-columns: 1fr 1fr;
4181
4211
  }
4212
+ .site-footer .site-footer-bar {
4213
+ padding-right: 5.5rem;
4214
+ }
4182
4215
  }
4183
4216
  .tabs button .theme-icon {
4184
4217
  width: 1.1rem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@charmland/gem",
3
- "version": "0.2.0",
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",
@@ -75,7 +75,7 @@
75
75
  "prepack": "bun run build"
76
76
  },
77
77
  "dependencies": {
78
- "@charmland/gem-compiler": "0.2.0"
78
+ "@charmland/gem-compiler": "0.2.1"
79
79
  },
80
80
  "devDependencies": {
81
81
  "@types/node": "^26.6.5",
@@ -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
@@ -38,15 +35,19 @@ $toc-band-height: 2.3125rem;
38
35
  min-height: calc(100vh - #{$header-height});
39
36
  }
40
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
+
41
44
  .docs-sidebar {
42
45
  position: sticky;
43
46
  top: $header-height;
44
47
  height: calc(100vh - #{$header-height});
45
- border-right: 1px solid var(--frame);
46
-
47
- .sidebar {
48
- height: 100%;
49
- }
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;
50
51
  }
51
52
 
52
53
  // The content column: the sidebar and the ToC rail separate it from
@@ -56,10 +57,11 @@ $toc-band-height: 2.3125rem;
56
57
  min-width: 0;
57
58
  display: flex;
58
59
  flex-direction: column;
60
+ padding-top: $section-gap;
59
61
  }
60
62
 
61
63
  .docs-content {
62
- padding: 3rem 5rem;
64
+ padding: 0.5rem 5rem 3rem;
63
65
  }
64
66
 
65
67
  .docs-header {
@@ -68,7 +70,6 @@ $toc-band-height: 2.3125rem;
68
70
  gap: 1.5rem;
69
71
  min-height: $header-height;
70
72
  padding: 0.75rem 1.5rem;
71
- border-bottom: 1px solid var(--frame);
72
73
  position: sticky;
73
74
  top: 0;
74
75
  background: var(--bg);
@@ -133,10 +134,11 @@ $toc-band-height: 2.3125rem;
133
134
  max-width: 60rem;
134
135
  }
135
136
 
136
- // The narrow layout is the one that hides the header on scroll: the ToC
137
- // band then owns the top edge, so something useful stays pinned. A wide
138
- // screen keeps its header, and its ToC rail is off to the side.
139
- @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) {
140
142
  .docs-header.is-hidden {
141
143
  transform: translateY(-100%);
142
144
  }
@@ -146,21 +148,6 @@ $toc-band-height: 2.3125rem;
146
148
  .shell:has(.docs-header.is-hidden) .docs-toc {
147
149
  top: 0;
148
150
  }
149
-
150
- // Between the phone and wide layouts the rail is still on screen, so
151
- // it follows the bar up too, or it would hang a header's height below
152
- // the viewport edge with an empty strip above it. Same timing as the
153
- // bar's slide, so the two move as one.
154
- .docs-sidebar {
155
- transition:
156
- top 180ms ease,
157
- height 180ms ease;
158
- }
159
-
160
- .shell:has(.docs-header.is-hidden) .docs-sidebar {
161
- top: 0;
162
- height: 100vh;
163
- }
164
151
  }
165
152
 
166
153
  .docs-lede {
@@ -435,13 +422,6 @@ ul.rows {
435
422
  flex-direction: column;
436
423
  }
437
424
 
438
- // The frame's vertical hairlines don't read on a phone — the
439
- // viewport edges are the borders there.
440
- .shell {
441
- border-left: none;
442
- border-right: none;
443
- }
444
-
445
425
  // The desktop rail steps aside on mobile: the burger drawer carries
446
426
  // the docs nav instead.
447
427
  .docs-sidebar {
@@ -501,13 +481,9 @@ ul.rows {
501
481
  grid-row: 1;
502
482
  }
503
483
 
504
- // The ToC column stretches the full height of the content, so its
505
- // left hairline runs border to border; the sticky wrapper keeps the
506
- // nav pinned inside it. The title lines up with the item labels.
507
- .docs-toc {
508
- border-left: 1px solid var(--frame);
509
- }
510
-
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.
511
487
  .docs-toc-sticky {
512
488
  position: sticky;
513
489
  top: 4.75rem;
@@ -533,8 +509,6 @@ ul.rows {
533
509
  top: 3.8125rem;
534
510
  z-index: 25;
535
511
  margin: 0;
536
- border-left: none;
537
- border-bottom: 1px solid var(--frame);
538
512
  background: var(--plate);
539
513
  transition: top 180ms ease;
540
514
  }
@@ -659,7 +633,7 @@ ul.rows {
659
633
  padding-top: 1.5rem;
660
634
  font-size: 1.5rem;
661
635
  line-height: 1.3333333;
662
- font-variation-settings: "OPTK" -15;
636
+ font-variation-settings: "OPTK" -35;
663
637
  }
664
638
 
665
639
  .md-h3 {
@@ -720,10 +694,23 @@ ul.rows {
720
694
  // The app-global footer, following Hyper's footer: the brand on the page
721
695
  // surface, the configured link columns, and a quiet legal bar.
722
696
  .site-footer {
723
- border-top: 1px solid var(--frame);
697
+ position: relative;
724
698
  background: var(--bg);
725
699
  overflow: hidden;
726
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
+
727
714
  .site-footer-inner {
728
715
  display: grid;
729
716
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
@@ -825,7 +812,6 @@ ul.rows {
825
812
  justify-content: space-between;
826
813
  gap: 1rem;
827
814
  padding: 1.1rem 2.5rem;
828
- border-top: 1px solid var(--frame);
829
815
  font-size: 0.75rem;
830
816
  color: var(--tertiary);
831
817
  }
@@ -844,6 +830,10 @@ ul.rows {
844
830
  .site-footer .site-footer-inner {
845
831
  grid-template-columns: 1fr 1fr;
846
832
  }
833
+
834
+ .site-footer .site-footer-bar {
835
+ padding-right: 5.5rem;
836
+ }
847
837
  }
848
838
 
849
839
  // Icon-only theme tabs: square glyph tiles.
@@ -250,7 +250,7 @@
250
250
  h1 {
251
251
  font-size: 2.7rem;
252
252
  font-weight: 800;
253
- font-variation-settings: "OPTK" -15;
253
+ font-variation-settings: "OPTK" -45;
254
254
  margin: 0;
255
255
  }
256
256
 
@@ -153,7 +153,7 @@
153
153
  // Small screens: triggers often sit near the viewport's right edge
154
154
  // (toolbars), so the menu grows leftward — a left-anchored menu would
155
155
  // hang off-screen even while hidden and scroll the page.
156
- @media (max-width: 768px) {
156
+ @media (max-width: 1024px) {
157
157
  .dropdown .menu {
158
158
  left: auto;
159
159
  right: 0;
@@ -9,17 +9,22 @@
9
9
  .page-nav {
10
10
  display: flex;
11
11
  justify-content: space-between;
12
- gap: 1rem;
12
+ gap: 1.5rem;
13
13
  margin-top: 2.5rem;
14
14
  padding-top: 1.5rem;
15
- border-top: 1px solid var(--rule);
15
+ }
16
+
17
+ // A lone next link sits at the start with the rest of the row; two
18
+ // links split the row evenly.
19
+ .page-nav-link.next:only-child {
20
+ margin-left: auto;
16
21
  }
17
22
 
18
23
  .page-nav-link {
19
24
  display: flex;
25
+ flex: 1;
20
26
  flex-direction: column;
21
27
  gap: 0.25rem;
22
- max-width: 45%;
23
28
  min-width: 0;
24
29
  padding: 0.75rem 1rem;
25
30
  border: 1px solid var(--frame);
@@ -57,7 +62,6 @@
57
62
  }
58
63
 
59
64
  &.next {
60
- margin-left: auto;
61
65
  text-align: right;
62
66
  }
63
67
  }
@@ -30,7 +30,7 @@
30
30
  figcaption {
31
31
  margin: 0;
32
32
  padding: 0;
33
- font-weight: normal;
33
+ font-weight: inherit;
34
34
  font-style: normal;
35
35
  text-align: left;
36
36
  }
@@ -1,39 +1,46 @@
1
- @use "charmtone";
1
+ // One scrollbar recipe for every engine: a thin, flat thumb on an invisible
2
+ // track, the shape Firefox draws, mirrored into Chromium and Safari through
3
+ // the WebKit pseudo-elements. The thumb stays invisible until the pointer is
4
+ // over the scrolling element, so a page or a rail never wears a permanent bar.
2
5
 
3
- // Scrollbars drawn by the Meter's recipe: a rounded thumb carrying
4
- // the Meter's charple-to-dolly gradient over a recessed track, in both
5
- // themes. The light theme used to take the Meter's light stops
6
- // (zest-to-bok), but a yellow thumb reads as a stray highlight on salt;
7
- // the purple stays the brand mark either way. Two specs, both declared
8
- // — engines that don't know a property ignore it. Chromium/WebKit render
9
- // the gradient on the thumb directly; Firefox's scrollbar-color takes
10
- // flat colors only, so there the thumb is the gradient's charple start.
6
+ $thumb: color-mix(in srgb, var(--fg) 28%, transparent);
7
+ $thumb-hover: color-mix(in srgb, var(--fg) 45%, transparent);
11
8
 
12
9
  * {
13
10
  scrollbar-width: thin;
14
- scrollbar-color: charmtone.$charple var(--well);
11
+ scrollbar-color: transparent transparent;
12
+ }
13
+
14
+ *:hover {
15
+ scrollbar-color: $thumb transparent;
15
16
  }
16
17
 
17
18
  *::-webkit-scrollbar {
18
- width: 0.625rem;
19
- height: 0.625rem;
19
+ width: 0.5rem;
20
+ height: 0.5rem;
20
21
  }
21
22
 
22
23
  *::-webkit-scrollbar-track {
23
- border-radius: 9999px;
24
- background: var(--well);
24
+ background: transparent;
25
25
  }
26
26
 
27
27
  *::-webkit-scrollbar-thumb {
28
+ border: 1px solid transparent;
28
29
  border-radius: 9999px;
29
- background: linear-gradient(90deg, charmtone.$charple, charmtone.$dolly);
30
- border: 1px solid var(--bg);
30
+ background: transparent;
31
+ background-clip: content-box;
32
+ }
33
+
34
+ *:hover::-webkit-scrollbar-thumb {
35
+ background: $thumb;
36
+ background-clip: content-box;
37
+ }
31
38
 
32
- &:hover {
33
- background: linear-gradient(90deg, charmtone.$hazy, charmtone.$mauve);
34
- }
39
+ *::-webkit-scrollbar-thumb:hover {
40
+ background: $thumb-hover;
41
+ background-clip: content-box;
35
42
  }
36
43
 
37
44
  *::-webkit-scrollbar-corner {
38
- background: var(--well);
45
+ background: transparent;
39
46
  }
@@ -1,6 +1,22 @@
1
1
  @use "charmtone";
2
2
  @use "controls" as *;
3
3
 
4
+ // Height of the dissolve at each end of the scrolling list.
5
+ $sidebar-fade: 2.5rem;
6
+
7
+ // Registered so the scroll timelines can interpolate them as lengths.
8
+ @property --sidebar-fade-top {
9
+ syntax: "<length>";
10
+ inherits: false;
11
+ initial-value: 0px;
12
+ }
13
+
14
+ @property --sidebar-fade-bottom {
15
+ syntax: "<length>";
16
+ inherits: false;
17
+ initial-value: 0px;
18
+ }
19
+
4
20
  // The navigation rail, carried over from the Hyper dashboard: fixed
5
21
  // items with the house hover sweep — a charple fill with salt ink,
6
22
  // wiped in from the left via a two-cell mask position animation — and
@@ -16,35 +32,42 @@
16
32
  flex: 1;
17
33
  min-height: 0;
18
34
  overflow-y: auto;
35
+ scrollbar-gutter: stable;
36
+
37
+ // Scroll fades: rows that hide above or below the scrollport
38
+ // dissolve via a mask, which also fades the ink — background
39
+ // gradients paint behind the text, so they cannot do this. One
40
+ // gradient reads two registered lengths, and scroll timelines
41
+ // animate them: the top fade grows over the first stretch of
42
+ // scrolling, the bottom one shrinks over the last. Both ramp by
43
+ // distance, never by percentage, so the fades stay 2.5rem tall
44
+ // however long the list is. With no overflow the timeline is
45
+ // inactive and the lengths keep their initial 0, so no mask shows.
46
+ // Browsers without scroll timelines keep a plain list.
47
+ -webkit-mask-image: linear-gradient(
48
+ to bottom,
49
+ transparent 0,
50
+ #000 var(--sidebar-fade-top),
51
+ #000 calc(100% - var(--sidebar-fade-bottom)),
52
+ transparent 100%
53
+ );
54
+ mask-image: linear-gradient(
55
+ to bottom,
56
+ transparent 0,
57
+ #000 var(--sidebar-fade-top),
58
+ #000 calc(100% - var(--sidebar-fade-bottom)),
59
+ transparent 100%
60
+ );
19
61
 
20
- // Scroll shadows: a soft dark fade shows at the inner top edge
21
- // while content hides above, and at the inner bottom edge while
22
- // content hides below. Pure CSS (Lea Verou's scrolling shadows):
23
- // the two cover gradients ride the content (background-attachment:
24
- // local) and hide their shadow when scrolled to that edge, so a
25
- // short, unscrolled list shows neither.
26
- background:
27
- linear-gradient(var(--bg) 33%, rgb(255 255 255 / 0%)) local center top,
28
- linear-gradient(rgb(255 255 255 / 0%), var(--bg) 67%) local center bottom,
29
- radial-gradient(
30
- farthest-side at 50% 0%,
31
- rgb(0 0 0 / 30%),
32
- rgb(0 0 0 / 0%)
33
- )
34
- scroll center top,
35
- radial-gradient(
36
- farthest-side at 50% 100%,
37
- rgb(0 0 0 / 30%),
38
- rgb(0 0 0 / 0%)
39
- )
40
- scroll center bottom;
41
- background-repeat: no-repeat;
42
- background-size:
43
- 100% 4rem,
44
- 100% 4rem,
45
- 100% 1rem,
46
- 100% 1rem;
47
- background-attachment: local, local, scroll, scroll;
62
+ @supports (animation-timeline: scroll()) {
63
+ animation:
64
+ sidebar-fade-top linear both,
65
+ sidebar-fade-bottom linear both;
66
+ animation-timeline: scroll(self block), scroll(self block);
67
+ animation-range:
68
+ 0 $sidebar-fade,
69
+ calc(100% - #{$sidebar-fade}) 100%;
70
+ }
48
71
  }
49
72
 
50
73
  ul {
@@ -72,8 +95,8 @@
72
95
  // size and in full-strength ink, so the sections read as the structure
73
96
  // and the pages as their contents.
74
97
  .section-label {
75
- padding: 0.35rem 1.5rem;
76
- font-weight: 620;
98
+ padding: 0.35rem 1rem 0.35rem 1.5rem;
99
+ font-weight: 735;
77
100
  letter-spacing: -0.01em;
78
101
  color: var(--fg);
79
102
  }
@@ -87,7 +110,7 @@
87
110
  align-items: center;
88
111
  justify-content: space-between;
89
112
  width: 100%;
90
- padding: 0.35rem 1.5rem;
113
+ padding: 0.35rem 1rem 0.35rem 1.5rem;
91
114
  border: none;
92
115
  background: none;
93
116
  cursor: pointer;
@@ -123,11 +146,11 @@
123
146
  display: flex;
124
147
  align-items: center;
125
148
  gap: 0.5rem;
126
- padding: 0.5rem 1.5rem;
149
+ padding: 0.5rem 1rem 0.5rem 1.5rem;
127
150
  text-decoration: none;
128
151
  color: var(--muted);
129
152
  font-size: 0.9375rem;
130
- font-weight: 520;
153
+ font-weight: 560;
131
154
  cursor: pointer;
132
155
  --active-border: 0.375rem;
133
156
 
@@ -187,7 +210,7 @@
187
210
  border-left: var(--active-border) solid charmtone.$blush;
188
211
  padding-left: calc(1.5rem - var(--active-border));
189
212
  color: var(--fg);
190
- font-weight: 620;
213
+ font-weight: 660;
191
214
  }
192
215
 
193
216
  ul > li.section ~ li.active > a {
@@ -227,3 +250,21 @@
227
250
  }
228
251
  }
229
252
  }
253
+
254
+ @keyframes sidebar-fade-top {
255
+ from {
256
+ --sidebar-fade-top: 0rem;
257
+ }
258
+ to {
259
+ --sidebar-fade-top: #{$sidebar-fade};
260
+ }
261
+ }
262
+
263
+ @keyframes sidebar-fade-bottom {
264
+ from {
265
+ --sidebar-fade-bottom: #{$sidebar-fade};
266
+ }
267
+ to {
268
+ --sidebar-fade-bottom: 0rem;
269
+ }
270
+ }
@@ -113,7 +113,7 @@ body {
113
113
  // rendered outside the page (the mobile drawer, toasts, dialogs)
114
114
  // inherit it too.
115
115
  font-family: $sans;
116
- font-weight: 500;
116
+ font-weight: 460;
117
117
  color: var(--fg);
118
118
  background: var(--bg);
119
119
  -webkit-font-smoothing: antialiased;
@@ -2,7 +2,8 @@
2
2
  @use "controls" as *;
3
3
 
4
4
  // The table of contents: a centered header, items on a flat list.
5
- // No rail — the blush edge on the active item is the only marker.
5
+ // No rail — the active section reads as accent-colored, bolder text,
6
+ // not the sidebar's blush edge.
6
7
 
7
8
  .toc {
8
9
  font-size: 0.8125rem;
@@ -25,21 +26,16 @@
25
26
  }
26
27
 
27
28
  ul ul {
28
- // Children keep the highlight rail in the same column as the
29
- // parent; only the label indents, never the border.
30
29
  margin-left: 0;
31
30
  }
32
31
 
33
32
  li a {
34
33
  display: block;
35
34
  padding: 0.3rem 0.9rem;
36
- border-left: 2px solid transparent;
37
35
  color: var(--muted);
38
36
  text-decoration: none;
39
37
  line-height: 1.4;
40
- transition:
41
- color 125ms ease,
42
- border-color 125ms ease;
38
+ transition: color 125ms ease;
43
39
 
44
40
  &:hover {
45
41
  color: var(--fg);
@@ -50,9 +46,10 @@
50
46
  padding-left: 1.6rem;
51
47
  }
52
48
 
53
- li.active a {
54
- border-left-color: charmtone.$blush;
55
- color: var(--fg);
49
+ // Only the entry's own anchor: children render inside the active
50
+ // parent's li, so a descendant selector would tint the whole branch.
51
+ li.active > a {
52
+ color: charmtone.$blush;
56
53
  font-weight: 620;
57
54
  }
58
55
 
@@ -75,10 +72,10 @@
75
72
  width: 100%;
76
73
  // The .toc-title margins don't apply to the button: the collapsed
77
74
  // band centers it instead. Its label starts where the item labels
78
- // do (rail + item padding), folded or open, at every width.
75
+ // do (item padding), folded or open, at every width.
79
76
  margin: 0;
80
77
  padding: 0;
81
- padding-left: calc(0.9rem + 2px);
78
+ padding-left: 0.9rem;
82
79
  border: none;
83
80
  background: none;
84
81
  cursor: pointer;