lism-css 0.22.2 → 0.23.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/dist/config/default-config.d.ts +137 -49
- package/dist/config/default-config.js +8 -6
- package/dist/config/defaults/breakpoints.d.ts +15 -0
- package/dist/config/defaults/breakpoints.js +10 -0
- package/dist/config/defaults/props.d.ts +21 -30
- package/dist/config/defaults/props.js +33 -29
- package/dist/config/defaults/token-scope.d.ts +9 -0
- package/dist/config/defaults/token-scope.js +7 -0
- package/dist/config/defaults/token-var-prefix.d.ts +11 -0
- package/dist/config/defaults/token-var-prefix.js +11 -0
- package/dist/config/defaults/tokens.d.ts +118 -21
- package/dist/config/defaults/tokens.js +112 -24
- package/dist/config/index.d.ts +285 -105
- package/dist/config/index.js +18 -15
- package/dist/config/presets/props-full.d.ts +20 -0
- package/dist/config/presets/props-full.js +28 -0
- package/dist/css/base/set.css +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/full.css +1 -0
- package/dist/css/full_no_layer.css +1 -0
- package/dist/css/main.css +1 -1
- package/dist/css/main_no_layer.css +1 -1
- package/dist/css/props.css +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -0
- package/dist/lib/getBpData.d.ts +2 -2
- package/dist/lib/getBpData.js +7 -7
- package/dist/lib/getLismProps.d.ts +5 -3
- package/dist/lib/getLismProps.js +59 -54
- package/dist/lib/getMaybeTokenValue.d.ts +1 -7
- package/dist/lib/getMaybeTokenValue.js +10 -22
- package/dist/lib/getTokenVarName.d.ts +13 -0
- package/dist/lib/getTokenVarName.js +8 -0
- package/dist/lib/getTokenVarName.test.d.ts +1 -0
- package/dist/lib/isTokenValue.js +11 -22
- package/dist/lib/types/CustomPropRegistry.d.ts +9 -0
- package/dist/lib/types/CustomTraitRegistry.d.ts +9 -0
- package/dist/lib/types/FullModeRegistry.d.ts +26 -0
- package/dist/lib/types/PropValueTypes.d.ts +45 -13
- package/dist/lib/types/ResponsiveProps.d.ts +57 -13
- package/dist/lib/types/ResponsiveProps.module-augmentation.test.d.ts +1 -0
- package/dist/lib/warnUnsupportedBp.js +1 -1
- package/dist/scss/auto_output.test.d.ts +1 -0
- package/package.json +23 -33
- package/src/scss/_auto_output.scss +54 -42
- package/src/scss/_prop-config-full.gen.scss +1317 -0
- package/src/scss/{_prop-config.scss → _prop-config.gen.scss} +37 -13
- package/src/scss/_setting.scss +6 -11
- package/src/scss/auto_output.test.ts +91 -0
- package/src/scss/base/index.scss +1 -3
- package/src/scss/base/set/index.scss +5 -0
- package/src/scss/base/tokens/_tokens.gen.scss +69 -0
- package/src/scss/base/tokens/_tokens.scss +31 -30
- package/src/scss/full.scss +12 -0
- package/src/scss/full_no_layer.scss +32 -0
- package/src/scss/props/index.scss +0 -1
- package/src/scss/trait/is/_wrapper.scss +1 -1
- package/bin/__build-css.cjs +0 -92
- package/bin/build-config.js +0 -155
- package/bin/build-css.js +0 -90
- package/bin/cli.mjs +0 -79
- package/bin/script-build-css.js +0 -6
- package/src/scss/base/tokens/_shadow.scss +0 -23
- package/src/scss/base/tokens/_space.scss +0 -30
- package/src/scss/base/tokens/_typography.scss +0 -69
- package/src/scss/props/_lh.scss +0 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "start", e: "end", c: "center", fs: "flex-start", fe: "flex-end" },
|
|
1
|
+
const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "start", e: "end", c: "center", fs: "flex-start", fe: "flex-end" }, o = {
|
|
2
2
|
f: { prop: "font", presets: ["inherit"] },
|
|
3
3
|
fz: { prop: "fontSize", token: "fz", tokenClass: 1, bp: 1 },
|
|
4
4
|
fw: {
|
|
@@ -10,19 +10,23 @@ const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "
|
|
|
10
10
|
ff: { prop: "fontFamily", token: "ff", tokenClass: 1 },
|
|
11
11
|
fs: { prop: "fontStyle", presets: ["italic"], shorthands: { i: "italic" } },
|
|
12
12
|
lh: {
|
|
13
|
-
prop: "
|
|
14
|
-
|
|
13
|
+
prop: "--hl",
|
|
14
|
+
isVar: 1,
|
|
15
15
|
token: "hl",
|
|
16
|
-
tokenClass:
|
|
17
|
-
|
|
16
|
+
tokenClass: 1,
|
|
17
|
+
utils: { 1: "0px" }
|
|
18
18
|
},
|
|
19
19
|
hl: {
|
|
20
|
+
prop: "--hl",
|
|
20
21
|
isVar: 1,
|
|
21
22
|
token: "hl",
|
|
22
|
-
tokenClass:
|
|
23
|
-
bp:
|
|
23
|
+
tokenClass: 1,
|
|
24
|
+
bp: 1,
|
|
25
|
+
// hl="0" で half-leading なし (--hl:0px) を表現できるようにする互換ユーティリティ。
|
|
26
|
+
// lh="1"(互換ショートカット)の .-lh:1 と同じ出力にし、正規 prop の hl 側でも揃えられるようにする。
|
|
27
|
+
utils: { 0: "0px" }
|
|
24
28
|
},
|
|
25
|
-
lts: { prop: "letterSpacing", token: "lts", tokenClass: 1
|
|
29
|
+
lts: { prop: "letterSpacing", token: "lts", tokenClass: 1 },
|
|
26
30
|
ta: { prop: "textAlign", presets: ["center", "left", "right"] },
|
|
27
31
|
td: { prop: "textDecoration", utils: { none: "none" } },
|
|
28
32
|
tt: { prop: "textTransform", utils: { upper: "uppercase", lower: "lowercase" } },
|
|
@@ -31,7 +35,7 @@ const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "
|
|
|
31
35
|
d: {
|
|
32
36
|
prop: "display",
|
|
33
37
|
presets: ["none", "block", "flex", "inline-flex", "grid", "inline-grid", "inline", "inline-block"],
|
|
34
|
-
bp:
|
|
38
|
+
bp: 1
|
|
35
39
|
},
|
|
36
40
|
o: { prop: "opacity", presets: ["0"], token: "o", tokenClass: 1 },
|
|
37
41
|
v: { prop: "visibility", presets: ["hidden"] },
|
|
@@ -71,7 +75,7 @@ const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "
|
|
|
71
75
|
"min-bsz": { prop: "minBlockSize", token: "sz" },
|
|
72
76
|
"max-bsz": { prop: "maxBlockSize", token: "sz" },
|
|
73
77
|
// bg
|
|
74
|
-
bg: { prop: "background"
|
|
78
|
+
bg: { prop: "background" },
|
|
75
79
|
bgi: { prop: "backgroundImage" },
|
|
76
80
|
bgr: { prop: "backgroundRepeat", presets: ["no-repeat"] },
|
|
77
81
|
bgp: { prop: "backgroundPosition", presets: ["center"] },
|
|
@@ -173,10 +177,10 @@ const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "
|
|
|
173
177
|
pe: { prop: "paddingInlineEnd", token: "space", bp: 1 },
|
|
174
178
|
pbs: { prop: "paddingBlockStart", token: "space", bp: 1 },
|
|
175
179
|
pbe: { prop: "paddingBlockEnd", token: "space", bp: 1 },
|
|
176
|
-
pl: { prop: "paddingLeft", token: "space"
|
|
177
|
-
pr: { prop: "paddingRight", token: "space"
|
|
178
|
-
pt: { prop: "paddingTop", token: "space"
|
|
179
|
-
pb: { prop: "paddingBottom", token: "space"
|
|
180
|
+
pl: { prop: "paddingLeft", token: "space" },
|
|
181
|
+
pr: { prop: "paddingRight", token: "space" },
|
|
182
|
+
pt: { prop: "paddingTop", token: "space" },
|
|
183
|
+
pb: { prop: "paddingBottom", token: "space" },
|
|
180
184
|
m: {
|
|
181
185
|
prop: "margin",
|
|
182
186
|
presets: ["auto", "0"],
|
|
@@ -191,21 +195,21 @@ const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "
|
|
|
191
195
|
me: { prop: "marginInlineEnd", presets: ["auto"], token: "space", bp: 1 },
|
|
192
196
|
mbs: { prop: "marginBlockStart", token: "space", bp: 1, presets: ["auto", "0"], tokenClass: 1 },
|
|
193
197
|
mbe: { prop: "marginBlockEnd", presets: ["auto"], token: "space", bp: 1 },
|
|
194
|
-
ml: { prop: "marginLeft", token: "space"
|
|
195
|
-
mr: { prop: "marginRight", token: "space"
|
|
196
|
-
mt: { prop: "marginTop", token: "space"
|
|
197
|
-
mb: { prop: "marginBottom", token: "space"
|
|
198
|
+
ml: { prop: "marginLeft", token: "space" },
|
|
199
|
+
mr: { prop: "marginRight", token: "space" },
|
|
200
|
+
mt: { prop: "marginTop", token: "space" },
|
|
201
|
+
mb: { prop: "marginBottom", token: "space" },
|
|
198
202
|
g: {
|
|
199
203
|
prop: "gap",
|
|
200
204
|
presets: ["0", "inherit"],
|
|
201
205
|
exUtility: { inherit: { gap: "inherit" } },
|
|
202
206
|
token: "space",
|
|
203
207
|
tokenClass: 1,
|
|
204
|
-
bp:
|
|
208
|
+
bp: 1
|
|
205
209
|
},
|
|
206
|
-
cg: { prop: "columnGap", token: "space"
|
|
207
|
-
rg: { prop: "rowGap", token: "space"
|
|
208
|
-
cols: { isVar: 1, bp:
|
|
210
|
+
cg: { prop: "columnGap", token: "space" },
|
|
211
|
+
rg: { prop: "rowGap", token: "space" },
|
|
212
|
+
cols: { isVar: 1, bp: 1 },
|
|
209
213
|
rows: { isVar: 1, bp: 1 },
|
|
210
214
|
// flex
|
|
211
215
|
fxf: { prop: "flexFlow" },
|
|
@@ -221,25 +225,25 @@ const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "
|
|
|
221
225
|
prop: "gridTemplate",
|
|
222
226
|
bp: 1
|
|
223
227
|
},
|
|
224
|
-
gta: { prop: "gridTemplateAreas", bp:
|
|
228
|
+
gta: { prop: "gridTemplateAreas", bp: 1 },
|
|
225
229
|
gtc: {
|
|
226
230
|
prop: "gridTemplateColumns",
|
|
227
231
|
presets: ["subgrid"],
|
|
228
|
-
bp:
|
|
232
|
+
bp: 1
|
|
229
233
|
},
|
|
230
234
|
gtr: {
|
|
231
235
|
prop: "gridTemplateRows",
|
|
232
236
|
presets: ["subgrid"],
|
|
233
|
-
bp:
|
|
237
|
+
bp: 1
|
|
234
238
|
},
|
|
235
239
|
gaf: { prop: "gridAutoFlow", presets: ["row", "column"], bp: 1 },
|
|
236
240
|
//dense
|
|
237
241
|
gac: { prop: "gridAutoColumns" },
|
|
238
242
|
gar: { prop: "gridAutoRows" },
|
|
239
243
|
// grid item
|
|
240
|
-
ga: { prop: "gridArea", utils: { "1/1": "1 / 1" }, bp:
|
|
241
|
-
gc: { prop: "gridColumn", utils: { "1/-1": "1 / -1" }, bp:
|
|
242
|
-
gr: { prop: "gridRow", utils: { "1/-1": "1 / -1" }, bp:
|
|
244
|
+
ga: { prop: "gridArea", utils: { "1/1": "1 / 1" }, bp: 1 },
|
|
245
|
+
gc: { prop: "gridColumn", utils: { "1/-1": "1 / -1" }, bp: 1 },
|
|
246
|
+
gr: { prop: "gridRow", utils: { "1/-1": "1 / -1" }, bp: 1 },
|
|
243
247
|
gcs: { prop: "gridColumnStart" },
|
|
244
248
|
gce: { prop: "gridColumnEnd" },
|
|
245
249
|
grs: { prop: "gridRowStart" },
|
|
@@ -323,5 +327,5 @@ const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "
|
|
|
323
327
|
wm: { prop: "writingMode", presets: ["vertical-rl"], bp: 1 }
|
|
324
328
|
};
|
|
325
329
|
export {
|
|
326
|
-
|
|
330
|
+
o as default
|
|
327
331
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* トークンの CSS 変数名ルール(プレフィックス)
|
|
3
|
+
*
|
|
4
|
+
* 既定の変数名は `--{token}--{key}`(例: --fz--xs)。
|
|
5
|
+
* このマップに列挙したトークンだけフラット命名 `{prefix}{key}` に切り替える。
|
|
6
|
+
*/
|
|
7
|
+
export declare const TOKEN_VAR_PREFIX: {
|
|
8
|
+
readonly space: "--s";
|
|
9
|
+
readonly color: "--";
|
|
10
|
+
readonly palette: "--";
|
|
11
|
+
};
|
|
@@ -1,28 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* デザイントークン(キー: 値)。
|
|
3
|
+
*
|
|
4
|
+
* - キーの順序がそのままカタログ順になる(Object.keys)。
|
|
5
|
+
* ユーティリティ生成・prop 受理・型導出はすべてこのキー集合から導出される。
|
|
6
|
+
* - 値はビルド時に生成 SCSS(`base/tokens/_tokens.gen.scss`)へ出力される。
|
|
7
|
+
* - 値 `'-'` は「カタログに登録するがcssの出力はしない」もの。実値はscssで手書き。
|
|
8
|
+
*/
|
|
1
9
|
declare const _default: {
|
|
2
|
-
readonly
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
readonly color: {
|
|
11
|
+
readonly base: "-";
|
|
12
|
+
readonly 'base-2': "-";
|
|
13
|
+
readonly text: "-";
|
|
14
|
+
readonly 'text-2': "-";
|
|
15
|
+
readonly divider: "-";
|
|
16
|
+
readonly link: "-";
|
|
17
|
+
readonly brand: "-";
|
|
18
|
+
readonly accent: "-";
|
|
19
|
+
readonly neutral: "-";
|
|
20
|
+
};
|
|
21
|
+
readonly palette: {
|
|
22
|
+
readonly red: "-";
|
|
23
|
+
readonly blue: "-";
|
|
24
|
+
readonly green: "-";
|
|
25
|
+
readonly yellow: "-";
|
|
26
|
+
readonly purple: "-";
|
|
27
|
+
readonly orange: "-";
|
|
28
|
+
readonly pink: "-";
|
|
29
|
+
readonly gray: "-";
|
|
30
|
+
readonly white: "#fff";
|
|
31
|
+
readonly black: "#000";
|
|
32
|
+
readonly keycolor: "-";
|
|
33
|
+
};
|
|
34
|
+
readonly fz: {
|
|
35
|
+
readonly base: "1rem";
|
|
36
|
+
readonly '5xl': "calc(1em * var(--fz-mol) / (var(--fz-mol) - 6))";
|
|
37
|
+
readonly '4xl': "calc(1em * var(--fz-mol) / (var(--fz-mol) - 5))";
|
|
38
|
+
readonly '3xl': "calc(1em * var(--fz-mol) / (var(--fz-mol) - 4))";
|
|
39
|
+
readonly '2xl': "calc(1em * var(--fz-mol) / (var(--fz-mol) - 3))";
|
|
40
|
+
readonly xl: "calc(1em * var(--fz-mol) / (var(--fz-mol) - 2))";
|
|
41
|
+
readonly l: "calc(1em * var(--fz-mol) / (var(--fz-mol) - 1))";
|
|
42
|
+
readonly m: "1em";
|
|
43
|
+
readonly s: "calc(1em * var(--fz-mol) / (var(--fz-mol) + 1))";
|
|
44
|
+
readonly xs: "calc(1em * var(--fz-mol) / (var(--fz-mol) + 2))";
|
|
45
|
+
readonly '2xs': "calc(1em * var(--fz-mol) / (var(--fz-mol) + 3))";
|
|
46
|
+
};
|
|
47
|
+
readonly lh: {
|
|
48
|
+
readonly base: "-";
|
|
49
|
+
readonly xs: "-";
|
|
50
|
+
readonly s: "-";
|
|
51
|
+
readonly l: "-";
|
|
52
|
+
};
|
|
53
|
+
readonly hl: {
|
|
54
|
+
readonly base: "calc(var(--hl-unit) * 3)";
|
|
55
|
+
readonly xs: "var(--hl-unit)";
|
|
56
|
+
readonly s: "calc(var(--hl-unit) * 2)";
|
|
57
|
+
readonly l: "calc(var(--hl-unit) * 4)";
|
|
58
|
+
};
|
|
59
|
+
readonly lts: {
|
|
60
|
+
readonly base: "normal";
|
|
61
|
+
readonly s: "-0.025em";
|
|
62
|
+
readonly l: "0.05em";
|
|
63
|
+
readonly xl: "0.1em";
|
|
64
|
+
};
|
|
65
|
+
readonly ff: {
|
|
66
|
+
readonly base: "-apple-system, 'BlinkMacSystemFont', 'Hiragino Sans', sans-serif";
|
|
67
|
+
readonly accent: "Georgia, serif";
|
|
68
|
+
readonly mono: "ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace";
|
|
69
|
+
};
|
|
70
|
+
readonly fw: {
|
|
71
|
+
readonly light: "300";
|
|
72
|
+
readonly normal: "400";
|
|
73
|
+
readonly bold: "600";
|
|
74
|
+
};
|
|
75
|
+
readonly o: {
|
|
76
|
+
readonly mp: "0.9";
|
|
77
|
+
readonly p: "0.75";
|
|
78
|
+
readonly pp: "0.5";
|
|
79
|
+
readonly ppp: "0.25";
|
|
80
|
+
};
|
|
81
|
+
readonly bdrs: {
|
|
82
|
+
readonly '10': "0.25rem";
|
|
83
|
+
readonly '20': "0.5rem";
|
|
84
|
+
readonly '30': "1rem";
|
|
85
|
+
readonly '40': "1.5rem";
|
|
86
|
+
readonly '99': "99rem";
|
|
87
|
+
readonly inner: "-";
|
|
88
|
+
};
|
|
89
|
+
readonly bxsh: {
|
|
90
|
+
readonly '10': "var(--shsz--10) var(--shc)";
|
|
91
|
+
readonly '20': "var(--shsz--20) var(--shc)";
|
|
92
|
+
readonly '30': "var(--shsz--30) var(--shc)";
|
|
93
|
+
readonly '40': "var(--shsz--40) var(--shc)";
|
|
94
|
+
readonly '50': "var(--shsz--50) var(--shc)";
|
|
95
|
+
};
|
|
13
96
|
readonly space: {
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
97
|
+
readonly '5': "calc(var(--s-unit) * 0.5)";
|
|
98
|
+
readonly '10': "var(--s-unit)";
|
|
99
|
+
readonly '15': "calc(var(--s-unit) * 1.5)";
|
|
100
|
+
readonly '20': "calc(var(--s-unit) * 2)";
|
|
101
|
+
readonly '25': "calc(var(--s-unit) * 2.5)";
|
|
102
|
+
readonly '30': "calc(var(--s-unit) * 3)";
|
|
103
|
+
readonly '35': "calc(var(--s-unit) * 4)";
|
|
104
|
+
readonly '40': "calc(var(--s-unit) * 5)";
|
|
105
|
+
readonly '50': "calc(var(--s-unit) * 8)";
|
|
106
|
+
readonly '60': "calc(var(--s-unit) * 13)";
|
|
107
|
+
readonly '70': "calc(var(--s-unit) * 21)";
|
|
108
|
+
readonly '80': "calc(var(--s-unit) * 34)";
|
|
16
109
|
};
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
110
|
+
readonly flow: {
|
|
111
|
+
readonly s: "-";
|
|
112
|
+
readonly l: "-";
|
|
20
113
|
};
|
|
21
|
-
readonly
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
114
|
+
readonly sz: {
|
|
115
|
+
readonly xs: "400px";
|
|
116
|
+
readonly s: "640px";
|
|
117
|
+
readonly m: "880px";
|
|
118
|
+
readonly l: "1200px";
|
|
119
|
+
readonly xl: "1600px";
|
|
120
|
+
};
|
|
121
|
+
readonly ar: {
|
|
122
|
+
readonly og: "1.91/1";
|
|
24
123
|
};
|
|
25
|
-
readonly writing: readonly ["vertical"];
|
|
26
|
-
readonly flow: readonly ["s", "l"];
|
|
27
124
|
};
|
|
28
125
|
export default _default;
|
|
@@ -1,30 +1,118 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
space: {
|
|
14
|
-
pre: "--s",
|
|
15
|
-
values: ["5", "10", "15", "20", "25", "30", "35", "40", "50", "60", "70", "80"]
|
|
16
|
-
},
|
|
17
|
-
c: {
|
|
18
|
-
pre: "--",
|
|
19
|
-
values: ["base", "base-2", "text", "text-2", "divider", "link", "brand", "accent", "neutral"]
|
|
1
|
+
const a = {
|
|
2
|
+
// セマンティックカラー: 実値は手書き SCSS(カタログ専用)。
|
|
3
|
+
color: {
|
|
4
|
+
base: "-",
|
|
5
|
+
"base-2": "-",
|
|
6
|
+
text: "-",
|
|
7
|
+
"text-2": "-",
|
|
8
|
+
divider: "-",
|
|
9
|
+
link: "-",
|
|
10
|
+
brand: "-",
|
|
11
|
+
accent: "-",
|
|
12
|
+
neutral: "-"
|
|
20
13
|
},
|
|
14
|
+
// パレットカラー: 多くは --L/--C からの計算色のため手書き SCSS。white/black のみリテラル値。
|
|
21
15
|
palette: {
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
red: "-",
|
|
17
|
+
blue: "-",
|
|
18
|
+
green: "-",
|
|
19
|
+
yellow: "-",
|
|
20
|
+
purple: "-",
|
|
21
|
+
orange: "-",
|
|
22
|
+
pink: "-",
|
|
23
|
+
gray: "-",
|
|
24
|
+
white: "#fff",
|
|
25
|
+
black: "#000",
|
|
26
|
+
keycolor: "-"
|
|
27
|
+
},
|
|
28
|
+
// font-size: 倍音列でのスケーリング(--fz-mol は手書き SCSS の構造変数)。基準は --fz--base。
|
|
29
|
+
fz: {
|
|
30
|
+
base: "1rem",
|
|
31
|
+
"5xl": "calc(1em * var(--fz-mol) / (var(--fz-mol) - 6))",
|
|
32
|
+
"4xl": "calc(1em * var(--fz-mol) / (var(--fz-mol) - 5))",
|
|
33
|
+
"3xl": "calc(1em * var(--fz-mol) / (var(--fz-mol) - 4))",
|
|
34
|
+
"2xl": "calc(1em * var(--fz-mol) / (var(--fz-mol) - 3))",
|
|
35
|
+
xl: "calc(1em * var(--fz-mol) / (var(--fz-mol) - 2))",
|
|
36
|
+
l: "calc(1em * var(--fz-mol) / (var(--fz-mol) - 1))",
|
|
37
|
+
m: "1em",
|
|
38
|
+
s: "calc(1em * var(--fz-mol) / (var(--fz-mol) + 1))",
|
|
39
|
+
xs: "calc(1em * var(--fz-mol) / (var(--fz-mol) + 2))",
|
|
40
|
+
"2xs": "calc(1em * var(--fz-mol) / (var(--fz-mol) + 3))"
|
|
41
|
+
},
|
|
42
|
+
// line-height: CSS 変数を持たないカタログ専用(prop 側で解釈)。
|
|
43
|
+
lh: { base: "-", xs: "-", s: "-", l: "-" },
|
|
44
|
+
// half-leading: --hl-unit は手書き SCSS の構造変数。
|
|
45
|
+
hl: {
|
|
46
|
+
base: "calc(var(--hl-unit) * 3)",
|
|
47
|
+
xs: "var(--hl-unit)",
|
|
48
|
+
s: "calc(var(--hl-unit) * 2)",
|
|
49
|
+
l: "calc(var(--hl-unit) * 4)"
|
|
50
|
+
},
|
|
51
|
+
// letter-spacing
|
|
52
|
+
lts: { base: "normal", s: "-0.025em", l: "0.05em", xl: "0.1em" },
|
|
53
|
+
// font-family
|
|
54
|
+
ff: {
|
|
55
|
+
/* Base:
|
|
56
|
+
* -apple-system/BlinkMacSystemFont → Macで英数字をSan Franciscoに。(前者がSafari/Firefox、後者がChrome用)
|
|
57
|
+
* 'Hiragino Sans' → Macでの和文フォントの指定。ここを省くと、Chromeで sans-serifが Hiragino Kaku Gothic ProN になってしまう
|
|
58
|
+
* sans-serif: Mac=Hiragino系 / Win=Noto|Meiryo
|
|
59
|
+
*
|
|
60
|
+
* Note: system-ui は和文に游ゴシックが当たるため使わない。
|
|
61
|
+
*/
|
|
62
|
+
base: "-apple-system, 'BlinkMacSystemFont', 'Hiragino Sans', sans-serif",
|
|
63
|
+
// Accent: 装飾用セリフ。初期状態はあくまで一例で実際はカスタマイズしてもらう想定。
|
|
64
|
+
accent: "Georgia, serif",
|
|
65
|
+
// Mono: ui-monospace=各OSのUI等幅 / SFMono・Menlo→Mac・Consolas→Win のフォールバック
|
|
66
|
+
mono: "ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace"
|
|
67
|
+
},
|
|
68
|
+
// font-weight
|
|
69
|
+
fw: { light: "300", normal: "400", bold: "600" },
|
|
70
|
+
// opacity(音楽の強弱記号 piano 系列に由来)
|
|
71
|
+
o: { mp: "0.9", p: "0.75", pp: "0.5", ppp: "0.25" },
|
|
72
|
+
// border-radius: inner は .set 系の計算値(手書き SCSS)でカタログ専用。
|
|
73
|
+
bdrs: { 10: "0.25rem", 20: "0.5rem", 30: "1rem", 40: "1.5rem", 99: "99rem", inner: "-" },
|
|
74
|
+
// box-shadow: 構造変数 --shsz--* / --shc(手書き SCSS)を合成。.set--bxsh で再宣言され影色 --shc を上書きできる。
|
|
75
|
+
bxsh: {
|
|
76
|
+
10: "var(--shsz--10) var(--shc)",
|
|
77
|
+
20: "var(--shsz--20) var(--shc)",
|
|
78
|
+
30: "var(--shsz--30) var(--shc)",
|
|
79
|
+
40: "var(--shsz--40) var(--shc)",
|
|
80
|
+
50: "var(--shsz--50) var(--shc)"
|
|
81
|
+
},
|
|
82
|
+
// space: 構造変数 --s-unit(手書き SCSS)の倍数。フィボナッチ数列ベース。.set--s で --s-unit を em 化すると再ベースされる。
|
|
83
|
+
space: {
|
|
84
|
+
5: "calc(var(--s-unit) * 0.5)",
|
|
85
|
+
// ≒ 4px
|
|
86
|
+
10: "var(--s-unit)",
|
|
87
|
+
// ≒ 8px
|
|
88
|
+
15: "calc(var(--s-unit) * 1.5)",
|
|
89
|
+
// ≒ 12px
|
|
90
|
+
20: "calc(var(--s-unit) * 2)",
|
|
91
|
+
// ≒ 16px
|
|
92
|
+
25: "calc(var(--s-unit) * 2.5)",
|
|
93
|
+
// ≒ 20px
|
|
94
|
+
30: "calc(var(--s-unit) * 3)",
|
|
95
|
+
// ≒ 24px
|
|
96
|
+
35: "calc(var(--s-unit) * 4)",
|
|
97
|
+
// ≒ 32px
|
|
98
|
+
40: "calc(var(--s-unit) * 5)",
|
|
99
|
+
// ≒ 40px
|
|
100
|
+
50: "calc(var(--s-unit) * 8)",
|
|
101
|
+
// ≒ 64px
|
|
102
|
+
60: "calc(var(--s-unit) * 13)",
|
|
103
|
+
// ≒ 104px
|
|
104
|
+
70: "calc(var(--s-unit) * 21)",
|
|
105
|
+
// ≒ 168px
|
|
106
|
+
80: "calc(var(--s-unit) * 34)"
|
|
107
|
+
// ≒ 272px
|
|
24
108
|
},
|
|
25
|
-
|
|
26
|
-
flow:
|
|
109
|
+
// flow: lang スコープ上書きありのため手書き SCSS。
|
|
110
|
+
flow: { s: "-", l: "-" },
|
|
111
|
+
// content-size
|
|
112
|
+
sz: { xs: "400px", s: "640px", m: "880px", l: "1200px", xl: "1600px" },
|
|
113
|
+
// aspect-ratio
|
|
114
|
+
ar: { og: "1.91/1" }
|
|
27
115
|
};
|
|
28
116
|
export {
|
|
29
|
-
|
|
117
|
+
a as default
|
|
30
118
|
};
|