@@ -129,7 +129,7 @@ const Badges = styled.div`
129
129
margin-right: 8px;
130
130
margin-bottom: 8px;
131
131
line-height: 0;
132
- `
132
+ ` ;
133
133
134
134
const Index = ( ) => (
135
135
< >
@@ -221,14 +221,14 @@ export const globalStyles = css\`:global() {
221
221
222
222
< CodeExamples >
223
223
{ {
224
- ' js source' : `
224
+ " js source" : `
225
225
import { tokens } from './tokens';
226
226
227
227
export const Headline = styled.h1\`
228
228
color: \${tokens.primary};
229
229
\`;
230
230
` ,
231
- ' css result' : `
231
+ " css result" : `
232
232
.se7gjt0-headline {
233
233
color: var(--primary--1isauia0);
234
234
}
@@ -241,7 +241,10 @@ export const Headline = styled.h1\`
241
241
< Section reverse >
242
242
< SectionContent >
243
243
< Headline > Create themable CSS Snippets</ Headline >
244
- < Text > Define which parts of your reusable css are customizable without overwrites</ Text >
244
+ < Text >
245
+ Define which parts of your reusable css are customizable without
246
+ overwrites
247
+ </ Text >
245
248
</ SectionContent >
246
249
< SectionExample >
247
250
< CodeExamples >
@@ -273,7 +276,7 @@ export const gradientHover = css\`
273
276
</ CodeExamples >
274
277
< CodeExamples >
275
278
{ {
276
- ' js source' : `
279
+ " js source" : `
277
280
import { startColor, endColor, gradientHover } from './gradient';
278
281
279
282
export const Button = styled.button\`
@@ -282,13 +285,13 @@ export const Button = styled.button\`
282
285
\${gradientHover}
283
286
\`;
284
287
` ,
285
- ' css result' : `
288
+ " css result" : `
286
289
.se7gjt0-button {
287
290
--1isauia0: #f5ab35;
288
291
--1isauia1: #8d1d1d;
289
292
/* the css from gradientHover */
290
293
}
291
- `
294
+ ` ,
292
295
} }
293
296
</ CodeExamples >
294
297
</ SectionExample >
@@ -301,6 +304,7 @@ export const Button = styled.button\`
301
304
The recommended babel plugin generates unique variable names during
302
305
build time
303
306
</ Text >
307
+ < br /> < br />
304
308
< Headline > Automatic DX</ Headline >
305
309
< Text >
306
310
All babel generated variable names will have human readable names
@@ -310,13 +314,21 @@ export const Button = styled.button\`
310
314
< SectionExample >
311
315
< CodeExamples >
312
316
{ {
313
- base : `
317
+ babel : `
314
318
{
315
319
"plugins": [
316
320
"css-variable/babel"
317
321
]
318
322
}
319
- ` , withOptions : `
323
+ ` ,
324
+ swc : `
325
+ {
326
+ "plugins": [
327
+ "css-variable/swc", { "basePath": __dirname },
328
+ ]
329
+ }
330
+ ` ,
331
+ withOptions : `
320
332
{
321
333
"plugins": [
322
334
["css-variable/babel", {
@@ -327,7 +339,7 @@ export const Button = styled.button\`
327
339
}]
328
340
]
329
341
}
330
- `
342
+ ` ,
331
343
} }
332
344
</ CodeExamples >
333
345
< CodeExamples >
@@ -364,7 +376,13 @@ export const theme = {
364
376
< Section reverse >
365
377
< SectionContent >
366
378
< Headline > Typed Contracts</ Headline >
367
- < Text > By default any string is a valid CSSVariable value.< br /> < br /> But it doesn't end here - the generic interface allows to define explicitly which values are assignable</ Text >
379
+ < Text >
380
+ By default any string is a valid CSSVariable value.
381
+ < br />
382
+ < br />
383
+ But it doesn't end here - the generic interface allows to define
384
+ explicitly which values are assignable
385
+ </ Text >
368
386
</ SectionContent >
369
387
< SectionExample >
370
388
< CodeExamples >
@@ -387,50 +405,51 @@ export const tokens = {
387
405
</ CodeExamples >
388
406
</ SectionExample >
389
407
</ Section >
390
-
391
-
392
408
</ Main >
393
409
< Footer >
394
410
< FooterContent >
395
411
< Badges >
396
- < a href = "https://www.npmjs.com/package/css-variable" target = "_blank" >
397
- < img
398
- alt = "npm"
399
- src = "https://img.shields.io/npm/v/css-variable?style=for-the-badge"
400
- />
401
- </ a >
402
- < a href = "https://bundle.js.org/?q=css-variable& treeshake = [ createVar ] " target = "_blank" >
403
- < img
404
- alt = "Minified Gziped Size"
405
- src = "https://img.shields.io/badge/minzip-288b-blue?style=for-the-badge"
406
- />
407
- </ a >
408
- < a href = "https://github.com/jantimon/css-variable/" target = "_blank" >
409
- < img
410
- src = "https://img.shields.io/badge/github-OSS-brightgreen?style=for-the-badge& logo = GitHub "
411
- alt = "Github"
412
- />
413
- </ a >
412
+ < a href = "https://www.npmjs.com/package/css-variable" target = "_blank" >
413
+ < img
414
+ alt = "npm"
415
+ src = "https://img.shields.io/npm/v/css-variable?style=for-the-badge"
416
+ />
417
+ </ a >
418
+ < a
419
+ href = "https://bundle.js.org/?q=css-variable& treeshake = [ createVar ] "
420
+ target = "_blank"
421
+ >
422
+ < img
423
+ alt = "Minified Gziped Size"
424
+ src = "https://img.shields.io/badge/minzip-288b-blue?style=for-the-badge"
425
+ />
426
+ </ a >
427
+ < a href = "https://github.com/jantimon/css-variable/" target = "_blank" >
428
+ < img
429
+ src = "https://img.shields.io/badge/github-OSS-brightgreen?style=for-the-badge& logo = GitHub "
430
+ alt = "Github"
431
+ />
432
+ </ a >
414
433
</ Badges >
415
434
< Badges >
416
- < a
417
- href = "https://github.com/jantimon/css-variable/actions/workflows/e2e-test.yml"
418
- target = "_blank"
419
- >
420
- < img
421
- alt = "GitHub Actions Status"
422
- src = "https://img.shields.io/github/workflow/status/jantimon/css-variable/e2e%20test/main?style=for-the-badge"
423
- />
424
- </ a >
425
- < a
426
- href = "https://github.com/jantimon/css-variable/blob/main/license"
427
- target = "_blank"
428
- >
429
- < img
430
- alt = "MIT License"
431
- src = "https://img.shields.io/npm/l/css-variable?style=for-the-badge"
432
- />
433
- </ a >
435
+ < a
436
+ href = "https://github.com/jantimon/css-variable/actions/workflows/e2e-test.yml"
437
+ target = "_blank"
438
+ >
439
+ < img
440
+ alt = "GitHub Actions Status"
441
+ src = "https://img.shields.io/github/workflow/status/jantimon/css-variable/e2e%20test/main?style=for-the-badge"
442
+ />
443
+ </ a >
444
+ < a
445
+ href = "https://github.com/jantimon/css-variable/blob/main/license"
446
+ target = "_blank"
447
+ >
448
+ < img
449
+ alt = "MIT License"
450
+ src = "https://img.shields.io/npm/l/css-variable?style=for-the-badge"
451
+ />
452
+ </ a >
434
453
</ Badges >
435
454
</ FooterContent >
436
455
</ Footer >
0 commit comments