@nyxwire/css 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +133 -2
- package/dist/base.css +850 -0
- package/dist/components.css +10508 -0
- package/dist/docs/components/accordion.md +83 -0
- package/dist/docs/components/alert.md +52 -0
- package/dist/docs/components/avatar.md +55 -0
- package/dist/docs/components/badge.md +64 -0
- package/dist/docs/components/breadcrumbs.md +64 -0
- package/dist/docs/components/button.md +197 -0
- package/dist/docs/components/card.md +103 -0
- package/dist/docs/components/checkbox.md +45 -0
- package/dist/docs/components/chip.md +30 -0
- package/dist/docs/components/cluster.md +33 -0
- package/dist/docs/components/code.md +65 -0
- package/dist/docs/components/container.md +24 -0
- package/dist/docs/components/dialog.md +199 -0
- package/dist/docs/components/divider.md +31 -0
- package/dist/docs/components/dl.md +24 -0
- package/dist/docs/components/effect-utilities.md +82 -0
- package/dist/docs/components/empty.md +40 -0
- package/dist/docs/components/frame.md +27 -0
- package/dist/docs/components/grid.md +31 -0
- package/dist/docs/components/hud.md +75 -0
- package/dist/docs/components/input-group.md +28 -0
- package/dist/docs/components/input.md +52 -0
- package/dist/docs/components/kbd.md +42 -0
- package/dist/docs/components/label-and-field.md +31 -0
- package/dist/docs/components/link.md +41 -0
- package/dist/docs/components/list.md +67 -0
- package/dist/docs/components/menu.md +85 -0
- package/dist/docs/components/meter.md +77 -0
- package/dist/docs/components/navbar.md +66 -0
- package/dist/docs/components/pagination.md +64 -0
- package/dist/docs/components/popover.md +59 -0
- package/dist/docs/components/progress.md +32 -0
- package/dist/docs/components/prose.md +29 -0
- package/dist/docs/components/select.md +51 -0
- package/dist/docs/components/sidebar.md +35 -0
- package/dist/docs/components/sidenav.md +45 -0
- package/dist/docs/components/skeleton.md +36 -0
- package/dist/docs/components/slider.md +32 -0
- package/dist/docs/components/spinner.md +30 -0
- package/dist/docs/components/stack.md +26 -0
- package/dist/docs/components/steps.md +49 -0
- package/dist/docs/components/switch.md +19 -0
- package/dist/docs/components/table.md +83 -0
- package/dist/docs/components/tabs.md +207 -0
- package/dist/docs/components/textarea.md +13 -0
- package/dist/docs/components/toast.md +86 -0
- package/dist/docs/components/tooltip.md +39 -0
- package/dist/docs/components/typography-classes.md +38 -0
- package/dist/docs/families/data-display.md +15 -0
- package/dist/docs/families/feedback.md +13 -0
- package/dist/docs/families/forms.md +141 -0
- package/dist/docs/families/layout-typography.md +17 -0
- package/dist/docs/families/navigation.md +13 -0
- package/dist/docs/families/overlays.md +13 -0
- package/dist/docs/families/surfaces.md +11 -0
- package/dist/docs/foundations/accessibility.md +71 -0
- package/dist/docs/foundations/color-roles.md +114 -0
- package/dist/docs/foundations/effects-motion.md +150 -0
- package/dist/docs/foundations/flavors.md +156 -0
- package/dist/docs/foundations/icons.md +45 -0
- package/dist/docs/foundations/palette.md +180 -0
- package/dist/docs/foundations/spacing-elevation.md +168 -0
- package/dist/docs/foundations/typography.md +80 -0
- package/dist/docs/index.md +233 -0
- package/dist/docs/manifest.json +859 -0
- package/dist/fonts/inter-OFL.txt +93 -0
- package/dist/fonts/inter-latin-ext-wght-italic.woff2 +0 -0
- package/dist/fonts/inter-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/inter-latin-wght-italic.woff2 +0 -0
- package/dist/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/martian-mono-OFL.txt +93 -0
- package/dist/fonts/martian-mono-latin-ext-wdth-normal.woff2 +0 -0
- package/dist/fonts/martian-mono-latin-wdth-normal.woff2 +0 -0
- package/dist/fonts/space-grotesk-OFL.txt +93 -0
- package/dist/fonts/space-grotesk-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/space-grotesk-latin-wght-normal.woff2 +0 -0
- package/dist/fonts.css +73 -0
- package/dist/nyxwire.css +12183 -0
- package/dist/tokens.css +579 -0
- package/dist/utilities.css +176 -0
- package/nyxwire.d.ts +2 -0
- package/package.json +66 -3
- package/skills/nyxwire/SKILL.md +63 -0
- package/src/base.css +158 -0
- package/src/components/accordion.css +280 -0
- package/src/components/alert.css +176 -0
- package/src/components/avatar.css +262 -0
- package/src/components/badge.css +193 -0
- package/src/components/breadcrumbs.css +209 -0
- package/src/components/btn.css +517 -0
- package/src/components/card.css +327 -0
- package/src/components/checkbox.css +202 -0
- package/src/components/chip.css +345 -0
- package/src/components/code.css +340 -0
- package/src/components/dialog.css +411 -0
- package/src/components/divider.css +201 -0
- package/src/components/empty.css +216 -0
- package/src/components/field.css +161 -0
- package/src/components/hud.css +212 -0
- package/src/components/index.css +50 -0
- package/src/components/input.css +383 -0
- package/src/components/kbd.css +197 -0
- package/src/components/layout.css +344 -0
- package/src/components/link.css +178 -0
- package/src/components/list.css +353 -0
- package/src/components/menu.css +347 -0
- package/src/components/meter.css +238 -0
- package/src/components/navbar.css +309 -0
- package/src/components/pagination.css +302 -0
- package/src/components/popover.css +352 -0
- package/src/components/progress.css +241 -0
- package/src/components/select.css +121 -0
- package/src/components/sidenav.css +326 -0
- package/src/components/skeleton.css +193 -0
- package/src/components/slider.css +201 -0
- package/src/components/spinner.css +200 -0
- package/src/components/stat.css +263 -0
- package/src/components/steps.css +311 -0
- package/src/components/switch.css +183 -0
- package/src/components/table.css +290 -0
- package/src/components/tabs.css +271 -0
- package/src/components/toast.css +413 -0
- package/src/components/tooltip.css +288 -0
- package/src/fonts.css +92 -0
- package/src/index.css +6 -0
- package/src/motion.css +177 -0
- package/src/semantic.css +85 -0
- package/src/tokens.css +276 -0
- package/src/typography.css +430 -0
- package/src/utilities.css +198 -0
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
/* Layout primitives: container, stack, cluster, grid, sidebar, center, frame, spacer and the app
|
|
2
|
+
shell. They only place boxes; the gaps and widths come from the space tokens, and each one
|
|
3
|
+
takes a public --nw-* input where a measure has to vary per page. */
|
|
4
|
+
@layer components {
|
|
5
|
+
/* Container: a centered column with gutters. */
|
|
6
|
+
.nw-container {
|
|
7
|
+
--_max: var(--nw-container-max, 72rem);
|
|
8
|
+
--_gutter: var(--nw-container-pad, var(--nw-space-4));
|
|
9
|
+
inline-size: min(var(--_max), 100% - 2 * var(--_gutter));
|
|
10
|
+
margin-inline: auto;
|
|
11
|
+
}
|
|
12
|
+
.nw-container-xs {
|
|
13
|
+
--_max: var(--nw-container-max, 32rem);
|
|
14
|
+
}
|
|
15
|
+
.nw-container-sm {
|
|
16
|
+
--_max: var(--nw-container-max, 40rem);
|
|
17
|
+
}
|
|
18
|
+
.nw-container-md {
|
|
19
|
+
--_max: var(--nw-container-max, 56rem);
|
|
20
|
+
}
|
|
21
|
+
.nw-container-lg {
|
|
22
|
+
--_max: var(--nw-container-max, 72rem);
|
|
23
|
+
}
|
|
24
|
+
.nw-container-xl {
|
|
25
|
+
--_max: var(--nw-container-max, 90rem);
|
|
26
|
+
}
|
|
27
|
+
.nw-container-prose {
|
|
28
|
+
--_max: var(--nw-container-max, 68ch);
|
|
29
|
+
}
|
|
30
|
+
.nw-container-fluid {
|
|
31
|
+
--_max: 100%;
|
|
32
|
+
}
|
|
33
|
+
.nw-container-start {
|
|
34
|
+
margin-inline-start: 0;
|
|
35
|
+
}
|
|
36
|
+
@media (min-width: 40rem) {
|
|
37
|
+
.nw-container {
|
|
38
|
+
--_gutter: var(--nw-container-pad, var(--nw-space-6));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
@media (min-width: 64rem) {
|
|
42
|
+
.nw-container {
|
|
43
|
+
--_gutter: var(--nw-container-pad, var(--nw-space-8));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
.nw-container-flush {
|
|
47
|
+
--_gutter: 0px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* Stack: a column of boxes. */
|
|
51
|
+
.nw-stack {
|
|
52
|
+
--_gap: var(--nw-space-4);
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
gap: var(--_gap);
|
|
56
|
+
min-inline-size: 0;
|
|
57
|
+
}
|
|
58
|
+
.nw-stack-split > :last-child {
|
|
59
|
+
margin-block-start: auto;
|
|
60
|
+
}
|
|
61
|
+
.nw-stack-start {
|
|
62
|
+
align-items: flex-start;
|
|
63
|
+
}
|
|
64
|
+
.nw-stack-center {
|
|
65
|
+
align-items: center;
|
|
66
|
+
}
|
|
67
|
+
.nw-stack-end {
|
|
68
|
+
align-items: flex-end;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/* Cluster: a wrapping row of boxes. */
|
|
72
|
+
.nw-cluster {
|
|
73
|
+
--_gap: var(--nw-space-3);
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-wrap: wrap;
|
|
76
|
+
gap: var(--_gap);
|
|
77
|
+
align-items: center;
|
|
78
|
+
min-inline-size: 0;
|
|
79
|
+
}
|
|
80
|
+
.nw-cluster-start {
|
|
81
|
+
justify-content: flex-start;
|
|
82
|
+
}
|
|
83
|
+
.nw-cluster-center {
|
|
84
|
+
justify-content: center;
|
|
85
|
+
}
|
|
86
|
+
.nw-cluster-end {
|
|
87
|
+
justify-content: flex-end;
|
|
88
|
+
}
|
|
89
|
+
.nw-cluster-between {
|
|
90
|
+
justify-content: space-between;
|
|
91
|
+
}
|
|
92
|
+
.nw-cluster-baseline {
|
|
93
|
+
align-items: baseline;
|
|
94
|
+
}
|
|
95
|
+
.nw-cluster-top {
|
|
96
|
+
align-items: flex-start;
|
|
97
|
+
}
|
|
98
|
+
.nw-cluster-nowrap {
|
|
99
|
+
flex-wrap: nowrap;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Grid: as many columns as fit --nw-grid-min, or a fixed count that folds on narrow screens. */
|
|
103
|
+
.nw-grid {
|
|
104
|
+
--_gap: var(--nw-space-6);
|
|
105
|
+
--_min: var(--nw-grid-min, 16rem);
|
|
106
|
+
display: grid;
|
|
107
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--_min)), 1fr));
|
|
108
|
+
gap: var(--_gap);
|
|
109
|
+
min-inline-size: 0;
|
|
110
|
+
}
|
|
111
|
+
.nw-grid-fill {
|
|
112
|
+
grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--_min)), 1fr));
|
|
113
|
+
}
|
|
114
|
+
.nw-grid-2 {
|
|
115
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
116
|
+
}
|
|
117
|
+
.nw-grid-3 {
|
|
118
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
119
|
+
}
|
|
120
|
+
.nw-grid-4 {
|
|
121
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
122
|
+
}
|
|
123
|
+
.nw-grid-6 {
|
|
124
|
+
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
125
|
+
}
|
|
126
|
+
.nw-grid-dense {
|
|
127
|
+
grid-auto-flow: dense;
|
|
128
|
+
}
|
|
129
|
+
.nw-grid-start {
|
|
130
|
+
align-items: start;
|
|
131
|
+
}
|
|
132
|
+
.nw-grid-center {
|
|
133
|
+
align-items: center;
|
|
134
|
+
}
|
|
135
|
+
.nw-span-2 {
|
|
136
|
+
grid-column: span 2;
|
|
137
|
+
}
|
|
138
|
+
.nw-span-3 {
|
|
139
|
+
grid-column: span 3;
|
|
140
|
+
}
|
|
141
|
+
.nw-span-full {
|
|
142
|
+
grid-column: 1 / -1;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Gap sizes, shared by stack, cluster and grid. */
|
|
146
|
+
:is(.nw-stack, .nw-cluster, .nw-grid).nw-gap-none {
|
|
147
|
+
--_gap: 0;
|
|
148
|
+
}
|
|
149
|
+
:is(.nw-stack-xs, .nw-cluster-xs, .nw-grid-xs) {
|
|
150
|
+
--_gap: var(--nw-space-1);
|
|
151
|
+
}
|
|
152
|
+
:is(.nw-stack-sm, .nw-cluster-sm, .nw-grid-sm) {
|
|
153
|
+
--_gap: var(--nw-space-2);
|
|
154
|
+
}
|
|
155
|
+
:is(.nw-stack-md, .nw-cluster-md, .nw-grid-md) {
|
|
156
|
+
--_gap: var(--nw-space-4);
|
|
157
|
+
}
|
|
158
|
+
:is(.nw-stack-lg, .nw-cluster-lg, .nw-grid-lg) {
|
|
159
|
+
--_gap: var(--nw-space-6);
|
|
160
|
+
}
|
|
161
|
+
:is(.nw-stack-xl, .nw-cluster-xl, .nw-grid-xl) {
|
|
162
|
+
--_gap: var(--nw-space-10);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Sidebar: a fixed-measure aside beside content that takes the rest, stacking when the content
|
|
166
|
+
would fall under half the width. */
|
|
167
|
+
.nw-sidebar {
|
|
168
|
+
--_gap: var(--nw-space-6);
|
|
169
|
+
--_size: var(--nw-sidebar-size, 16rem);
|
|
170
|
+
display: flex;
|
|
171
|
+
flex-wrap: wrap;
|
|
172
|
+
gap: var(--_gap);
|
|
173
|
+
align-items: stretch;
|
|
174
|
+
}
|
|
175
|
+
.nw-sidebar > :first-child {
|
|
176
|
+
flex: 1 1 var(--_size);
|
|
177
|
+
}
|
|
178
|
+
.nw-sidebar > :last-child {
|
|
179
|
+
flex: 999 1 0;
|
|
180
|
+
min-inline-size: 50%;
|
|
181
|
+
}
|
|
182
|
+
.nw-sidebar-end > :first-child {
|
|
183
|
+
flex: 999 1 0;
|
|
184
|
+
min-inline-size: 50%;
|
|
185
|
+
}
|
|
186
|
+
.nw-sidebar-end > :last-child {
|
|
187
|
+
flex: 1 1 var(--_size);
|
|
188
|
+
min-inline-size: 0;
|
|
189
|
+
}
|
|
190
|
+
.nw-sidebar-top {
|
|
191
|
+
align-items: flex-start;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Center: a measure-limited, centered block. */
|
|
195
|
+
.nw-center {
|
|
196
|
+
box-sizing: content-box;
|
|
197
|
+
max-inline-size: var(--nw-center-max, 60ch);
|
|
198
|
+
margin-inline: auto;
|
|
199
|
+
}
|
|
200
|
+
.nw-center-text {
|
|
201
|
+
text-align: center;
|
|
202
|
+
}
|
|
203
|
+
.nw-center-intrinsic {
|
|
204
|
+
display: flex;
|
|
205
|
+
flex-direction: column;
|
|
206
|
+
align-items: center;
|
|
207
|
+
}
|
|
208
|
+
.nw-center-xy {
|
|
209
|
+
display: grid;
|
|
210
|
+
place-items: center;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.nw-spacer {
|
|
214
|
+
flex: 1;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Frame: a box with a fixed ratio whose media covers it. */
|
|
218
|
+
.nw-frame {
|
|
219
|
+
display: grid;
|
|
220
|
+
place-items: center;
|
|
221
|
+
aspect-ratio: var(--nw-frame-ratio, 16 / 9);
|
|
222
|
+
overflow: hidden;
|
|
223
|
+
border-radius: var(--nw-radius-md);
|
|
224
|
+
}
|
|
225
|
+
.nw-frame > :is(img, video, picture, canvas, iframe) {
|
|
226
|
+
inline-size: 100%;
|
|
227
|
+
block-size: 100%;
|
|
228
|
+
object-fit: cover;
|
|
229
|
+
}
|
|
230
|
+
.nw-frame-square {
|
|
231
|
+
--nw-frame-ratio: 1;
|
|
232
|
+
}
|
|
233
|
+
.nw-frame-portrait {
|
|
234
|
+
--nw-frame-ratio: 3 / 4;
|
|
235
|
+
}
|
|
236
|
+
.nw-frame-wide {
|
|
237
|
+
--nw-frame-ratio: 21 / 9;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* Shell: navbar on top, sidenav at the side, main content, optional footer. Under 48rem the side
|
|
241
|
+
leaves the grid and comes back as an overlay when its data-state is open. */
|
|
242
|
+
.nw-shell {
|
|
243
|
+
display: grid;
|
|
244
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
245
|
+
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
246
|
+
grid-template-areas:
|
|
247
|
+
'nav nav'
|
|
248
|
+
'side main'
|
|
249
|
+
'foot foot';
|
|
250
|
+
min-block-size: 100dvh;
|
|
251
|
+
}
|
|
252
|
+
.nw-shell-side-end {
|
|
253
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
254
|
+
grid-template-areas:
|
|
255
|
+
'nav nav'
|
|
256
|
+
'main side'
|
|
257
|
+
'foot foot';
|
|
258
|
+
}
|
|
259
|
+
.nw-shell-nav {
|
|
260
|
+
grid-area: nav;
|
|
261
|
+
}
|
|
262
|
+
.nw-shell-side {
|
|
263
|
+
grid-area: side;
|
|
264
|
+
display: flex;
|
|
265
|
+
flex-direction: column;
|
|
266
|
+
min-block-size: 0;
|
|
267
|
+
}
|
|
268
|
+
.nw-shell-side > * {
|
|
269
|
+
flex: 1;
|
|
270
|
+
}
|
|
271
|
+
.nw-shell-main {
|
|
272
|
+
grid-area: main;
|
|
273
|
+
min-inline-size: 0;
|
|
274
|
+
padding: var(--nw-space-6);
|
|
275
|
+
}
|
|
276
|
+
.nw-shell-foot {
|
|
277
|
+
grid-area: foot;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@media (max-width: 48rem) {
|
|
281
|
+
.nw-grid-3,
|
|
282
|
+
.nw-grid-4 {
|
|
283
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
284
|
+
}
|
|
285
|
+
.nw-grid-6 {
|
|
286
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
287
|
+
}
|
|
288
|
+
.nw-shell,
|
|
289
|
+
.nw-shell-side-end {
|
|
290
|
+
grid-template-columns: minmax(0, 1fr);
|
|
291
|
+
grid-template-areas:
|
|
292
|
+
'nav'
|
|
293
|
+
'main'
|
|
294
|
+
'foot';
|
|
295
|
+
}
|
|
296
|
+
.nw-shell-side {
|
|
297
|
+
display: none;
|
|
298
|
+
}
|
|
299
|
+
.nw-shell-side:is([data-state='open'], .nw-shell-side-open) {
|
|
300
|
+
position: fixed;
|
|
301
|
+
inset: 0 auto 0 0;
|
|
302
|
+
z-index: var(--nw-z-overlay);
|
|
303
|
+
display: flex;
|
|
304
|
+
max-inline-size: calc(100vw - var(--nw-space-12));
|
|
305
|
+
box-shadow: var(--nw-shadow-lg);
|
|
306
|
+
animation: nw-slide-in-from-left var(--nw-duration-base) var(--nw-ease-out);
|
|
307
|
+
--nw-slide-distance: 100%;
|
|
308
|
+
}
|
|
309
|
+
.nw-shell-side-end .nw-shell-side:is([data-state='open'], .nw-shell-side-open) {
|
|
310
|
+
inset: 0 0 0 auto;
|
|
311
|
+
animation-name: nw-slide-in-from-right;
|
|
312
|
+
}
|
|
313
|
+
.nw-shell-main {
|
|
314
|
+
padding: var(--nw-space-4);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
@media (max-width: 40rem) {
|
|
318
|
+
.nw-grid-2,
|
|
319
|
+
.nw-grid-3,
|
|
320
|
+
.nw-grid-4 {
|
|
321
|
+
grid-template-columns: minmax(0, 1fr);
|
|
322
|
+
}
|
|
323
|
+
.nw-grid-6 {
|
|
324
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
325
|
+
}
|
|
326
|
+
.nw-span-2,
|
|
327
|
+
.nw-span-3 {
|
|
328
|
+
grid-column: 1 / -1;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
@media (prefers-reduced-motion: reduce) {
|
|
333
|
+
:is(.nw-shell, .nw-shell-side-end) .nw-shell-side:is([data-state='open'], .nw-shell-side-open) {
|
|
334
|
+
animation-name: nw-fade-in;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
@media (forced-colors: active) {
|
|
339
|
+
.nw-shell-side:is([data-state='open'], .nw-shell-side-open) {
|
|
340
|
+
border-inline-end: 1px solid CanvasText;
|
|
341
|
+
box-shadow: none;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/* Link: inline text link on <a> or <button>. Intents recolor it; variants change how much it
|
|
2
|
+
announces itself; sizes set the font size for a link that stands alone. */
|
|
3
|
+
@layer components {
|
|
4
|
+
.nw-link {
|
|
5
|
+
--_intent: var(--nw-link);
|
|
6
|
+
display: inline;
|
|
7
|
+
gap: var(--nw-space-1);
|
|
8
|
+
align-items: center;
|
|
9
|
+
padding: 0;
|
|
10
|
+
border: 0;
|
|
11
|
+
border-radius: var(--nw-radius-xs);
|
|
12
|
+
font: inherit;
|
|
13
|
+
font-weight: 500;
|
|
14
|
+
color: var(--_intent);
|
|
15
|
+
text-decoration-line: underline;
|
|
16
|
+
text-decoration-thickness: 1px;
|
|
17
|
+
text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
|
|
18
|
+
text-underline-offset: 0.2em;
|
|
19
|
+
background: none;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
transition:
|
|
22
|
+
color var(--nw-duration-fast) var(--nw-ease-standard),
|
|
23
|
+
text-decoration-color var(--nw-duration-fast) var(--nw-ease-standard),
|
|
24
|
+
text-shadow var(--nw-duration-fast) var(--nw-ease-standard);
|
|
25
|
+
}
|
|
26
|
+
.nw-link:hover {
|
|
27
|
+
text-decoration-color: currentColor;
|
|
28
|
+
}
|
|
29
|
+
.nw-link:active {
|
|
30
|
+
color: color-mix(in oklab, var(--_intent) 80%, var(--nw-fg));
|
|
31
|
+
}
|
|
32
|
+
.nw-link:focus-visible {
|
|
33
|
+
outline: var(--nw-ring-width) solid var(--nw-ring);
|
|
34
|
+
outline-offset: var(--nw-ring-offset);
|
|
35
|
+
text-decoration-line: none;
|
|
36
|
+
}
|
|
37
|
+
.nw-link:is([aria-disabled='true'], :disabled, .nw-link-disabled) {
|
|
38
|
+
color: var(--nw-fg-disabled);
|
|
39
|
+
text-decoration-line: none;
|
|
40
|
+
text-shadow: none;
|
|
41
|
+
pointer-events: none;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Intents */
|
|
45
|
+
.nw-link-primary {
|
|
46
|
+
--_intent: var(--nw-primary);
|
|
47
|
+
}
|
|
48
|
+
.nw-link-secondary {
|
|
49
|
+
--_intent: var(--nw-secondary);
|
|
50
|
+
}
|
|
51
|
+
.nw-link-tertiary {
|
|
52
|
+
--_intent: var(--nw-tertiary);
|
|
53
|
+
}
|
|
54
|
+
.nw-link-neutral {
|
|
55
|
+
--_intent: var(--nw-fg);
|
|
56
|
+
}
|
|
57
|
+
.nw-link-info {
|
|
58
|
+
--_intent: var(--nw-info);
|
|
59
|
+
}
|
|
60
|
+
.nw-link-success {
|
|
61
|
+
--_intent: var(--nw-success);
|
|
62
|
+
}
|
|
63
|
+
.nw-link-warning {
|
|
64
|
+
--_intent: var(--nw-warning);
|
|
65
|
+
}
|
|
66
|
+
.nw-link-danger {
|
|
67
|
+
--_intent: var(--nw-danger);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Variants. subtle: muted until hovered. quiet: colored, underlined on hover only.
|
|
71
|
+
inherit: the surrounding ink, for links inside headings and labels. */
|
|
72
|
+
.nw-link-subtle {
|
|
73
|
+
--_intent: var(--nw-fg-muted);
|
|
74
|
+
text-decoration-color: transparent;
|
|
75
|
+
}
|
|
76
|
+
.nw-link-subtle:hover {
|
|
77
|
+
color: var(--nw-fg);
|
|
78
|
+
text-decoration-color: currentColor;
|
|
79
|
+
}
|
|
80
|
+
.nw-link-quiet {
|
|
81
|
+
text-decoration-color: transparent;
|
|
82
|
+
}
|
|
83
|
+
.nw-link-quiet:hover {
|
|
84
|
+
text-decoration-color: currentColor;
|
|
85
|
+
}
|
|
86
|
+
.nw-link-inherit {
|
|
87
|
+
--_intent: currentColor;
|
|
88
|
+
color: inherit;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* Navigation link: a block in a bar or list, no underline, current page in the intent ink. */
|
|
92
|
+
.nw-link-nav {
|
|
93
|
+
display: inline-flex;
|
|
94
|
+
padding: var(--nw-space-1-5) var(--nw-space-2-5);
|
|
95
|
+
border-radius: var(--nw-radius-sm);
|
|
96
|
+
color: var(--nw-fg-muted);
|
|
97
|
+
text-decoration-line: none;
|
|
98
|
+
transition:
|
|
99
|
+
color var(--nw-duration-fast) var(--nw-ease-standard),
|
|
100
|
+
background-color var(--nw-duration-fast) var(--nw-ease-standard);
|
|
101
|
+
}
|
|
102
|
+
.nw-link-nav:hover {
|
|
103
|
+
color: var(--nw-fg);
|
|
104
|
+
background-color: var(--nw-panel);
|
|
105
|
+
}
|
|
106
|
+
.nw-link-nav:is([aria-current='page'], [aria-current='true'], .nw-link-active) {
|
|
107
|
+
color: color-mix(in oklab, var(--_intent) var(--nw-soft-ink), var(--nw-fg));
|
|
108
|
+
background-color: color-mix(in oklab, var(--_intent) 16%, transparent);
|
|
109
|
+
}
|
|
110
|
+
.nw-link-nav.nw-link {
|
|
111
|
+
--_intent: var(--nw-primary);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Glow: the text blooms in its own ink on hover and focus. */
|
|
115
|
+
.nw-link-glow:is(:hover, :focus-visible) {
|
|
116
|
+
--nw-glow-color: var(--_intent);
|
|
117
|
+
text-shadow: var(--nw-glow-text);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* An icon beside the label, sized to the text. */
|
|
121
|
+
.nw-link-icon {
|
|
122
|
+
display: inline-flex;
|
|
123
|
+
gap: var(--nw-space-1);
|
|
124
|
+
align-items: center;
|
|
125
|
+
}
|
|
126
|
+
.nw-link-icon > svg {
|
|
127
|
+
flex: none;
|
|
128
|
+
inline-size: 1em;
|
|
129
|
+
block-size: 1em;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* External link: an arrow that sits in the text flow after the label. */
|
|
133
|
+
.nw-link-external::after {
|
|
134
|
+
content: '';
|
|
135
|
+
display: inline-block;
|
|
136
|
+
inline-size: 0.8em;
|
|
137
|
+
block-size: 0.8em;
|
|
138
|
+
margin-inline-start: 0.15em;
|
|
139
|
+
vertical-align: -0.05em;
|
|
140
|
+
background-color: currentColor;
|
|
141
|
+
opacity: 0.7;
|
|
142
|
+
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E")
|
|
143
|
+
center / contain no-repeat;
|
|
144
|
+
transition: opacity var(--nw-duration-fast) var(--nw-ease-standard);
|
|
145
|
+
}
|
|
146
|
+
.nw-link-external:hover::after {
|
|
147
|
+
opacity: 1;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Sizes, for a link standing alone; an inline link inherits its paragraph. */
|
|
151
|
+
.nw-link-xs {
|
|
152
|
+
font-size: var(--nw-text-xs);
|
|
153
|
+
}
|
|
154
|
+
.nw-link-sm {
|
|
155
|
+
font-size: var(--nw-text-sm);
|
|
156
|
+
}
|
|
157
|
+
.nw-link-md {
|
|
158
|
+
font-size: var(--nw-text-base);
|
|
159
|
+
}
|
|
160
|
+
.nw-link-lg {
|
|
161
|
+
font-size: var(--nw-text-lg);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@media (forced-colors: active) {
|
|
165
|
+
.nw-link {
|
|
166
|
+
color: LinkText;
|
|
167
|
+
text-decoration-line: underline;
|
|
168
|
+
}
|
|
169
|
+
.nw-link:is([aria-disabled='true'], :disabled, .nw-link-disabled) {
|
|
170
|
+
color: GrayText;
|
|
171
|
+
}
|
|
172
|
+
.nw-link-nav:is([aria-current='page'], [aria-current='true'], .nw-link-active) {
|
|
173
|
+
forced-color-adjust: none;
|
|
174
|
+
color: HighlightText;
|
|
175
|
+
background-color: Highlight;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|