starlight-theme-apple 0.7.0 → 0.9.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/CHANGELOG.md +37 -0
- package/README.md +47 -5
- package/components/Empty.astro +3 -0
- package/components/Footer.astro +19 -0
- package/components/Header.astro +55 -0
- package/components/NavLink.astro +24 -0
- package/components/PageFrame.astro +11 -0
- package/components/PageTitle.astro +24 -40
- package/components/Pagination.astro +22 -29
- package/components/Sidebar.astro +27 -0
- package/components/SiteFooter.astro +61 -0
- package/components/SocialIcons.astro +22 -0
- package/components.ts +10 -0
- package/index.ts +84 -120
- package/libs/breadcrumbs.ts +80 -0
- package/libs/config.ts +54 -0
- package/libs/expressive-code.ts +246 -0
- package/libs/links.ts +38 -0
- package/package.json +11 -5
- package/styles/base.css +35 -53
- package/styles/code.css +7 -83
- package/styles/components.css +599 -0
- package/styles/content.css +224 -425
- package/styles/header.css +217 -62
- package/styles/reference.css +332 -0
- package/styles/search.css +87 -73
- package/styles/sidebar.css +77 -56
- package/styles/toc.css +51 -44
- package/styles/tokens.css +130 -93
- package/styles.css +4 -4
- package/translations.ts +31 -0
- package/user-components/Availability.astro +21 -0
- package/user-components/Declaration.astro +16 -0
- package/user-components/Figure.astro +58 -0
- package/user-components/Parameter.astro +14 -0
- package/user-components/ParameterList.astro +11 -0
- package/user-components/ReferenceEntry.astro +12 -0
- package/user-components/ReferenceMeta.astro +30 -0
- package/user-components/TopicLink.astro +17 -0
- package/user-components/TopicList.astro +5 -0
- package/user-components/ValueList.astro +20 -0
- package/virtual.d.ts +10 -0
- package/styles/controls.css +0 -190
- package/styles/responsive.css +0 -157
package/styles/base.css
CHANGED
|
@@ -1,89 +1,69 @@
|
|
|
1
1
|
html {
|
|
2
|
-
|
|
3
|
-
text-
|
|
2
|
+
-webkit-text-size-adjust: 100%;
|
|
3
|
+
text-size-adjust: 100%;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
body {
|
|
7
7
|
background: var(--apple-background);
|
|
8
8
|
color: var(--apple-foreground);
|
|
9
9
|
font-family: var(--apple-font-sans);
|
|
10
|
-
font-size:
|
|
11
|
-
line-height:
|
|
10
|
+
font-size: var(--sl-text-body);
|
|
11
|
+
line-height: var(--sl-line-height);
|
|
12
|
+
letter-spacing: -0.022em;
|
|
12
13
|
-webkit-font-smoothing: antialiased;
|
|
13
14
|
-moz-osx-font-smoothing: grayscale;
|
|
15
|
+
font-synthesis-weight: none;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
::selection {
|
|
17
|
-
background: var(--apple-
|
|
19
|
+
background: color-mix(in srgb, var(--apple-link) 28%, transparent);
|
|
18
20
|
}
|
|
21
|
+
|
|
19
22
|
:focus-visible {
|
|
20
23
|
outline: 2px solid var(--apple-link);
|
|
21
|
-
outline-offset:
|
|
24
|
+
outline-offset: 2px;
|
|
22
25
|
}
|
|
23
26
|
|
|
24
|
-
a,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
select {
|
|
30
|
-
transition:
|
|
31
|
-
color var(--apple-transition),
|
|
32
|
-
background-color var(--apple-transition),
|
|
33
|
-
border-color var(--apple-transition),
|
|
34
|
-
box-shadow var(--apple-transition),
|
|
35
|
-
opacity var(--apple-transition);
|
|
27
|
+
:is(a, button, summary, select, input) {
|
|
28
|
+
transition-property:
|
|
29
|
+
color, background-color, border-color, box-shadow, opacity;
|
|
30
|
+
transition-duration: 160ms;
|
|
31
|
+
transition-timing-function: var(--apple-transition-easing);
|
|
36
32
|
}
|
|
37
33
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
opacity: var(--apple-disabled-opacity);
|
|
34
|
+
code,
|
|
35
|
+
kbd,
|
|
36
|
+
pre,
|
|
37
|
+
samp {
|
|
38
|
+
letter-spacing: normal;
|
|
44
39
|
}
|
|
45
40
|
|
|
46
|
-
.
|
|
47
|
-
.
|
|
48
|
-
background: var(--apple-background);
|
|
49
|
-
}
|
|
50
|
-
.main-pane,
|
|
51
|
-
.main-pane main {
|
|
52
|
-
min-width: 0;
|
|
53
|
-
}
|
|
54
|
-
.content-panel {
|
|
55
|
-
padding-block: 0;
|
|
56
|
-
}
|
|
57
|
-
.content-panel + .content-panel,
|
|
58
|
-
.main-pane > main > .content-panel:last-of-type {
|
|
41
|
+
/* Starlight’s panels stack in one column; Apple pages flow without dividing rules. */
|
|
42
|
+
.content-panel + .content-panel {
|
|
59
43
|
border-top: 0;
|
|
60
44
|
}
|
|
61
|
-
.
|
|
62
|
-
|
|
45
|
+
.main-pane main {
|
|
46
|
+
padding-bottom: 5rem;
|
|
63
47
|
}
|
|
64
48
|
|
|
65
49
|
.sl-banner {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
margin-inline: 0;
|
|
70
|
-
padding: 0.875rem var(--sl-content-pad-x);
|
|
71
|
-
border-block: 1px solid var(--apple-border);
|
|
72
|
-
background: var(--apple-aside-background);
|
|
73
|
-
box-shadow: none;
|
|
50
|
+
padding: 0.75rem var(--sl-content-pad-x);
|
|
51
|
+
border-bottom: 1px solid var(--apple-hairline);
|
|
52
|
+
background: var(--apple-secondary-background);
|
|
74
53
|
color: var(--apple-foreground);
|
|
75
|
-
|
|
54
|
+
font-size: 0.9375rem;
|
|
55
|
+
line-height: 1.4;
|
|
56
|
+
text-align: center;
|
|
76
57
|
}
|
|
77
58
|
.sl-banner a {
|
|
78
59
|
color: var(--apple-link);
|
|
79
60
|
}
|
|
80
61
|
|
|
81
62
|
.sl-skip-link {
|
|
82
|
-
border:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.16);
|
|
63
|
+
border-radius: var(--apple-radius-sm);
|
|
64
|
+
background: var(--apple-button-background);
|
|
65
|
+
color: var(--apple-button-foreground);
|
|
66
|
+
font-size: 0.875rem;
|
|
87
67
|
}
|
|
88
68
|
|
|
89
69
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -92,5 +72,7 @@ select:disabled {
|
|
|
92
72
|
*::after {
|
|
93
73
|
scroll-behavior: auto !important;
|
|
94
74
|
transition-duration: 0.01ms !important;
|
|
75
|
+
animation-duration: 0.01ms !important;
|
|
76
|
+
animation-iteration-count: 1 !important;
|
|
95
77
|
}
|
|
96
78
|
}
|
package/styles/code.css
CHANGED
|
@@ -1,88 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
border: 0;
|
|
4
|
-
border-radius: 0;
|
|
5
|
-
background: transparent;
|
|
6
|
-
color: inherit;
|
|
7
|
-
font-family: var(--apple-font-mono);
|
|
8
|
-
font-size: 0.88em;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.expressive-code {
|
|
12
|
-
--ec-brdRad: var(--apple-radius-panel);
|
|
13
|
-
--ec-brdWd: 1px;
|
|
1
|
+
/* Code blocks are styled through Expressive Code’s `styleOverrides` (see libs/expressive-code.ts). */
|
|
2
|
+
.sl-markdown-content .expressive-code {
|
|
14
3
|
margin-block: 1.5rem;
|
|
15
4
|
}
|
|
16
|
-
.expressive-code
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
min-height: 2.25rem;
|
|
21
|
-
border-color: var(--apple-hairline) !important;
|
|
22
|
-
background: var(--apple-code-background) !important;
|
|
23
|
-
}
|
|
24
|
-
.expressive-code .frame .title {
|
|
25
|
-
color: var(--apple-secondary-foreground) !important;
|
|
26
|
-
font-family: var(--apple-font-sans) !important;
|
|
27
|
-
font-size: 0.8125rem !important;
|
|
28
|
-
font-weight: 500 !important;
|
|
5
|
+
.expressive-code .frame.has-title:not(.is-terminal) .title,
|
|
6
|
+
.expressive-code .frame.is-terminal .title {
|
|
7
|
+
font-weight: 600;
|
|
8
|
+
letter-spacing: -0.008em;
|
|
29
9
|
}
|
|
30
10
|
.expressive-code pre {
|
|
31
|
-
|
|
32
|
-
background: var(--apple-code-background) !important;
|
|
33
|
-
}
|
|
34
|
-
.expressive-code pre code {
|
|
35
|
-
font-size: 0.9375rem !important;
|
|
36
|
-
line-height: 1.5625rem !important;
|
|
37
|
-
}
|
|
38
|
-
.expressive-code .copy button {
|
|
39
|
-
border-color: var(--apple-hairline) !important;
|
|
40
|
-
border-radius: 0.5rem !important;
|
|
41
|
-
background: var(--apple-secondary-background) !important;
|
|
42
|
-
color: var(--apple-secondary-foreground) !important;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.sl-markdown-content kbd:not(:where(.not-content *)) {
|
|
46
|
-
display: inline-flex;
|
|
47
|
-
align-items: center;
|
|
48
|
-
min-height: 1.5rem;
|
|
49
|
-
padding-inline: 0.4rem;
|
|
50
|
-
border: 1px solid var(--apple-border);
|
|
51
|
-
border-bottom-width: 2px;
|
|
52
|
-
border-radius: 0.35rem;
|
|
53
|
-
background: var(--apple-secondary-background);
|
|
54
|
-
color: var(--apple-secondary-foreground);
|
|
55
|
-
font-family: var(--apple-font-sans);
|
|
56
|
-
font-size: 0.8125rem;
|
|
57
|
-
line-height: 1;
|
|
58
|
-
vertical-align: 0.08em;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.sl-markdown-content mark:not(:where(.not-content *)) {
|
|
62
|
-
padding-inline: 0.15em;
|
|
63
|
-
border-radius: 0.2em;
|
|
64
|
-
background: color-mix(in srgb, var(--apple-warning) 28%, transparent);
|
|
65
|
-
color: var(--apple-foreground);
|
|
66
|
-
}
|
|
67
|
-
.expressive-code .copy button:is(:hover, :focus-visible) {
|
|
68
|
-
border-color: var(--apple-border) !important;
|
|
69
|
-
background: var(--apple-active-surface) !important;
|
|
70
|
-
color: var(--apple-foreground) !important;
|
|
71
|
-
}
|
|
72
|
-
.sl-markdown-content starlight-file-tree {
|
|
73
|
-
display: block;
|
|
74
|
-
margin-block: 1.5rem;
|
|
75
|
-
padding: 1rem;
|
|
76
|
-
border: 1px solid var(--apple-hairline);
|
|
77
|
-
border-radius: 0.75rem;
|
|
78
|
-
background: var(--apple-code-background);
|
|
79
|
-
}
|
|
80
|
-
.sl-markdown-content starlight-file-tree .tree-entry {
|
|
81
|
-
min-height: 1.75rem;
|
|
82
|
-
}
|
|
83
|
-
.sl-markdown-content starlight-file-tree .tree-icon {
|
|
84
|
-
color: var(--apple-tertiary-foreground);
|
|
85
|
-
}
|
|
86
|
-
.sl-markdown-content starlight-file-tree .comment {
|
|
87
|
-
color: var(--apple-tertiary-foreground);
|
|
11
|
+
scrollbar-width: thin;
|
|
88
12
|
}
|