starlight-theme-apple 0.4.0 → 0.5.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": "starlight-theme-apple",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "An Apple Developer Documentation-inspired theme for Astro Starlight.",
5
5
  "keywords": [
6
6
  "starlight",
@@ -3,62 +3,77 @@
3
3
  display: inline-flex;
4
4
  align-items: center;
5
5
  justify-content: center;
6
- gap: 0.4rem;
7
- min-height: 2.25rem;
8
- padding: 0.45rem 0.875rem;
9
- border: 1px solid transparent;
10
- border-radius: var(--apple-radius-sm);
6
+ gap: 0.375rem;
7
+ min-width: 1.875rem;
8
+ min-height: 2.0625rem;
9
+ padding: 0.25rem 0.9375rem;
10
+ border: 0;
11
+ border-radius: 0.25rem;
11
12
  box-shadow: none;
12
- font-size: 0.875rem;
13
- font-weight: 600;
14
- line-height: 1.25rem;
13
+ font-size: 1.0625rem;
14
+ font-weight: 400;
15
+ line-height: 1.5625rem;
16
+ letter-spacing: normal;
15
17
  text-decoration: none;
18
+ cursor: pointer;
19
+ transition:
20
+ color var(--apple-transition),
21
+ background-color var(--apple-transition),
22
+ border-color var(--apple-transition),
23
+ box-shadow var(--apple-transition);
16
24
  }
17
25
  .sl-markdown-content .sl-link-button + .sl-link-button {
18
26
  margin-inline-start: 0.5rem;
19
27
  }
20
28
  .hero .sl-link-button {
21
- min-height: 2.5rem;
22
- padding: 0.55rem 1rem;
29
+ min-height: 2.0625rem;
30
+ padding: 0.25rem 0.9375rem;
23
31
  }
24
32
  .hero .sl-link-button svg,
25
33
  .sl-markdown-content .sl-link-button svg {
26
34
  flex-shrink: 0;
27
- font-size: 1.125rem;
35
+ font-size: 1rem;
28
36
  }
29
37
 
30
38
  :is(.hero, .sl-markdown-content) .sl-link-button.primary {
31
- border-color: var(--apple-link);
32
- background: var(--apple-link);
39
+ background: var(--apple-button-background);
33
40
  color: var(--apple-control-primary-text);
34
41
  }
35
42
  :is(.hero, .sl-markdown-content)
36
43
  .sl-link-button.primary:is(:hover, :focus-visible) {
37
- border-color: var(--apple-link-hover);
38
- background: var(--apple-link-hover);
44
+ background: var(--apple-button-background-hover);
39
45
  color: var(--apple-control-primary-text);
40
46
  text-decoration: none;
41
47
  }
48
+ :is(.hero, .sl-markdown-content) .sl-link-button.primary:active {
49
+ background: var(--apple-button-background-active);
50
+ }
42
51
  :is(.hero, .sl-markdown-content) .sl-link-button.secondary {
43
- border-color: var(--apple-border);
44
- background: transparent;
45
- color: var(--apple-foreground);
52
+ background: var(--apple-button-secondary-background);
53
+ color: var(--apple-link);
46
54
  }
47
55
  :is(.hero, .sl-markdown-content)
48
56
  .sl-link-button.secondary:is(:hover, :focus-visible) {
49
- background: var(--apple-active-surface);
50
- color: var(--apple-foreground);
57
+ background: var(--apple-button-secondary-hover);
58
+ color: var(--apple-link);
51
59
  text-decoration: none;
52
60
  }
53
61
  :is(.hero, .sl-markdown-content) .sl-link-button.minimal {
62
+ min-width: 0;
63
+ padding-inline: 0;
54
64
  background: transparent;
55
65
  color: var(--apple-link);
56
66
  }
57
67
  :is(.hero, .sl-markdown-content)
58
68
  .sl-link-button.minimal:is(:hover, :focus-visible) {
59
- background: var(--apple-hover-surface);
60
- color: var(--apple-link-hover);
61
- text-decoration: none;
69
+ background: transparent;
70
+ color: var(--apple-link);
71
+ text-decoration: underline;
72
+ text-underline-offset: 0.14em;
73
+ }
74
+ :is(.hero, .sl-markdown-content) .sl-link-button:focus-visible {
75
+ outline: 0;
76
+ box-shadow: 0 0 0 4px var(--apple-focus);
62
77
  }
63
78
 
64
79
  .sl-markdown-content starlight-tabs {
@@ -130,15 +145,41 @@
130
145
  line-height: 1;
131
146
  }
132
147
 
133
- .sl-markdown-content
134
- :is(input, select, textarea, button):not(:where(.not-content *)) {
148
+ .sl-markdown-content :is(input, select, textarea):not(:where(.not-content *)) {
135
149
  min-height: 2.25rem;
136
150
  border: 1px solid var(--apple-border);
137
- border-radius: var(--apple-radius-sm);
151
+ border-radius: 0.5rem;
138
152
  background: var(--apple-secondary-background);
139
153
  color: var(--apple-foreground);
140
154
  font: inherit;
141
155
  }
156
+ .sl-markdown-content button:not(:where(.not-content *)) {
157
+ min-width: 1.875rem;
158
+ min-height: 2.0625rem;
159
+ padding: 0.25rem 0.9375rem;
160
+ border: 0;
161
+ border-radius: 0.25rem;
162
+ background: var(--apple-button-background);
163
+ color: var(--apple-control-primary-text);
164
+ box-shadow: none;
165
+ font: inherit;
166
+ font-size: 1.0625rem;
167
+ font-weight: 400;
168
+ line-height: 1.5625rem;
169
+ cursor: pointer;
170
+ }
171
+ .sl-markdown-content
172
+ button:is(:hover, :focus-visible):not(:where(.not-content *)) {
173
+ background: var(--apple-button-background-hover);
174
+ }
175
+ .sl-markdown-content button:active:not(:where(.not-content *)) {
176
+ background: var(--apple-button-background-active);
177
+ box-shadow: none;
178
+ }
179
+ .sl-markdown-content button:focus-visible:not(:where(.not-content *)) {
180
+ outline: 0;
181
+ box-shadow: 0 0 0 4px var(--apple-focus);
182
+ }
142
183
  .sl-markdown-content :is(input, select, textarea):focus {
143
184
  border-color: var(--apple-link);
144
185
  box-shadow: 0 0 0 3px var(--apple-focus);
package/styles/tokens.css CHANGED
@@ -14,7 +14,12 @@
14
14
  --apple-link: #09f;
15
15
  --apple-link-hover: #40b3ff;
16
16
  --apple-focus: rgba(0, 153, 255, 0.35);
17
- --apple-control-primary-text: #000;
17
+ --apple-button-background: #06f;
18
+ --apple-button-background-hover: #09f;
19
+ --apple-button-background-active: #06f;
20
+ --apple-button-secondary-background: #161616;
21
+ --apple-button-secondary-hover: #2a2a2a;
22
+ --apple-control-primary-text: #fff;
18
23
  --apple-disabled-opacity: 0.42;
19
24
  --apple-header-background: rgba(17, 17, 17, 0.82);
20
25
  --apple-code-background: #1c1c1e;
@@ -85,6 +90,11 @@
85
90
  --apple-link: #36f;
86
91
  --apple-link-hover: #174ea6;
87
92
  --apple-focus: rgba(51, 102, 255, 0.24);
93
+ --apple-button-background: #00f;
94
+ --apple-button-background-hover: #36f;
95
+ --apple-button-background-active: #36f;
96
+ --apple-button-secondary-background: #f7f7f7;
97
+ --apple-button-secondary-hover: #f0f0f0;
88
98
  --apple-control-primary-text: #fff;
89
99
  --apple-header-background: rgba(255, 255, 255, 0.82);
90
100
  --apple-code-background: #f5f5f7;