lism-css 0.18.0 → 0.21.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/config/defaults/props.ts +41 -40
- package/config/defaults/tokens.ts +1 -1
- package/config/defaults/traits.ts +1 -7
- package/dist/components/state/Wrapper/Wrapper.d.ts +2 -4
- package/dist/components/state/Wrapper/index.js +5 -5
- package/dist/config/default-config.d.ts +47 -45
- package/dist/config/defaults/props.d.ts +45 -37
- package/dist/config/defaults/props.js +42 -41
- package/dist/config/defaults/tokens.d.ts +1 -1
- package/dist/config/defaults/tokens.js +1 -1
- package/dist/config/defaults/traits.d.ts +1 -7
- package/dist/config/defaults/traits.js +1 -7
- package/dist/config/index.d.ts +95 -91
- package/dist/css/base/set.css +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/main.css +1 -1
- package/dist/css/main_no_layer.css +1 -1
- package/dist/css/primitives/layout.css +1 -1
- package/dist/css/props.css +1 -1
- package/dist/css/trait.css +1 -1
- package/dist/lib/getLismProps.d.ts +2 -9
- package/dist/lib/getLismProps.js +98 -95
- package/dist/lib/types/PropValueTypes.d.ts +14 -10
- package/dist/lib/types/TraitProps.d.ts +10 -11
- package/dist/lib/types/allowedTags.d.ts +1 -1
- package/dist/lib/warnUnsupportedBp.d.ts +10 -0
- package/dist/lib/warnUnsupportedBp.js +20 -0
- package/package.json +1 -1
- package/packages/astro/state/Wrapper/Wrapper.astro +2 -8
- package/src/scss/_prop-config.scss +30 -66
- package/src/scss/base/_html.scss +7 -2
- package/src/scss/base/set/_bdrsInner.scss +1 -1
- package/src/scss/base/set/_bleed.scss +3 -0
- package/src/scss/base/set/_hov.scss +4 -4
- package/src/scss/base/set/_revert.scss +1 -1
- package/src/scss/base/set/index.scss +1 -0
- package/src/scss/base/tokens/_shadow.scss +2 -2
- package/src/scss/base/tokens/_space.scss +3 -3
- package/src/scss/base/tokens/_tokens.scss +15 -1
- package/src/scss/primitives/layout/_flow.scss +0 -4
- package/src/scss/props/_border.scss +4 -4
- package/src/scss/props/_hover.scss +4 -7
- package/src/scss/trait/is/_wrapper.scss +1 -8
|
@@ -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:
|
|
107
|
+
bp: lg,
|
|
112
108
|
),
|
|
113
109
|
'o': (
|
|
114
110
|
prop: 'opacity',
|
|
@@ -205,6 +201,16 @@ $props: (
|
|
|
205
201
|
),
|
|
206
202
|
bp: 1,
|
|
207
203
|
),
|
|
204
|
+
'contentSize': (
|
|
205
|
+
prop: '--contentSize',
|
|
206
|
+
utilities: (
|
|
207
|
+
's': 'var(--sz--s)',
|
|
208
|
+
'm': 'var(--sz--m)',
|
|
209
|
+
'l': 'var(--sz--l)',
|
|
210
|
+
'xl': 'var(--sz--xl)',
|
|
211
|
+
),
|
|
212
|
+
isVar: 1,
|
|
213
|
+
),
|
|
208
214
|
'max-sz': (
|
|
209
215
|
prop: 'max-inline-size',
|
|
210
216
|
utilities: (
|
|
@@ -217,10 +223,6 @@ $props: (
|
|
|
217
223
|
exUtility: (
|
|
218
224
|
),
|
|
219
225
|
),
|
|
220
|
-
'bg': (
|
|
221
|
-
prop: 'background',
|
|
222
|
-
bp: 1,
|
|
223
|
-
),
|
|
224
226
|
'bgr': (
|
|
225
227
|
prop: 'background-repeat',
|
|
226
228
|
utilities: (
|
|
@@ -340,6 +342,7 @@ $props: (
|
|
|
340
342
|
'relative': 'relative',
|
|
341
343
|
'absolute': 'absolute',
|
|
342
344
|
),
|
|
345
|
+
bp: 1,
|
|
343
346
|
),
|
|
344
347
|
'z': (
|
|
345
348
|
prop: 'z-index',
|
|
@@ -446,38 +449,22 @@ $props: (
|
|
|
446
449
|
),
|
|
447
450
|
bp: 1,
|
|
448
451
|
),
|
|
449
|
-
'
|
|
452
|
+
'ps': (
|
|
450
453
|
prop: 'padding-inline-start',
|
|
451
454
|
bp: 1,
|
|
452
455
|
),
|
|
453
|
-
'
|
|
456
|
+
'pe': (
|
|
454
457
|
prop: 'padding-inline-end',
|
|
455
458
|
bp: 1,
|
|
456
459
|
),
|
|
457
|
-
'
|
|
460
|
+
'pbs': (
|
|
458
461
|
prop: 'padding-block-start',
|
|
459
462
|
bp: 1,
|
|
460
463
|
),
|
|
461
|
-
'
|
|
464
|
+
'pbe': (
|
|
462
465
|
prop: 'padding-block-end',
|
|
463
466
|
bp: 1,
|
|
464
467
|
),
|
|
465
|
-
'pl': (
|
|
466
|
-
prop: 'padding-left',
|
|
467
|
-
bp: 1,
|
|
468
|
-
),
|
|
469
|
-
'pr': (
|
|
470
|
-
prop: 'padding-right',
|
|
471
|
-
bp: 1,
|
|
472
|
-
),
|
|
473
|
-
'pt': (
|
|
474
|
-
prop: 'padding-top',
|
|
475
|
-
bp: 1,
|
|
476
|
-
),
|
|
477
|
-
'pb': (
|
|
478
|
-
prop: 'padding-bottom',
|
|
479
|
-
bp: 1,
|
|
480
|
-
),
|
|
481
468
|
'm': (
|
|
482
469
|
prop: 'margin',
|
|
483
470
|
utilities: (
|
|
@@ -539,21 +526,21 @@ $props: (
|
|
|
539
526
|
),
|
|
540
527
|
bp: 1,
|
|
541
528
|
),
|
|
542
|
-
'
|
|
529
|
+
'ms': (
|
|
543
530
|
prop: 'margin-inline-start',
|
|
544
531
|
utilities: (
|
|
545
532
|
'auto': 'auto',
|
|
546
533
|
),
|
|
547
534
|
bp: 1,
|
|
548
535
|
),
|
|
549
|
-
'
|
|
536
|
+
'me': (
|
|
550
537
|
prop: 'margin-inline-end',
|
|
551
538
|
utilities: (
|
|
552
539
|
'auto': 'auto',
|
|
553
540
|
),
|
|
554
541
|
bp: 1,
|
|
555
542
|
),
|
|
556
|
-
'
|
|
543
|
+
'mbs': (
|
|
557
544
|
prop: 'margin-block-start',
|
|
558
545
|
utilities: (
|
|
559
546
|
'0': '0',
|
|
@@ -573,29 +560,13 @@ $props: (
|
|
|
573
560
|
),
|
|
574
561
|
bp: 1,
|
|
575
562
|
),
|
|
576
|
-
'
|
|
563
|
+
'mbe': (
|
|
577
564
|
prop: 'margin-block-end',
|
|
578
565
|
utilities: (
|
|
579
566
|
'auto': 'auto',
|
|
580
567
|
),
|
|
581
568
|
bp: 1,
|
|
582
569
|
),
|
|
583
|
-
'ml': (
|
|
584
|
-
prop: 'margin-left',
|
|
585
|
-
bp: 1,
|
|
586
|
-
),
|
|
587
|
-
'mr': (
|
|
588
|
-
prop: 'margin-right',
|
|
589
|
-
bp: 1,
|
|
590
|
-
),
|
|
591
|
-
'mt': (
|
|
592
|
-
prop: 'margin-top',
|
|
593
|
-
bp: 1,
|
|
594
|
-
),
|
|
595
|
-
'mb': (
|
|
596
|
-
prop: 'margin-bottom',
|
|
597
|
-
bp: 1,
|
|
598
|
-
),
|
|
599
570
|
'g': (
|
|
600
571
|
prop: 'gap',
|
|
601
572
|
utilities: (
|
|
@@ -618,19 +589,11 @@ $props: (
|
|
|
618
589
|
'gap': 'inherit',
|
|
619
590
|
),
|
|
620
591
|
),
|
|
621
|
-
bp:
|
|
622
|
-
),
|
|
623
|
-
'cg': (
|
|
624
|
-
prop: 'column-gap',
|
|
625
|
-
bp: 1,
|
|
626
|
-
),
|
|
627
|
-
'rg': (
|
|
628
|
-
prop: 'row-gap',
|
|
629
|
-
bp: 1,
|
|
592
|
+
bp: lg,
|
|
630
593
|
),
|
|
631
594
|
'cols': (
|
|
632
595
|
prop: '--cols',
|
|
633
|
-
bp:
|
|
596
|
+
bp: lg,
|
|
634
597
|
isVar: 1,
|
|
635
598
|
),
|
|
636
599
|
'rows': (
|
|
@@ -683,21 +646,21 @@ $props: (
|
|
|
683
646
|
),
|
|
684
647
|
'gta': (
|
|
685
648
|
prop: 'grid-template-areas',
|
|
686
|
-
bp:
|
|
649
|
+
bp: lg,
|
|
687
650
|
),
|
|
688
651
|
'gtc': (
|
|
689
652
|
prop: 'grid-template-columns',
|
|
690
653
|
utilities: (
|
|
691
654
|
'subgrid': 'subgrid',
|
|
692
655
|
),
|
|
693
|
-
bp:
|
|
656
|
+
bp: lg,
|
|
694
657
|
),
|
|
695
658
|
'gtr': (
|
|
696
659
|
prop: 'grid-template-rows',
|
|
697
660
|
utilities: (
|
|
698
661
|
'subgrid': 'subgrid',
|
|
699
662
|
),
|
|
700
|
-
bp:
|
|
663
|
+
bp: lg,
|
|
701
664
|
),
|
|
702
665
|
'gaf': (
|
|
703
666
|
prop: 'grid-auto-flow',
|
|
@@ -712,21 +675,21 @@ $props: (
|
|
|
712
675
|
utilities: (
|
|
713
676
|
'1\\/1': '1 / 1',
|
|
714
677
|
),
|
|
715
|
-
bp:
|
|
678
|
+
bp: lg,
|
|
716
679
|
),
|
|
717
680
|
'gc': (
|
|
718
681
|
prop: 'grid-column',
|
|
719
682
|
utilities: (
|
|
720
683
|
'1\\/-1': '1 / -1',
|
|
721
684
|
),
|
|
722
|
-
bp:
|
|
685
|
+
bp: lg,
|
|
723
686
|
),
|
|
724
687
|
'gr': (
|
|
725
688
|
prop: 'grid-row',
|
|
726
689
|
utilities: (
|
|
727
690
|
'1\\/-1': '1 / -1',
|
|
728
691
|
),
|
|
729
|
-
bp:
|
|
692
|
+
bp: lg,
|
|
730
693
|
),
|
|
731
694
|
'ai': (
|
|
732
695
|
prop: 'align-items',
|
|
@@ -825,6 +788,7 @@ $props: (
|
|
|
825
788
|
'1': '1',
|
|
826
789
|
'-1': '-1',
|
|
827
790
|
),
|
|
791
|
+
bp: 1,
|
|
828
792
|
),
|
|
829
793
|
'ovw': (
|
|
830
794
|
prop: 'overflow-wrap',
|
package/src/scss/base/_html.scss
CHANGED
|
@@ -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.
|
|
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-
|
|
110
|
+
padding-inline-start: var(--list-ps, 1.75em);
|
|
106
111
|
}
|
|
107
112
|
|
|
108
113
|
dt {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
@media (any-hover: hover) {
|
|
2
|
-
.set--
|
|
2
|
+
.set--hov:hover {
|
|
3
3
|
--_notHov: ;
|
|
4
4
|
}
|
|
5
|
-
.set--
|
|
5
|
+
.set--hov:not(:is(:hover, :focus-within)) {
|
|
6
6
|
--_isHov: ;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
@media (any-hover: none) {
|
|
10
|
-
.set--
|
|
10
|
+
.set--hov {
|
|
11
11
|
--_isHov: ;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
.set--
|
|
14
|
+
.set--hov:is(:focus-visible, :focus-within) {
|
|
15
15
|
--_notHov: ;
|
|
16
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* --------------------------------------------------
|
|
2
2
|
shadow
|
|
3
3
|
Memo: :root だけで --bxsh-- をセットしてしまうと --shc がその時点で固定されるので、
|
|
4
|
-
要素ごとに --shc を上書きできるよう、再セット用の set--
|
|
4
|
+
要素ごとに --shc を上書きできるよう、再セット用の set--bxsh クラスを併用する。
|
|
5
5
|
-------------------------------------------------- */
|
|
6
6
|
:root {
|
|
7
7
|
--shc: var(--shadow);
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
:root,
|
|
17
|
-
.set--
|
|
17
|
+
.set--bxsh {
|
|
18
18
|
--bxsh--10: var(--shsz--10) var(--shc);
|
|
19
19
|
--bxsh--20: var(--shsz--20) var(--shc);
|
|
20
20
|
--bxsh--30: var(--shsz--30) var(--shc);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* --------------------------------------------------
|
|
2
2
|
SPACEトークンの定義
|
|
3
|
-
Memo: set--
|
|
3
|
+
Memo: set--s で、SPACEトークンを再定義できる。
|
|
4
4
|
-------------------------------------------------- */
|
|
5
5
|
:root,
|
|
6
|
-
.set--
|
|
6
|
+
.set--s {
|
|
7
7
|
/**
|
|
8
8
|
* 余白: フィボナッチ数列をベースに設計する
|
|
9
9
|
*/
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
--s25: calc(var(--s-unit) * 2.5); // ≒ 20px
|
|
25
25
|
--s35: calc(var(--s-unit) * 4); // ≒ 32px
|
|
26
26
|
}
|
|
27
|
-
.set--
|
|
27
|
+
.set--s {
|
|
28
28
|
// 何も指定しなければ em 単位に変換する
|
|
29
29
|
--s-unit: 0.5em;
|
|
30
30
|
}
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
--blue: oklch(calc(var(--L) - 4%) calc(var(--C) + 0.01) 264);
|
|
42
42
|
--purple: oklch(calc(var(--L) - 4%) calc(var(--C) + 0.01) 288);
|
|
43
43
|
--pink: oklch(calc(var(--L) + 2%) calc(var(--C) + 0.01) 352);
|
|
44
|
-
--gray: oklch(calc(var(--L) - 4%)
|
|
44
|
+
--gray: oklch(calc(var(--L) - 4%) calc(var(--C) / 10) 240);
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
47
|
* セマンティックカラー
|
|
@@ -66,6 +66,10 @@
|
|
|
66
66
|
// shadow color
|
|
67
67
|
--shadow: hsl(220 4% 8% / 12%);
|
|
68
68
|
|
|
69
|
+
// ライトモード・ダークモードのどちらでもブレンドして使えるようなニュートラルカラー。
|
|
70
|
+
// Memo: 黒からの変化の方がわかりづらいため、明るめにする。
|
|
71
|
+
--neutral: hsl(220, 2%, 80%);
|
|
72
|
+
|
|
69
73
|
/**
|
|
70
74
|
* opacity
|
|
71
75
|
* 音楽の強弱記号(piano 系列)に由来。p の反復回数が多いほど透明度が増す。
|
|
@@ -94,4 +98,14 @@
|
|
|
94
98
|
* Memo: -max-sz\:full などからも参照されるのでrootで定義している
|
|
95
99
|
*/
|
|
96
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);
|
|
97
111
|
}
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
.-bd-y {
|
|
35
35
|
border-block-style: var(--bds) #{mixin.$maybe_important};
|
|
36
36
|
}
|
|
37
|
-
.-bd-
|
|
37
|
+
.-bd-s {
|
|
38
38
|
border-inline-start-style: var(--bds) #{mixin.$maybe_important};
|
|
39
39
|
}
|
|
40
|
-
.-bd-
|
|
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-
|
|
55
|
+
.-bd-bs {
|
|
56
56
|
border-block-start-style: var(--bds) #{mixin.$maybe_important};
|
|
57
57
|
}
|
|
58
|
-
.-bd-
|
|
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
|
-
|
|
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,15 +29,10 @@
|
|
|
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
|
// ----------------------------------------
|
|
38
|
-
// .-hov\:in (set--
|
|
35
|
+
// .-hov\:in (set--hov 連動の consumer class)
|
|
39
36
|
// ----------------------------------------
|
|
40
37
|
|
|
41
38
|
.-hov\:in\:hide {
|
|
@@ -8,11 +8,4 @@
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
// Memo:
|
|
12
|
-
.-contentSize\:s {
|
|
13
|
-
--contentSize: var(--sz--s);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.-contentSize\:l {
|
|
17
|
-
--contentSize: var(--sz--l);
|
|
18
|
-
}
|
|
11
|
+
// Memo: .-contentSize:s / m / l / xl は contentSize Prop の auto-generated 出力(src/scss/_prop-config.scss 経由)から自動的に props 層に出力される。
|