lism-css 0.17.0 → 0.20.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.
Files changed (36) hide show
  1. package/README.ja.md +3 -3
  2. package/README.md +2 -2
  3. package/config/defaults/props.ts +39 -40
  4. package/config/defaults/tokens.ts +3 -3
  5. package/dist/config/default-config.d.ts +42 -41
  6. package/dist/config/defaults/props.d.ts +39 -38
  7. package/dist/config/defaults/props.js +39 -40
  8. package/dist/config/defaults/tokens.d.ts +3 -3
  9. package/dist/config/defaults/tokens.js +3 -3
  10. package/dist/config/index.d.ts +85 -83
  11. package/dist/css/base/set.css +1 -1
  12. package/dist/css/base.css +1 -1
  13. package/dist/css/main.css +1 -1
  14. package/dist/css/main_no_layer.css +1 -1
  15. package/dist/css/primitives/layout.css +1 -1
  16. package/dist/css/props.css +1 -1
  17. package/dist/css/utility.css +1 -1
  18. package/dist/lib/getLismProps.d.ts +1 -1
  19. package/dist/lib/getLismProps.js +24 -23
  20. package/dist/lib/types/PropValueTypes.d.ts +14 -10
  21. package/dist/lib/types/TraitProps.d.ts +1 -1
  22. package/dist/lib/warnUnsupportedBp.d.ts +10 -0
  23. package/dist/lib/warnUnsupportedBp.js +20 -0
  24. package/package.json +1 -1
  25. package/src/scss/_prop-config.scss +34 -66
  26. package/src/scss/base/_html.scss +8 -3
  27. package/src/scss/base/index.scss +1 -0
  28. package/src/scss/base/set/_revert.scss +1 -1
  29. package/src/scss/base/tokens/_shadow.scss +1 -1
  30. package/src/scss/base/tokens/_space.scss +30 -0
  31. package/src/scss/base/tokens/_tokens.scss +37 -20
  32. package/src/scss/base/tokens/_typography.scss +1 -17
  33. package/src/scss/primitives/layout/_flow.scss +0 -4
  34. package/src/scss/props/_border.scss +4 -4
  35. package/src/scss/props/_hover.scss +3 -6
  36. package/src/scss/utility/_cbox.scss +7 -4
@@ -61,11 +61,6 @@ $props: (
61
61
  exUtility: (
62
62
  ),
63
63
  ),
64
- 'hl': (
65
- prop: '--hl',
66
- bp: 1,
67
- isVar: 1,
68
- ),
69
64
  'lts': (
70
65
  prop: 'letter-spacing',
71
66
  utilities: (
@@ -74,6 +69,7 @@ $props: (
74
69
  'l': 'var(--lts--l)',
75
70
  'xl': 'var(--lts--xl)',
76
71
  ),
72
+ bp: 0,
77
73
  ),
78
74
  'ta': (
79
75
  prop: 'text-align',
@@ -108,7 +104,7 @@ $props: (
108
104
  'inline': 'inline',
109
105
  'inline-block': 'inline-block',
110
106
  ),
111
- bp: 1,
107
+ bp: lg,
112
108
  ),
113
109
  'o': (
114
110
  prop: 'opacity',
@@ -217,10 +213,6 @@ $props: (
217
213
  exUtility: (
218
214
  ),
219
215
  ),
220
- 'bg': (
221
- prop: 'background',
222
- bp: 1,
223
- ),
224
216
  'bgr': (
225
217
  prop: 'background-repeat',
226
218
  utilities: (
@@ -396,7 +388,9 @@ $props: (
396
388
  '10': 'var(--s10)',
397
389
  '15': 'var(--s15)',
398
390
  '20': 'var(--s20)',
391
+ '25': 'var(--s25)',
399
392
  '30': 'var(--s30)',
393
+ '35': 'var(--s35)',
400
394
  '40': 'var(--s40)',
401
395
  '50': 'var(--s50)',
402
396
  '60': 'var(--s60)',
@@ -414,7 +408,9 @@ $props: (
414
408
  '10': 'var(--s10)',
415
409
  '15': 'var(--s15)',
416
410
  '20': 'var(--s20)',
411
+ '25': 'var(--s25)',
417
412
  '30': 'var(--s30)',
413
+ '35': 'var(--s35)',
418
414
  '40': 'var(--s40)',
419
415
  '50': 'var(--s50)',
420
416
  '60': 'var(--s60)',
@@ -431,7 +427,9 @@ $props: (
431
427
  '10': 'var(--s10)',
432
428
  '15': 'var(--s15)',
433
429
  '20': 'var(--s20)',
430
+ '25': 'var(--s25)',
434
431
  '30': 'var(--s30)',
432
+ '35': 'var(--s35)',
435
433
  '40': 'var(--s40)',
436
434
  '50': 'var(--s50)',
437
435
  '60': 'var(--s60)',
@@ -440,38 +438,22 @@ $props: (
440
438
  ),
441
439
  bp: 1,
442
440
  ),
443
- 'px-s': (
441
+ 'ps': (
444
442
  prop: 'padding-inline-start',
445
443
  bp: 1,
446
444
  ),
447
- 'px-e': (
445
+ 'pe': (
448
446
  prop: 'padding-inline-end',
449
447
  bp: 1,
450
448
  ),
451
- 'py-s': (
449
+ 'pbs': (
452
450
  prop: 'padding-block-start',
453
451
  bp: 1,
454
452
  ),
455
- 'py-e': (
453
+ 'pbe': (
456
454
  prop: 'padding-block-end',
457
455
  bp: 1,
458
456
  ),
459
- 'pl': (
460
- prop: 'padding-left',
461
- bp: 1,
462
- ),
463
- 'pr': (
464
- prop: 'padding-right',
465
- bp: 1,
466
- ),
467
- 'pt': (
468
- prop: 'padding-top',
469
- bp: 1,
470
- ),
471
- 'pb': (
472
- prop: 'padding-bottom',
473
- bp: 1,
474
- ),
475
457
  'm': (
476
458
  prop: 'margin',
477
459
  utilities: (
@@ -480,7 +462,9 @@ $props: (
480
462
  '10': 'var(--s10)',
481
463
  '15': 'var(--s15)',
482
464
  '20': 'var(--s20)',
465
+ '25': 'var(--s25)',
483
466
  '30': 'var(--s30)',
467
+ '35': 'var(--s35)',
484
468
  '40': 'var(--s40)',
485
469
  '50': 'var(--s50)',
486
470
  '60': 'var(--s60)',
@@ -499,7 +483,9 @@ $props: (
499
483
  '10': 'var(--s10)',
500
484
  '15': 'var(--s15)',
501
485
  '20': 'var(--s20)',
486
+ '25': 'var(--s25)',
502
487
  '30': 'var(--s30)',
488
+ '35': 'var(--s35)',
503
489
  '40': 'var(--s40)',
504
490
  '50': 'var(--s50)',
505
491
  '60': 'var(--s60)',
@@ -517,7 +503,9 @@ $props: (
517
503
  '10': 'var(--s10)',
518
504
  '15': 'var(--s15)',
519
505
  '20': 'var(--s20)',
506
+ '25': 'var(--s25)',
520
507
  '30': 'var(--s30)',
508
+ '35': 'var(--s35)',
521
509
  '40': 'var(--s40)',
522
510
  '50': 'var(--s50)',
523
511
  '60': 'var(--s60)',
@@ -527,21 +515,21 @@ $props: (
527
515
  ),
528
516
  bp: 1,
529
517
  ),
530
- 'mx-s': (
518
+ 'ms': (
531
519
  prop: 'margin-inline-start',
532
520
  utilities: (
533
521
  'auto': 'auto',
534
522
  ),
535
523
  bp: 1,
536
524
  ),
537
- 'mx-e': (
525
+ 'me': (
538
526
  prop: 'margin-inline-end',
539
527
  utilities: (
540
528
  'auto': 'auto',
541
529
  ),
542
530
  bp: 1,
543
531
  ),
544
- 'my-s': (
532
+ 'mbs': (
545
533
  prop: 'margin-block-start',
546
534
  utilities: (
547
535
  '0': '0',
@@ -549,7 +537,9 @@ $props: (
549
537
  '10': 'var(--s10)',
550
538
  '15': 'var(--s15)',
551
539
  '20': 'var(--s20)',
540
+ '25': 'var(--s25)',
552
541
  '30': 'var(--s30)',
542
+ '35': 'var(--s35)',
553
543
  '40': 'var(--s40)',
554
544
  '50': 'var(--s50)',
555
545
  '60': 'var(--s60)',
@@ -559,29 +549,13 @@ $props: (
559
549
  ),
560
550
  bp: 1,
561
551
  ),
562
- 'my-e': (
552
+ 'mbe': (
563
553
  prop: 'margin-block-end',
564
554
  utilities: (
565
555
  'auto': 'auto',
566
556
  ),
567
557
  bp: 1,
568
558
  ),
569
- 'ml': (
570
- prop: 'margin-left',
571
- bp: 1,
572
- ),
573
- 'mr': (
574
- prop: 'margin-right',
575
- bp: 1,
576
- ),
577
- 'mt': (
578
- prop: 'margin-top',
579
- bp: 1,
580
- ),
581
- 'mb': (
582
- prop: 'margin-bottom',
583
- bp: 1,
584
- ),
585
559
  'g': (
586
560
  prop: 'gap',
587
561
  utilities: (
@@ -590,7 +564,9 @@ $props: (
590
564
  '10': 'var(--s10)',
591
565
  '15': 'var(--s15)',
592
566
  '20': 'var(--s20)',
567
+ '25': 'var(--s25)',
593
568
  '30': 'var(--s30)',
569
+ '35': 'var(--s35)',
594
570
  '40': 'var(--s40)',
595
571
  '50': 'var(--s50)',
596
572
  '60': 'var(--s60)',
@@ -602,19 +578,11 @@ $props: (
602
578
  'gap': 'inherit',
603
579
  ),
604
580
  ),
605
- bp: 1,
606
- ),
607
- 'cg': (
608
- prop: 'column-gap',
609
- bp: 1,
610
- ),
611
- 'rg': (
612
- prop: 'row-gap',
613
- bp: 1,
581
+ bp: lg,
614
582
  ),
615
583
  'cols': (
616
584
  prop: '--cols',
617
- bp: 1,
585
+ bp: lg,
618
586
  isVar: 1,
619
587
  ),
620
588
  'rows': (
@@ -667,21 +635,21 @@ $props: (
667
635
  ),
668
636
  'gta': (
669
637
  prop: 'grid-template-areas',
670
- bp: 1,
638
+ bp: lg,
671
639
  ),
672
640
  'gtc': (
673
641
  prop: 'grid-template-columns',
674
642
  utilities: (
675
643
  'subgrid': 'subgrid',
676
644
  ),
677
- bp: 1,
645
+ bp: lg,
678
646
  ),
679
647
  'gtr': (
680
648
  prop: 'grid-template-rows',
681
649
  utilities: (
682
650
  'subgrid': 'subgrid',
683
651
  ),
684
- bp: 1,
652
+ bp: lg,
685
653
  ),
686
654
  'gaf': (
687
655
  prop: 'grid-auto-flow',
@@ -696,21 +664,21 @@ $props: (
696
664
  utilities: (
697
665
  '1\\/1': '1 / 1',
698
666
  ),
699
- bp: 1,
667
+ bp: lg,
700
668
  ),
701
669
  'gc': (
702
670
  prop: 'grid-column',
703
671
  utilities: (
704
672
  '1\\/-1': '1 / -1',
705
673
  ),
706
- bp: 1,
674
+ bp: lg,
707
675
  ),
708
676
  'gr': (
709
677
  prop: 'grid-row',
710
678
  utilities: (
711
679
  '1\\/-1': '1 / -1',
712
680
  ),
713
- bp: 1,
681
+ bp: lg,
714
682
  ),
715
683
  'ai': (
716
684
  prop: 'align-items',
@@ -8,7 +8,7 @@ body {
8
8
  letter-spacing: var(--lts--base);
9
9
  background-color: var(--base);
10
10
  color: var(--text);
11
- text-underline-offset: var(--under-offset, 0.125em);
11
+ text-underline-offset: var(--under-offset, 0.25em);
12
12
  }
13
13
 
14
14
  /* --------------------------------------------------
@@ -71,6 +71,11 @@ kbd,
71
71
  var,
72
72
  samp {
73
73
  font-family: var(--ff--mono);
74
+ letter-spacing: normal;
75
+ }
76
+
77
+ :where(blockquote > p) + p {
78
+ margin-block-start: var(--s10);
74
79
  }
75
80
 
76
81
  q,
@@ -102,7 +107,7 @@ hr {
102
107
  // Property Class だけの ul/ol など、明示的に戻したい場合は `.set--revert` を付与する(base/set/_revert.scss)。
103
108
  :is(ul, ol):where(:not([class])) {
104
109
  list-style: revert;
105
- padding-inline-start: var(--list-px-s, 1.75em);
110
+ padding-inline-start: var(--list-ps, 1.75em);
106
111
  }
107
112
 
108
113
  dt {
@@ -138,7 +143,7 @@ th {
138
143
  /* --------------------------------------------------
139
144
  Form fields
140
145
  -------------------------------------------------- */
141
- input,
146
+ input:not([type='range']),
142
147
  button,
143
148
  textarea,
144
149
  select,
@@ -1,5 +1,6 @@
1
1
  @forward './tokens/tokens';
2
2
  @forward './tokens/typography';
3
+ @forward './tokens/space';
3
4
  @forward './tokens/shadow';
4
5
 
5
6
  // 各html要素のベーススタイル
@@ -2,5 +2,5 @@
2
2
  // set--revert 単体では何も適用されず、HTML要素と組み合わせて使う想定。現状は ul / ol のみ対象だが、ユーザーが a / button など他要素に対しても自由に使える。
3
3
  :is(ul, ol).set--revert {
4
4
  list-style: revert;
5
- padding-inline-start: var(--list-px-s, 1.75em);
5
+ padding-inline-start: var(--list-ps, 1.75em);
6
6
  }
@@ -4,7 +4,7 @@
4
4
  要素ごとに --shc を上書きできるよう、再セット用の set--var:bxsh クラスを併用する。
5
5
  -------------------------------------------------- */
6
6
  :root {
7
- --shc: hsl(220 4% 8% / 15%);
7
+ --shc: var(--shadow);
8
8
 
9
9
  --shsz--10: 0px 1px 3px;
10
10
  --shsz--20: 0px 2px 6px;
@@ -0,0 +1,30 @@
1
+ /* --------------------------------------------------
2
+ SPACEトークンの定義
3
+ Memo: set--var:s で、SPACEトークンを再定義できる。
4
+ -------------------------------------------------- */
5
+ :root,
6
+ .set--var\:s {
7
+ /**
8
+ * 余白: フィボナッチ数列をベースに設計する
9
+ */
10
+ --s-unit: calc(var(--fz--base) * 0.5); // 計算単位 ≒ 8px
11
+
12
+ --s10: var(--s-unit); // ≒ 8px
13
+ --s20: calc(var(--s-unit) * 2); // ≒ 16px
14
+ --s30: calc(var(--s-unit) * 3); // ≒ 24px
15
+ --s40: calc(var(--s-unit) * 5); // ≒ 40px
16
+ --s50: calc(var(--s-unit) * 8); // ≒ 64px
17
+ --s60: calc(var(--s-unit) * 13); // ≒ 104px
18
+ --s70: calc(var(--s-unit) * 21); // ≒ 168px
19
+ --s80: calc(var(--s-unit) * 34); // ≒ 272px
20
+
21
+ // ~40までの前半部分は間を埋める
22
+ --s5: calc(var(--s-unit) * 0.5); // ≒ 4px
23
+ --s15: calc(var(--s-unit) * 1.5); // ≒ 12px
24
+ --s25: calc(var(--s-unit) * 2.5); // ≒ 20px
25
+ --s35: calc(var(--s-unit) * 4); // ≒ 32px
26
+ }
27
+ .set--var\:s {
28
+ // 何も指定しなければ em 単位に変換する
29
+ --s-unit: 0.5em;
30
+ }
@@ -16,10 +16,10 @@
16
16
  * Content size
17
17
  */
18
18
  --sz--xl: 1600px; // 80*20
19
- --sz--l: 1280px; // 80*16
20
- --sz--m: 56rem; // 読みやすいのが50文字程度。
21
- --sz--s: 42rem;
22
- --sz--xs: 32rem;
19
+ --sz--l: 1200px; // 80*15
20
+ --sz--m: 880px; // 80*11
21
+ --sz--s: 640px; // 80*8
22
+ --sz--xs: 400px; // 80*5
23
23
 
24
24
  /**
25
25
  * カラーパレット
@@ -31,17 +31,17 @@
31
31
 
32
32
  // 基準の明度と彩度(red)
33
33
  --L: 60%;
34
- --C: 0.22;
34
+ --C: 0.2;
35
35
 
36
36
  // パレットトークン
37
37
  --red: oklch(var(--L) var(--C) 20);
38
- --orange: oklch(calc(var(--L) + 4%) calc(var(--C) - 0.01) 52);
39
- --yellow: oklch(calc(var(--L) + 12%) calc(var(--C) - 0.025) 84);
40
- --green: oklch(calc(var(--L) + 4%) calc(var(--C) - 0.02) 152);
41
- --blue: oklch(calc(var(--L) - 2%) calc(var(--C) + 0.01) 260);
42
- --purple: oklch(calc(var(--L) - 4%) calc(var(--C) + 0.02) 292);
43
- --pink: oklch(calc(var(--L) + 2%) calc(var(--C) + 0.02) 348);
44
- --gray: oklch(calc(var(--L) - 4%) 0.04 256);
38
+ --orange: oklch(calc(var(--L) + 6%) calc(var(--C) - 0.01) 48);
39
+ --yellow: oklch(calc(var(--L) + 12%) calc(var(--C) - 0.02) 80);
40
+ --green: oklch(calc(var(--L) + 4%) calc(var(--C) - 0.01) 152);
41
+ --blue: oklch(calc(var(--L) - 4%) calc(var(--C) + 0.01) 264);
42
+ --purple: oklch(calc(var(--L) - 4%) calc(var(--C) + 0.01) 288);
43
+ --pink: oklch(calc(var(--L) + 2%) calc(var(--C) + 0.01) 352);
44
+ --gray: oklch(calc(var(--L) - 4%) calc(var(--C) / 10) 240);
45
45
 
46
46
  /**
47
47
  * セマンティックカラー
@@ -50,18 +50,25 @@
50
50
  --accent: #d94a6a;
51
51
 
52
52
  // base (background)
53
- --base: hsl(224 4% 99%);
54
- --base-2: hsl(224 8% 95%);
53
+ --base: hsl(220 0% 99%);
54
+ --base-2: hsl(220 4% 95%);
55
55
 
56
56
  // text (contents)
57
- --text: hsl(224 4% 8%);
58
- --text-2: hsl(224 6% 32%);
57
+ --text: hsl(220 0% 8%);
58
+ --text-2: hsl(220 4% 32%);
59
59
 
60
- // link
61
- --link: oklch(50% 0.3 240); //hsl(224, 90%, 48%);
60
+ // link color
61
+ --link: oklch(50% 0.3 240); //hsl(220, 90%, 48%);
62
62
 
63
- // divider (border)
64
- --divider: hsl(224 8% 88%);
63
+ // divider(border) color
64
+ --divider: hsl(220 4% 88%);
65
+
66
+ // shadow color
67
+ --shadow: hsl(220 4% 8% / 12%);
68
+
69
+ // ライトモード・ダークモードのどちらでもブレンドして使えるようなニュートラルカラー。
70
+ // Memo: 黒からの変化の方がわかりづらいため、明るめにする。
71
+ --neutral: hsl(220, 2%, 80%);
65
72
 
66
73
  /**
67
74
  * opacity
@@ -91,4 +98,14 @@
91
98
  * Memo: -max-sz\:full などからも参照されるのでrootで定義している
92
99
  */
93
100
  --gutter-size: var(--s30);
101
+
102
+ /**
103
+ * コンテンツ間の余白バリエーションを定義
104
+ */
105
+ --flow--base: var(--s30);
106
+ --flow--s: var(--s20);
107
+ }
108
+
109
+ :root:where([lang='ja']) {
110
+ --flow--base: var(--s35);
94
111
  }
@@ -8,7 +8,7 @@
8
8
  }
9
9
 
10
10
  /* --------------------------------------------------
11
- typography・spacing トークンの定義
11
+ typography トークンの定義
12
12
  -------------------------------------------------- */
13
13
  :root {
14
14
  /**
@@ -66,20 +66,4 @@
66
66
  --hl--base: calc(var(--hl-unit) * 3);
67
67
  --hl--l: calc(var(--hl-unit) * 4);
68
68
  // --hl--xl: calc(var(--hl-unit) * 5);
69
-
70
- /**
71
- * スペーシング: フィボナッチ数列をベースにする
72
- */
73
- --s-unit: calc(var(--fz--base) * 0.5); // ≒ 8px
74
-
75
- --s5: calc(0.5 * var(--s-unit)); // 例外
76
- --s10: var(--s-unit);
77
- --s15: calc(1.5 * var(--s-unit)); // 例外
78
- --s20: calc(2 * var(--s-unit));
79
- --s30: calc(3 * var(--s-unit));
80
- --s40: calc(5 * var(--s-unit));
81
- --s50: calc(8 * var(--s-unit));
82
- --s60: calc(13 * var(--s-unit));
83
- --s70: calc(21 * var(--s-unit));
84
- --s80: calc(34 * var(--s-unit));
85
69
  }
@@ -1,8 +1,4 @@
1
1
  .l--flow {
2
- // コンテンツ間の余白バリエーションを定義
3
- --flow--base: var(--s30);
4
- --flow--s: var(--s20);
5
-
6
2
  display: flow-root;
7
3
 
8
4
  > * + * {
@@ -34,10 +34,10 @@
34
34
  .-bd-y {
35
35
  border-block-style: var(--bds) #{mixin.$maybe_important};
36
36
  }
37
- .-bd-x-s {
37
+ .-bd-s {
38
38
  border-inline-start-style: var(--bds) #{mixin.$maybe_important};
39
39
  }
40
- .-bd-x-e {
40
+ .-bd-e {
41
41
  border-inline-end-style: var(--bds) #{mixin.$maybe_important};
42
42
  }
43
43
  .-bd-t {
@@ -52,9 +52,9 @@
52
52
  .-bd-r {
53
53
  border-right-style: var(--bds) #{mixin.$maybe_important};
54
54
  }
55
- .-bd-y-s {
55
+ .-bd-bs {
56
56
  border-block-start-style: var(--bds) #{mixin.$maybe_important};
57
57
  }
58
- .-bd-y-e {
58
+ .-bd-be {
59
59
  border-block-end-style: var(--bds) #{mixin.$maybe_important};
60
60
  }
@@ -11,7 +11,9 @@
11
11
  border-color: var(--hov-bdc, currentColor) #{mixin.$maybe_important};
12
12
  }
13
13
  .-hov\:-bgc:hover {
14
- background-color: var(--hov-bgc, var(--base-2)) #{mixin.$maybe_important};
14
+ // デフォルトでニュートラルグレーを配色し、背景色明るくても暗くても使えるようにしておく。
15
+ background-color: var(--hov-bgc, var(--hov-bgc--default, color-mix(in srgb, var(--bgc, var(--base)), var(--neutral) 25%)))
16
+ #{mixin.$maybe_important};
15
17
  }
16
18
  .-hov\:-o:hover {
17
19
  opacity: var(--hov-o, var(--o--p)) #{mixin.$maybe_important};
@@ -27,11 +29,6 @@
27
29
  .-hov\:underline:hover {
28
30
  text-decoration: underline;
29
31
  }
30
- // 背景色が暗くも明るくても使えるように、ニュートラルグレーを配色。
31
- // Memo: 黒からの変化の方がわかりづらいため、グレーの中でも少し明るめを混ぜる。
32
- .-hov\:neutral:hover {
33
- background-color: color-mix(in srgb, var(--bgc, var(--base)), hsl(220, 5%, 75%) 25%) #{mixin.$maybe_important};
34
- }
35
32
  }
36
33
 
37
34
  // ----------------------------------------
@@ -3,15 +3,18 @@
3
3
  Memo: bgcの mix は transparent ではなく --base と混ぜている → 背景メディアがあるときも可読性が落ちないように + chat のように同じ背景色の装飾が一部重なっていても大丈夫なように。
4
4
  */
5
5
  .u--cbox {
6
- --c: color-mix(in srgb, var(--text), var(--keycolor) var(--cbox-cPct, 32%));
7
- --bgc: color-mix(in srgb, var(--base), var(--keycolor) var(--cbox-bgPct, 4%));
8
- --bdc: color-mix(in srgb, transparent, var(--keycolor) var(--cbox-bdPct, 64%));
6
+ --mutedKeycolor: var(--keycolor);
7
+ --c: color-mix(in srgb, var(--text), var(--keycolor) var(--cbox-cPct, 25%));
8
+ --bgc: color-mix(in srgb, var(--base), var(--mutedKeycolor) var(--cbox-bgPct, 4%));
9
+ --bdc: color-mix(in srgb, var(--divider), var(--keycolor) var(--cbox-bdPct, 50%));
9
10
  --link-c: var(--keycolor); // --link を上書きすると、keycolorに --link が使えなくなる
11
+
10
12
  color: var(--c);
11
13
  background-color: var(--bgc);
12
14
 
13
15
  // 相対カラー構文をサポートしているブラウザでは、 shadowのカラーもキーカラーに寄せる
14
16
  @supports (color: oklch(from red l c h)) {
15
- --shc: oklch(from var(--keycolor) calc(l / 1.5) calc(c / 1.5) h / 0.1);
17
+ --mutedKeycolor: oklch(from var(--keycolor) l calc(c * 0.75) h);
18
+ // --shc: color-mix(in srgb, var(--shadow), oklch(from var(--keycolor) l c h / 0.25) var(--cbox-shPct, 50%));
16
19
  }
17
20
  }