starlight-theme-apple 0.6.0 → 0.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/index.ts CHANGED
@@ -121,7 +121,7 @@ export default function starlightThemeApple(): StarlightPlugin {
121
121
  ...userExpressiveCodeConfig,
122
122
  styleOverrides: {
123
123
  borderColor: "var(--apple-hairline)",
124
- borderRadius: "var(--apple-radius-sm)",
124
+ borderRadius: "var(--apple-radius-panel)",
125
125
  ...userExpressiveCodeConfig.styleOverrides,
126
126
  frames: {
127
127
  editorActiveTabIndicatorTopColor: "unset",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starlight-theme-apple",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "An Apple Developer Documentation-inspired theme for Astro Starlight.",
5
5
  "keywords": [
6
6
  "starlight",
package/styles/code.css CHANGED
@@ -9,7 +9,7 @@
9
9
  }
10
10
 
11
11
  .expressive-code {
12
- --ec-brdRad: 0.75rem;
12
+ --ec-brdRad: var(--apple-radius-panel);
13
13
  --ec-brdWd: 1px;
14
14
  margin-block: 1.5rem;
15
15
  }
@@ -2,7 +2,7 @@
2
2
  padding-bottom: 4rem;
3
3
  }
4
4
  .content-panel:first-of-type .sl-container {
5
- padding-top: clamp(2.5rem, 6vw, 5rem);
5
+ padding-top: clamp(2.5rem, 5vw, 4rem);
6
6
  }
7
7
 
8
8
  .apple-breadcrumbs {
@@ -75,7 +75,7 @@
75
75
  .sl-markdown-content {
76
76
  color: var(--apple-foreground);
77
77
  font-size: 1.0625rem;
78
- line-height: 1.5625rem;
78
+ line-height: 1.65;
79
79
  }
80
80
  .sl-markdown-content > :first-child {
81
81
  margin-top: 0;
@@ -116,8 +116,8 @@
116
116
  }
117
117
  .sl-markdown-content h3:not(:where(.not-content *)) {
118
118
  color: var(--apple-foreground);
119
- font-size: 1.75rem;
120
- font-weight: 500;
119
+ font-size: 1.375rem;
120
+ font-weight: 600;
121
121
  line-height: 2rem;
122
122
  letter-spacing: -0.012em;
123
123
  }
@@ -127,13 +127,13 @@
127
127
  }
128
128
  .sl-markdown-content h4:not(:where(.not-content *)) {
129
129
  color: var(--apple-foreground);
130
- font-size: 1.5rem;
130
+ font-size: 1.125rem;
131
131
  font-weight: 600;
132
- line-height: 1.75rem;
132
+ line-height: 1.5rem;
133
133
  }
134
134
  .sl-markdown-content h5:not(:where(.not-content *)) {
135
- font-size: 1.375rem;
136
- line-height: 1.625rem;
135
+ font-size: 1.0625rem;
136
+ line-height: 1.5rem;
137
137
  }
138
138
  .sl-markdown-content h6:not(:where(.not-content *)) {
139
139
  font-size: 1.0625rem;
@@ -211,8 +211,8 @@
211
211
  .sl-markdown-content details:not(:where(.not-content *)) {
212
212
  overflow: clip;
213
213
  padding: 0;
214
- border: 1px solid var(--apple-border);
215
- border-radius: 0.75rem;
214
+ border: 1px solid var(--apple-hairline);
215
+ border-radius: var(--apple-radius-panel);
216
216
  background: var(--apple-secondary-background);
217
217
  }
218
218
  .sl-markdown-content details > summary:not(:where(.not-content *)) {
@@ -239,7 +239,7 @@
239
239
  border: 1px solid var(--apple-hairline);
240
240
  border-radius: 0.875rem;
241
241
  background: var(--apple-card-background);
242
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
242
+ box-shadow: none;
243
243
  }
244
244
  .sl-markdown-content .card {
245
245
  min-height: 100%;
@@ -295,10 +295,13 @@
295
295
  box-shadow var(--apple-transition);
296
296
  }
297
297
  .sl-markdown-content .sl-link-card:is(:hover, :focus-within) {
298
- border-color: var(--apple-link);
298
+ border-color: color-mix(
299
+ in srgb,
300
+ var(--apple-link) 45%,
301
+ var(--apple-hairline)
302
+ );
299
303
  background: var(--apple-hover-surface);
300
- box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
301
- transform: translateY(-1px);
304
+ box-shadow: none;
302
305
  text-decoration: none;
303
306
  }
304
307
  .sl-markdown-content .sl-link-card .title {
@@ -349,8 +352,8 @@
349
352
  --apple-aside-accent: var(--apple-secondary-foreground);
350
353
  margin-block: 1.5rem;
351
354
  padding: 1rem 1.125rem;
352
- border: 1px solid var(--apple-border);
353
- border-radius: 0.75rem;
355
+ border: 1px solid var(--apple-hairline);
356
+ border-radius: var(--apple-radius-panel);
354
357
  background: var(--apple-aside-background);
355
358
  color: var(--apple-foreground);
356
359
  box-shadow: none;
@@ -368,6 +371,7 @@
368
371
  display: none;
369
372
  }
370
373
  .starlight-aside__title {
374
+ margin: 0;
371
375
  color: var(--apple-aside-accent);
372
376
  font-size: 0.9375rem;
373
377
  font-weight: 500;
@@ -376,6 +380,12 @@
376
380
  .starlight-aside__title + * {
377
381
  margin-top: 0.375rem;
378
382
  }
383
+ .sl-markdown-content .starlight-aside :is(p, ul, ol) {
384
+ margin-block: 0.5rem;
385
+ }
386
+ .sl-markdown-content .starlight-aside .starlight-aside__title {
387
+ margin: 0;
388
+ }
379
389
  .starlight-aside__content > :first-child {
380
390
  margin-top: 0;
381
391
  }
@@ -431,6 +441,7 @@
431
441
  text-decoration: none;
432
442
  }
433
443
  .pagination-links > a[rel="next"] {
444
+ grid-column: 2;
434
445
  justify-content: flex-end;
435
446
  text-align: end;
436
447
  }
@@ -8,7 +8,7 @@
8
8
  min-height: 2.0625rem;
9
9
  padding: 0.25rem 0.9375rem;
10
10
  border: 0;
11
- border-radius: 0.25rem;
11
+ border-radius: var(--apple-radius-sm);
12
12
  box-shadow: none;
13
13
  font-size: 1.0625rem;
14
14
  font-weight: 400;
@@ -162,7 +162,7 @@
162
162
  min-height: 2.0625rem;
163
163
  padding: 0.25rem 0.9375rem;
164
164
  border: 0;
165
- border-radius: 0.25rem;
165
+ border-radius: var(--apple-radius-sm);
166
166
  background: var(--apple-button-background);
167
167
  color: var(--apple-control-primary-text);
168
168
  box-shadow: none;
@@ -14,10 +14,16 @@
14
14
  :root {
15
15
  --sl-mobile-toc-height: 0rem;
16
16
  }
17
- .main-frame {
18
- grid-template-columns: var(--apple-sidebar-width) minmax(0, 1fr) var(
19
- --apple-toc-width
20
- );
17
+ /* Starlight's columns are flex children inside the main frame. */
18
+ [data-has-sidebar][data-has-toc] .main-pane {
19
+ flex: 1;
20
+ width: calc(100% - var(--apple-toc-width));
21
+ min-width: 0;
22
+ --sl-content-margin-inline: auto;
23
+ }
24
+ .right-sidebar-container {
25
+ flex: 0 0 var(--apple-toc-width);
26
+ width: var(--apple-toc-width);
21
27
  }
22
28
  .main-pane main {
23
29
  margin-inline: auto;
@@ -36,11 +42,11 @@
36
42
  line-height: 2.25rem;
37
43
  }
38
44
  .sl-markdown-content h3:not(:where(.not-content *)) {
39
- font-size: 1.5rem;
45
+ font-size: 1.375rem;
40
46
  line-height: 1.75rem;
41
47
  }
42
48
  .sl-markdown-content h4:not(:where(.not-content *)) {
43
- font-size: 1.3125rem;
49
+ font-size: 1.125rem;
44
50
  line-height: 1.5625rem;
45
51
  }
46
52
  }
@@ -90,17 +96,20 @@
90
96
  line-height: 2rem;
91
97
  }
92
98
  .sl-markdown-content h3:not(:where(.not-content *)) {
93
- font-size: 1.3125rem;
99
+ font-size: 1.125rem;
94
100
  line-height: 1.5625rem;
95
101
  }
96
102
  .sl-markdown-content h4:not(:where(.not-content *)) {
97
- font-size: 1.1875rem;
103
+ font-size: 1.0625rem;
98
104
  line-height: 1.4375rem;
99
105
  }
100
106
  .pagination-links {
101
107
  grid-template-columns: 1fr;
102
108
  gap: 1rem;
103
109
  }
110
+ .pagination-links > a[rel="next"] {
111
+ grid-column: 1;
112
+ }
104
113
  .hero {
105
114
  gap: 2.5rem;
106
115
  padding-block: 3.5rem;
package/styles/search.css CHANGED
@@ -2,7 +2,7 @@ site-search > button {
2
2
  min-height: 2rem;
3
3
  border: 1px solid var(--apple-hairline);
4
4
  border-radius: var(--apple-radius-sm);
5
- background: transparent;
5
+ background: var(--apple-code-background);
6
6
  color: var(--apple-secondary-foreground);
7
7
  box-shadow: none;
8
8
  font-size: 0.8125rem;
@@ -4,14 +4,14 @@
4
4
  }
5
5
 
6
6
  .sidebar-content {
7
- padding-top: 1rem;
7
+ padding-top: 1.5rem;
8
8
  scrollbar-color: var(--apple-border) transparent;
9
9
  }
10
10
 
11
11
  .sidebar-content .top-level {
12
12
  display: flex;
13
13
  flex-direction: column;
14
- gap: 0.75rem;
14
+ gap: 1rem;
15
15
  }
16
16
  .sidebar-content .top-level > li {
17
17
  margin-block: 0;
@@ -76,10 +76,10 @@
76
76
  }
77
77
  .sidebar-content a[aria-current="page"] {
78
78
  background: var(--apple-active-surface);
79
- color: var(--apple-foreground);
79
+ color: var(--apple-link);
80
80
  font-weight: 500;
81
81
  }
82
82
  .sidebar-content a[aria-current="page"]:is(:hover, :focus-visible) {
83
83
  background: var(--apple-active-surface);
84
- color: var(--apple-foreground);
84
+ color: var(--apple-link);
85
85
  }
package/styles/toc.css CHANGED
@@ -6,6 +6,9 @@
6
6
  .right-sidebar-panel {
7
7
  padding-top: 2.5rem;
8
8
  }
9
+ .right-sidebar-panel .sl-container {
10
+ max-width: none;
11
+ }
9
12
  .right-sidebar h2 {
10
13
  margin-bottom: 0.625rem;
11
14
  color: var(--apple-foreground);
@@ -21,12 +24,16 @@
21
24
  padding-inline-start: 0.75rem;
22
25
  }
23
26
  .right-sidebar a {
24
- margin-block: 0.3125rem;
25
- padding: 0;
26
- border-inline-start: 0;
27
+ margin-block: 0;
28
+ padding: 0.25rem 0.75rem;
29
+ border-inline-start: 1px solid var(--apple-hairline);
27
30
  color: var(--apple-secondary-foreground);
28
31
  font-size: 0.875rem;
29
32
  line-height: 1.125rem;
33
+ overflow-wrap: anywhere;
34
+ }
35
+ .right-sidebar a span {
36
+ white-space: normal;
30
37
  }
31
38
  .right-sidebar a:hover {
32
39
  color: var(--apple-link);
@@ -37,7 +44,8 @@
37
44
  outline-offset: 2px;
38
45
  }
39
46
  .right-sidebar a[aria-current="true"] {
40
- color: var(--apple-foreground);
47
+ border-inline-start-color: var(--apple-link);
48
+ color: var(--apple-link);
41
49
  font-weight: 500;
42
50
  }
43
51
 
package/styles/tokens.css CHANGED
@@ -1,13 +1,13 @@
1
1
  :root {
2
2
  color-scheme: dark;
3
- --apple-background: #111;
4
- --apple-navigator-background: #161616;
3
+ --apple-background: #161617;
4
+ --apple-navigator-background: #1c1c1e;
5
5
  --apple-secondary-background: #1c1c1e;
6
6
  --apple-card-background: #1c1c1e;
7
7
  --apple-surface: #2a2a2a;
8
8
  --apple-hover-surface: rgba(0, 153, 255, 0.08);
9
- --apple-active-surface: rgba(255, 255, 255, 0.1);
10
- --apple-foreground: #fff;
9
+ --apple-active-surface: rgba(0, 153, 255, 0.14);
10
+ --apple-foreground: #f5f5f7;
11
11
  --apple-secondary-foreground: #ccc;
12
12
  --apple-tertiary-foreground: #999;
13
13
  --apple-hairline: rgba(255, 255, 255, 0.12);
@@ -22,7 +22,7 @@
22
22
  --apple-button-secondary-hover: #2a2a2a;
23
23
  --apple-control-primary-text: #fff;
24
24
  --apple-disabled-opacity: 0.42;
25
- --apple-header-background: rgba(17, 17, 17, 0.82);
25
+ --apple-header-background: rgba(22, 22, 23, 0.88);
26
26
  --apple-code-background: #1c1c1e;
27
27
  --apple-aside-background: #1c1c1e;
28
28
  --apple-note: #8e8e93;
@@ -36,11 +36,12 @@
36
36
  ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
37
37
  monospace;
38
38
  --apple-header-height: 3.25rem;
39
- --apple-sidebar-width: 18.5rem;
40
- --apple-toc-width: 12rem;
41
- --apple-content-width: 51.25rem;
39
+ --apple-sidebar-width: 17rem;
40
+ --apple-toc-width: 14rem;
41
+ --apple-content-width: 48rem;
42
42
  --apple-row-height: 2rem;
43
- --apple-radius-sm: 0.25rem;
43
+ --apple-radius-sm: 0.375rem;
44
+ --apple-radius-panel: 0.75rem;
44
45
  --apple-transition: 120ms ease;
45
46
  --apple-section-spacing: 2.5rem;
46
47
  --sl-font: var(--apple-font-sans);
@@ -83,16 +84,16 @@
83
84
  --apple-card-background: #f5f5f7;
84
85
  --apple-surface: #f0f0f0;
85
86
  --apple-hover-surface: rgba(51, 102, 255, 0.05);
86
- --apple-active-surface: rgba(0, 0, 0, 0.06);
87
- --apple-foreground: #000;
88
- --apple-secondary-foreground: #666;
87
+ --apple-active-surface: rgba(0, 102, 204, 0.08);
88
+ --apple-foreground: #1d1d1f;
89
+ --apple-secondary-foreground: #6e6e73;
89
90
  --apple-tertiary-foreground: #767676;
90
91
  --apple-hairline: rgba(0, 0, 0, 0.12);
91
92
  --apple-border: #ccc;
92
- --apple-link: #36f;
93
+ --apple-link: #0066cc;
93
94
  --apple-link-hover: #174ea6;
94
95
  --apple-focus: rgba(51, 102, 255, 0.24);
95
- --apple-button-background: #00f;
96
+ --apple-button-background: #0071e3;
96
97
  --apple-button-background-hover: #36f;
97
98
  --apple-button-background-active: #36f;
98
99
  --apple-button-secondary-background: #f7f7f7;
@@ -101,6 +102,9 @@
101
102
  --apple-header-background: rgba(255, 255, 255, 0.82);
102
103
  --apple-code-background: #f5f5f7;
103
104
  --apple-aside-background: #f5f5f7;
105
+ --apple-warning: #9a5700;
106
+ --apple-danger: #c7362c;
107
+ --apple-success: #21783b;
104
108
  --sl-color-accent-low: #e8f2ff;
105
109
  --sl-color-accent-high: #004b99;
106
110
  --sl-color-gray-1: #2c2c2e;