lism-css 0.0.11 → 0.0.12

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 (47) hide show
  1. package/dist/components/Accordion/setAccordion.js +5 -5
  2. package/dist/components/Accordion/style.css +1 -1
  3. package/dist/config/prop_list.js +1 -1
  4. package/dist/css/all.css +1 -1
  5. package/dist/css/all_no_layer.css +1 -1
  6. package/dist/css/base.css +1 -1
  7. package/dist/css/dynamic.css +1 -1
  8. package/dist/css/props.css +1 -1
  9. package/dist/css/reset.css +1 -1
  10. package/dist/css/state.css +1 -1
  11. package/dist/css/utility.css +1 -1
  12. package/dist/css/with_layer.css +1 -1
  13. package/dist/lib/getLismProps.js +29 -29
  14. package/package.json +1 -1
  15. package/src/scss/_auto_output.scss +17 -5
  16. package/src/scss/_props.scss +13 -23
  17. package/src/scss/_setting.scss +2 -2
  18. package/src/scss/all.scss +0 -4
  19. package/src/scss/all_no_layer.scss +5 -1
  20. package/src/scss/base/_property.scss +43 -0
  21. package/src/scss/base/_tokens.scss +13 -47
  22. package/src/scss/base/index.scss +2 -1
  23. package/src/scss/props/_border.scss +2 -2
  24. package/src/scss/props/_hover.scss +9 -9
  25. package/src/scss/props/_transition.scss +2 -2
  26. package/src/scss/props/index.scss +1 -0
  27. package/src/scss/state/_container.scss +12 -8
  28. package/src/scss/state/_flow.scss +24 -25
  29. package/src/scss/state/_size.scss +3 -20
  30. package/src/scss/utility/_colbox.scss +0 -1
  31. package/src/scss/utility/index.scss +7 -0
  32. package/src/scss/layout/__switcher.scss +0 -11
  33. package/src/scss/props/__/__aspect.bkup.scss +0 -36
  34. package/src/scss/props/__/__border.bkup.scss +0 -197
  35. package/src/scss/props/__/__color.bkup.scss +0 -67
  36. package/src/scss/props/__/__display.bukup.scss +0 -11
  37. package/src/scss/props/__/__flex-props.bkup.scss +0 -66
  38. package/src/scss/props/__/__gap.bkup.scss +0 -18
  39. package/src/scss/props/__/__grid-props.bkup.scss +0 -158
  40. package/src/scss/props/__/__margin.bkup.scss +0 -92
  41. package/src/scss/props/__/__padding.bkup.scss +0 -93
  42. package/src/scss/props/__/__place.bkup.scss +0 -74
  43. package/src/scss/props/__/__radius.bkup.scss +0 -27
  44. package/src/scss/props/__/__sizing.bkup.scss +0 -45
  45. package/src/scss/props/__/__typography.bkup.scss +0 -146
  46. package/src/scss/state/__container.bkup.scss +0 -143
  47. package/src/scss/state/__flow.bkup.scss +0 -52
@@ -1,6 +1,6 @@
1
1
  import y, { CONTEXT_PROPS as O } from "../config/prop_list.js";
2
2
  import E from "./isPresetValue.js";
3
- import S from "./isTokenValue.js";
3
+ import P from "./isTokenValue.js";
4
4
  import $ from "./getMaybeUtilValue.js";
5
5
  import c from "./getMaybeCssVar.js";
6
6
  import U from "./getBpData.js";
@@ -29,19 +29,19 @@ class A {
29
29
  lismClass: r,
30
30
  lismState: l = [],
31
31
  variant: o,
32
- passVars: f,
32
+ passVars: n,
33
33
  // lismVar,
34
34
  style: h = {},
35
35
  // hasBd,
36
- ...n
36
+ ...f
37
37
  } = t;
38
38
  this.lismClass = r, this.lismState = l, this.styles = h;
39
- let a = this.getStateProps(n);
39
+ let a = this.getStateProps(f);
40
40
  if (o && r) {
41
- const P = r.split(" "), j = P[0], x = o.split(",").map((u) => u.trim()).filter(Boolean).map((u) => `${j}--${u}`);
42
- this.lismClass = P.concat(x).join(" ");
41
+ const S = r.split(" "), j = S[0], x = o.split(",").map((u) => u.trim()).filter(Boolean).map((u) => `${j}--${u}`);
42
+ this.lismClass = S.concat(x).join(" ");
43
43
  }
44
- this.className = g(this.lismClass, this.lismState, i, e), w(a) || (this.attrs = a, this.analyzeProps(a)), s && (this.attrs.ref = s), f != null && typeof f == "object" && this.setPassProps(f);
44
+ this.className = g(this.lismClass, this.lismState, i, e), w(a) || (this.attrs = a, this.analyzeProps(a)), s && (this.attrs.ref = s), n != null && typeof n == "object" && this.setPassProps(n);
45
45
  }
46
46
  // 特定の条件下で受け取るpropの処理
47
47
  setContextProps(t, s) {
@@ -76,12 +76,12 @@ class A {
76
76
  // prop解析
77
77
  analyzeProp(t, s, i) {
78
78
  if (s == null || (i = i || y[t] || null, i === null)) return;
79
- const { name: e, objProcessor: r, ...l } = i, { base: o, ...f } = U(s);
79
+ const { name: e, objProcessor: r, ...l } = i, { base: o, ...n } = U(s);
80
80
  s = o, s != null && typeof s == "object" ? r && Object.keys(s).forEach((h) => {
81
- const n = r(h);
82
- this.analyzeProp(n, s[h]);
83
- }) : this.setAttrs(e || t, s, l), Object.keys(f).forEach((h) => {
84
- this.setAttrs(e || t, f[h], l, h);
81
+ const f = r(h);
82
+ this.analyzeProp(f, s[h]);
83
+ }) : this.setAttrs(e || t, s, l), Object.keys(n).forEach((h) => {
84
+ this.setAttrs(e || t, n[h], l, h);
85
85
  });
86
86
  }
87
87
  addUtil(t) {
@@ -116,26 +116,26 @@ class A {
116
116
  setAttrs(t, s, i = {}, e) {
117
117
  if (s == null) return;
118
118
  let r = `--${t}`, l = `-${i.utilKey || t}`;
119
- if (e ? (r = `--${e}-${t}`, l += `@${e}`) : l += ":", typeof s == "string" && s.startsWith("u:")) {
119
+ if (e && (r = `--${t}_${e}`, l += `_${e}`), typeof s == "string" && s.startsWith("u:")) {
120
120
  this.addUtil(`${l}${s.replace("u:", "")}`);
121
121
  return;
122
122
  }
123
123
  if (!e) {
124
- let { presets: h, utils: n } = i;
124
+ let { presets: h, utils: f } = i;
125
125
  if (h && (h === 1 && (h = t), E(h, s))) {
126
- this.addUtil(`${l}${s}`);
126
+ this.addUtil(`${l}:${s}`);
127
127
  return;
128
128
  }
129
- if (n) {
130
- n === 1 && (n = t);
131
- const a = $(n, s);
129
+ if (f) {
130
+ f === 1 && (f = t);
131
+ const a = $(f, s);
132
132
  if (a) {
133
- this.addUtil(`${l}${a}`);
133
+ this.addUtil(`${l}:${a}`);
134
134
  return;
135
135
  }
136
136
  }
137
137
  }
138
- let { style: o, converter: f } = i;
138
+ let { style: o, converter: n } = i;
139
139
  if (s === !0 || s === "-") {
140
140
  this.addUtil(l);
141
141
  return;
@@ -144,7 +144,7 @@ class A {
144
144
  this.setMixColor(t, s);
145
145
  return;
146
146
  }
147
- if (f && (s = c(s, f, t)), !e && o) {
147
+ if (n && (s = c(s, n, t)), !e && o) {
148
148
  o === 1 && (o = t), this.addStyle(o, s);
149
149
  return;
150
150
  }
@@ -177,12 +177,12 @@ class A {
177
177
  });
178
178
  return;
179
179
  }
180
- t === "-" || t === !0 ? this.addUtil("-hov:") : typeof t == "string" ? C(t).forEach((s) => {
180
+ t === "-" || t === !0 ? this.addUtil("-hov") : typeof t == "string" ? C(t).forEach((s) => {
181
181
  this.addUtil(`-hov:${s}`);
182
182
  }) : typeof t == "object" && Object.keys(t).forEach((s) => {
183
183
  let i = t[s];
184
184
  const e = m(s);
185
- e && (i = c(i, e, s)), this.addUtil(`-hov:${s}:`), this.addStyle(`--hov-${s}`, i);
185
+ e && (i = c(i, e, s)), this.addUtil(`-hov:${s}`), this.addStyle(`--hov-${s}`, i);
186
186
  });
187
187
  }
188
188
  }
@@ -191,7 +191,7 @@ class A {
191
191
  if (typeof t == "string" && t.includes(",") && !t.includes("(")) {
192
192
  C(t).forEach((s) => {
193
193
  const i = $("bd", s) || s;
194
- i === "all" ? i && this.addUtil("-bd:") : i && this.addUtil(`-bd:${i}`);
194
+ i === "all" ? i && this.addUtil("-bd") : i && this.addUtil(`-bd:${i}`);
195
195
  });
196
196
  return;
197
197
  }
@@ -206,17 +206,17 @@ class A {
206
206
  isFlow: r,
207
207
  isContainer: l,
208
208
  hasGutter: o,
209
- isLayer: f,
209
+ isLayer: n,
210
210
  isLinkBox: h,
211
- ...n
211
+ ...f
212
212
  }) {
213
- return t || (l && this.setContainerData(l), r && this.setFlowData(r), s && this.lismState.push("is--overwide"), i && this.lismState.push("is--fullwide"), e && this.lismState.push("is--wide"), o && this.lismState.push("has--gutter")), f && this.lismState.push("is--layer"), h && this.lismState.push("is--linkBox"), n;
213
+ return t || (l && this.setContainerData(l), r && this.setFlowData(r), s && this.lismState.push("is--overwide"), i && this.lismState.push("is--fullwide"), e && this.lismState.push("is--wide"), o && this.lismState.push("has--gutter")), n && this.lismState.push("is--layer"), h && this.lismState.push("is--linkBox"), f;
214
214
  }
215
215
  setContainerData(t) {
216
- t === !0 ? this.lismState.push("is--container") : t && (S("contentSize", t) ? this.lismState.push(`is--container -container:${t}`) : (this.lismState.push("is--container"), this.addStyle("--item-size", c(t, "size"))));
216
+ t === !0 ? this.lismState.push("is--container") : t && (P("contentSize", t) ? this.lismState.push(`is--container -container:${t}`) : (this.lismState.push("is--container"), this.addStyle("--contentSize", c(t, "size"))));
217
217
  }
218
218
  setFlowData(t) {
219
- t === !0 ? this.lismState.push("is--flow") : t && (S("flow", t) ? this.lismState.push(`is--flow -flow:${t}`) : (this.lismState.push("is--flow -flow:"), this.addStyle("--flowGap", c(t, "space"))));
219
+ t === !0 ? this.lismState.push("is--flow") : t && (P("flow", t) ? this.lismState.push(`is--flow -flow:${t}`) : (this.lismState.push("is--flow"), this.addStyle("--flowM", c(t, "space"))));
220
220
  }
221
221
  }
222
222
  function F(d, t = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lism-css",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "description": "A layout-first CSS framework for websites.",
5
5
  "author": {
6
6
  "name": "ddryo",
@@ -19,12 +19,13 @@
19
19
  }
20
20
 
21
21
  @mixin echoBaseUtil($key, $prop, $base_type, $important) {
22
- @if $base_type == 2 {
22
+ @if $base_type == 2 or $base_type == 3 {
23
+ .-#{$key},
23
24
  [class*='-#{$key}:'] {
24
25
  #{$prop}: var(--#{$key}) #{get_important_str($important)};
25
26
  }
26
27
  } @else if $base_type == 1 {
27
- .-#{$key}\: {
28
+ .-#{$key} {
28
29
  #{$prop}: var(--#{$key}) #{get_important_str($important)};
29
30
  }
30
31
  }
@@ -62,7 +63,7 @@
62
63
  // valueが(prop:val)で詳細に明示されている場合
63
64
  @if (meta.type-of($value) == map) {
64
65
  @include echoDetailValues($selector, $value);
65
- } @else if $base_type == 2 {
66
+ } @else if $base_type == 2 or $base_type == 3 {
66
67
  // important は [class*=] についてるので不要
67
68
  #{$selector} {
68
69
  --#{$key}: #{$value};
@@ -186,9 +187,20 @@ $bp_outputs: (
186
187
  $important: 1;
187
188
  }
188
189
 
189
- .-#{$key}\@#{$bp} {
190
- #{$prop_name}: var(--#{$bp}-#{$key}) #{get_important_str($important)};
190
+ @if $base_type == 2 {
191
+ .-#{$key}_#{$bp} {
192
+ --#{$key}: var(--#{$key}_#{$bp}) !important;
193
+ #{$prop_name}: var(--#{$key}_#{$bp}) #{get_important_str($important)};
194
+ }
195
+ } @else {
196
+ .-#{$key}_#{$bp} {
197
+ #{$prop_name}: var(--#{$key}_#{$bp}) #{get_important_str($important)};
198
+ }
191
199
  }
200
+
201
+ // .-#{$key}_#{$bp} {
202
+ // #{$prop_name}: var(--#{$key}_#{$bp}) #{get_important_str($important)};
203
+ // }
192
204
  }
193
205
  }
194
206
  }
@@ -10,11 +10,11 @@ utilities: ユーティリティクラスのセレクタと値のリスト
10
10
  base_type:
11
11
  0 → なし(ユーティリティクラス以外は普通のインラインスタイルのみ)
12
12
  1 → .-d\:{display: var(--d)}  (メリット:importantなしでbp対応できる)
13
- 2 → [class*='-p\:'] {padding: var(--p);} のように出力される
14
- トークンが定義されているような主要なプロパティは基本これ。
15
- メリット: ユーティリティクラスも変数を使えるので、数が多ければ文字数省略できる
16
- 全て変数で出力されるようになるので、他の処理と絡ませることがしやすい。
17
- デメリット: *= は処理負荷が高い。
13
+ 2 → .-p, [class*='-p\:'] {padding: var(--p);} の形式で、BPクラス含めて全て変数にセットするもの。
14
+ 常に変数で管理されるようになるので、他の処理と絡ませることがしやすい。
15
+ デメリット: *= は処理負荷が高い。また、途中のBPから使えるようにするにはCSS記述増える)
16
+
17
+ 3 → BPクラスには変数使わないが、文字数省略のため baseのProp classだけ変数化して *= セレクタ使う
18
18
 
19
19
 
20
20
  bp:1 は基本 base_type:1. --bdw などは base_type:0.
@@ -71,7 +71,6 @@ $place_utils: (
71
71
  $props: (
72
72
  'w': (
73
73
  prop: 'width',
74
- base_type: 1,
75
74
  utilities: (
76
75
  // 'a': 'auto',
77
76
  'fit': 'fit-content',
@@ -81,7 +80,6 @@ $props: (
81
80
  ),
82
81
  'h': (
83
82
  prop: 'height',
84
- base_type: 1,
85
83
  utilities: (
86
84
  // 'a': 'auto',
87
85
  'fit': 'fit-content',
@@ -93,7 +91,6 @@ $props: (
93
91
  ),
94
92
  'maxW': (
95
93
  prop: 'max-width',
96
- base_type: 1,
97
94
  utilities: (
98
95
  '100\\%': '100%',
99
96
  ),
@@ -101,7 +98,6 @@ $props: (
101
98
  ),
102
99
  'minW': (
103
100
  prop: 'min-width',
104
- base_type: 1,
105
101
  utilities: (
106
102
  '100\\%': '100%',
107
103
  ),
@@ -109,7 +105,6 @@ $props: (
109
105
  ),
110
106
  'maxH': (
111
107
  prop: 'max-height',
112
- base_type: 1,
113
108
  utilities: (
114
109
  '100\\%': '100%',
115
110
  ),
@@ -117,7 +112,6 @@ $props: (
117
112
  ),
118
113
  'minH': (
119
114
  prop: 'min-height',
120
- base_type: 1,
121
115
  utilities: (
122
116
  '100\\%': '100%',
123
117
  '100lvh': '100lvh',
@@ -296,9 +290,9 @@ $props: (
296
290
  'f': 'flex',
297
291
  'g': 'grid',
298
292
  'i': 'inline',
293
+ 'ib': 'inline-block',
299
294
  'if': 'inline-flex',
300
295
  'ig': 'inline-grid',
301
- 'ib': 'inline-block',
302
296
  ),
303
297
  ),
304
298
  'v': (
@@ -354,14 +348,10 @@ $props: (
354
348
  '4': 'var(--bdrs--4)',
355
349
  '5': 'var(--bdrs--5)',
356
350
  '99': 'var(--bdrs--99)',
357
- 'inner': (
358
- 'border-radius': 'calc(var(--bdrs, 0) - var(--p, 0) * 0.9)',
359
- ),
360
351
  ),
361
352
  ),
362
353
  'bxsh': (
363
354
  prop: 'box-shadow',
364
- base_type: 2,
365
355
  utilities: (
366
356
  '0': '0',
367
357
  '1': 'var(--bxsh--1)',
@@ -381,13 +371,13 @@ $props: (
381
371
  ),
382
372
  'px': (
383
373
  prop: 'padding-inline',
384
- base_type: 2,
374
+ base_type: 3,
385
375
  bp: 1,
386
376
  utilities: $space_values,
387
377
  ),
388
378
  'py': (
389
379
  prop: 'padding-block',
390
- base_type: 2,
380
+ base_type: 3,
391
381
  bp: 1,
392
382
  utilities: $space_values,
393
383
  ),
@@ -409,13 +399,13 @@ $props: (
409
399
  ),
410
400
  'pis': (
411
401
  prop: 'padding-inline-start',
412
- base_type: 2,
402
+ base_type: 3,
413
403
  bp: 1,
414
404
  utilities: $space_values,
415
405
  ),
416
406
  'pbs': (
417
407
  prop: 'padding-block-start',
418
- base_type: 2,
408
+ base_type: 3,
419
409
  bp: 1,
420
410
  utilities: $space_values,
421
411
  ),
@@ -457,13 +447,13 @@ $props: (
457
447
  ),
458
448
  'mis': (
459
449
  prop: 'margin-inline-start',
460
- base_type: 2,
450
+ base_type: 3,
461
451
  bp: 1,
462
452
  utilities: map.merge($auto, $space_values),
463
453
  ),
464
454
  'mbs': (
465
455
  prop: 'margin-block-start',
466
- base_type: 2,
456
+ base_type: 3,
467
457
  bp: 1,
468
458
  utilities: map.merge($auto, $space_values),
469
459
  ),
@@ -695,7 +685,7 @@ $props: (
695
685
  '-45': '-45deg',
696
686
  '90': '90deg',
697
687
  '-90': '-90deg',
698
- '180': '180deg',
688
+ // '180': '180deg',
699
689
  ),
700
690
  ),
701
691
  'whs': (
@@ -3,10 +3,10 @@
3
3
 
4
4
  @use './props' as props;
5
5
 
6
- $layer_mode: 0 !default;
6
+ $layer_mode: 1 !default;
7
7
  $default_important: 0 !default;
8
8
  $is_container_query: 1 !default;
9
- $common_support_bp: 'lg' !default;
9
+ $common_support_bp: 'md' !default;
10
10
 
11
11
  $breakpoints: () !default;
12
12
  $breakpoints: map.merge(
package/src/scss/all.scss CHANGED
@@ -1,10 +1,6 @@
1
1
  /*
2
2
  @layer 使う
3
3
  */
4
- @use './setting' with (
5
- $layer_mode: 1
6
- );
7
-
8
4
  @use './with_layer';
9
5
  @use './utility/index' as utility;
10
6
  @use './props/index' as props;
@@ -1,6 +1,10 @@
1
1
  /*
2
- resetした上で、 各要素の標準スタイルを定義する
2
+ @layerなし
3
3
  */
4
+ @use './setting' with (
5
+ $layer_mode: 0
6
+ );
7
+
4
8
  // reset
5
9
  @use './reset' as reset;
6
10
 
@@ -0,0 +1,43 @@
1
+ // @property が使える環境であればコンテナのさらに親要素の幅を参照できるので、containerを1段階飛び出せる。
2
+ // cqw を算出値で保持するために登録済みカスタムプロパティとして定義
3
+ @property --overwideSize {
4
+ syntax: '<length-percentage>';
5
+ initial-value: 100%;
6
+ inherits: true;
7
+ }
8
+
9
+ // @property --flowM {
10
+ // syntax: '*';
11
+ // inherits: true;
12
+ // }
13
+
14
+ /* ------------------------------------------------------------
15
+ ハーフレディング
16
+
17
+ Memo: --herfLeadingとは別に--negativeHLを定義しているのは、トリミングをしないために 0px に上書きした要素でも --herfLeading 自体の値は無効にしないようにするため。
18
+ これにより、imgに対してmargin-block-start:var(--herfLeading) を適用して余白を揃えたりできる。
19
+ */
20
+ @property --herfLeading {
21
+ syntax: '*';
22
+ inherits: false;
23
+ initial-value: calc((1lh - 1em) / 2);
24
+ }
25
+
26
+ // トリミングするネガティブマージン
27
+ // Memo: initial-valueでvar(--herfLeading)は使えなかった
28
+ @property --trimHL {
29
+ syntax: '*';
30
+ inherits: false;
31
+ initial-value: calc((1lh - 1em) / 2 * -1);
32
+ }
33
+
34
+ // :lang(en) {
35
+ // --herfLeading: calc((1lh - 1cap) / 2);
36
+ // }
37
+
38
+ // lh非サポートブラウザ用のフォールバック
39
+ // @supports not (gap: 1lh) {
40
+ // :root {
41
+ // --herfLeading: 0px;
42
+ // }
43
+ // }
@@ -34,11 +34,10 @@
34
34
  // --s90: 18rem;
35
35
 
36
36
  // .is--flow の余白
37
- --flowGap--s: var(--s30);
38
- --flowGap--m: var(--s40);
39
- --flowGap--l: var(--s50);
40
- --flowGap--h: 2.5em;
41
- // --flowGap: var(--flowGap--m);
37
+ --flowM--s: var(--s20);
38
+ --flowM--m: var(--s40);
39
+ // --flowM--l: var(--s50);
40
+ --flowM--h: 1em; /* --flowM に追加する値 */
42
41
 
43
42
  // コンテンツの左右の余白
44
43
  --gutter: var(--s40);
@@ -192,13 +191,12 @@
192
191
  // base
193
192
  // --c--base: hsl(225 8% 98%);
194
193
  --c--base: hsl(224 6% 99%);
195
- --c--base-2: hsl(224 10% 94%);
194
+ --c--base-2: hsl(224 10% 94%); // secondary
196
195
  // --c--base-3: hsl(220 8% 86%); // border用
197
196
 
198
197
  // text
199
- --c--text-hsl: 224 4% 8%; // shadowにも使う
200
- --c--text: hsl(var(--c--text-hsl));
201
- --c--text-2: hsl(224 4% 40%);
198
+ --c--text: hsl(224 4% 8%);
199
+ --c--text-2: hsl(224 4% 40%); // secondary
202
200
  // --text-3: hsl(224, 4%, 50%); //hsl(200, 12%, 92%);
203
201
 
204
202
  // --sh-hsl
@@ -229,11 +227,11 @@
229
227
  radius
230
228
  ------------------------------------------------------------ */
231
229
  // 等比
232
- --bdrs--1: 0.125rem; // base
233
- --bdrs--2: 0.25rem; // * 2
234
- --bdrs--3: 0.5rem; // * 4
235
- --bdrs--4: 1rem; // * 8
236
- --bdrs--5: 2rem; // * 16
230
+ --bdrs--1: 2px;
231
+ --bdrs--2: 4px;
232
+ --bdrs--3: 0.5rem; // 8px
233
+ --bdrs--4: 1rem; // 16px
234
+ --bdrs--5: 2rem; // 32px
237
235
  --bdrs--99: 99rem;
238
236
 
239
237
  // 1, 2, 3, 5, 8, 13,
@@ -247,8 +245,7 @@
247
245
  /* ------------------------------------------------------------
248
246
  shadow
249
247
  ------------------------------------------------------------ */
250
- // --sh-hsl: 220 20% 20%;
251
- --sh-hsl: var(--c--text-hsl);
248
+ --sh-hsl: 220 4% 8%;
252
249
  --sh-a: 5%;
253
250
 
254
251
  // --sh-a--base: calc(var(--sh-a) - 4%);
@@ -288,34 +285,3 @@
288
285
  // --filter--lighten: brightness(1.15);
289
286
  // --filter--darken: brightness(0.85);
290
287
  }
291
-
292
- /* ------------------------------------------------------------
293
- ハーフレディング
294
-
295
- Memo: --herfLeadingとは別に--negativeHLを定義しているのは、トリミングをしないために 0px に上書きした要素でも --herfLeading 自体の値は無効にしないようにするため。
296
- これにより、imgに対してmargin-block-start:var(--herfLeading) を適用して余白を揃えたりできる。
297
- */
298
- @property --herfLeading {
299
- syntax: '*';
300
- inherits: false;
301
- initial-value: calc((1lh - 1em) / 2);
302
- }
303
-
304
- // トリミングするネガティブマージン
305
- // Memo: initial-valueでvar(--herfLeading)は使えなかった
306
- @property --trimHL {
307
- syntax: '*';
308
- inherits: false;
309
- initial-value: calc((1lh - 1em) / 2 * -1);
310
- }
311
-
312
- // :lang(en) {
313
- // --herfLeading: calc((1lh - 1cap) / 2);
314
- // }
315
-
316
- // lh非サポートブラウザ用のフォールバック
317
- // @supports not (gap: 1lh) {
318
- // :root {
319
- // --herfLeading: 0px;
320
- // }
321
- // }
@@ -1,5 +1,6 @@
1
1
  @use '../_mixin' as mixin;
2
2
 
3
+ @forward './property';
3
4
  @forward './tokens';
4
5
 
5
6
  // 各html要素のベーススタイル
@@ -15,7 +16,7 @@
15
16
  --hov-trsdu: 0.3s;
16
17
 
17
18
  // is--overwide で使用
18
- --overwide-size: 100vw;
19
+ --overwideSize: 100vw;
19
20
 
20
21
  // :rootで初期セットしてないが定義可能な変数
21
22
  // --heading-ff
@@ -13,14 +13,14 @@
13
13
 
14
14
  // bdc, bdw などでカラーや太さを上書きできるように border 自体を変数管理
15
15
  // :where(.has--bd),
16
- @include mixin.maybe_where('[class*="-bd:"]', 'base') {
16
+ @include mixin.maybe_where('.-bd,[class*="-bd:"]', 'base') {
17
17
  --bds: solid;
18
18
  --bdw: 1px;
19
19
  --bdc: currentColor;
20
20
  --bd: var(--bdw) var(--bds) var(--bdc);
21
21
  }
22
22
  // .has--bd:where(:not([class*='-bd:'])) {
23
- .-bd\: {
23
+ .-bd {
24
24
  border-style: var(--bds);
25
25
  border-width: var(--bdw);
26
26
  border-color: var(--bdc);
@@ -27,23 +27,23 @@
27
27
  // ------------------------------------------------------------
28
28
  // 値指定
29
29
  // ------------------------------------------------------------
30
- .-hov\:c\::hover {
31
- color: var(--hov-c) !important;
30
+ .-hov\:c:hover {
31
+ color: var(--hov-c);
32
32
  }
33
- .-hov\:bdc\::hover {
34
- border-color: var(--hov-bdc) !important;
33
+ .-hov\:bdc:hover {
34
+ border-color: var(--hov-bdc);
35
35
  }
36
- .-hov\:bgc\::hover {
37
- background-color: var(--hov-bgc) !important;
36
+ .-hov\:bgc:hover {
37
+ background-color: var(--hov-bgc);
38
38
  }
39
- .-hov\:bxsh\::hover {
39
+ .-hov\:bxsh:hover {
40
40
  box-shadow: var(--hov-bxsh);
41
41
  }
42
42
 
43
- // .-hov\:op\::hover {
43
+ // .-hov\:op:hover {
44
44
  // opacity: var(--hov-op) !important;
45
45
  // }
46
- // .-hov\:filter\::hover {
46
+ // .-hov\:filter:hover {
47
47
  // filter: var(--hov-filter) !important;
48
48
  // }
49
49
  .-hov\:set:hover {
@@ -1,13 +1,13 @@
1
1
  @use '../_mixin' as mixin;
2
2
 
3
3
  // 変数初期セット(親子関係で影響しないように)
4
- @include mixin.maybe_where('.-trs\\:', 'base') {
4
+ @include mixin.maybe_where('.-trs', 'base') {
5
5
  --trsdu: var(--trsdu--default);
6
6
  --trsp: all;
7
7
  --trstf: ease;
8
8
  }
9
9
 
10
- .-trs\: {
10
+ .-trs {
11
11
  transition: var(--trsdu) var(--trstf);
12
12
  transition-property: var(--trsp);
13
13
  // transition-duration: var(--trsdu);
@@ -9,4 +9,5 @@
9
9
  // 自動生成
10
10
  @forward '../auto_output';
11
11
 
12
+ // Prop Classの最後で読み込む
12
13
  @forward './hover';
@@ -3,9 +3,13 @@
3
3
  container-type: inline-size;
4
4
  margin-inline: auto;
5
5
  inline-size: 100%; // gridやflex内での挙動を考慮。(container-type:inline-sizeだと横幅つぶれる)
6
- // --wide-size: 100%;
6
+ // --wideSize: 100%;
7
+
8
+ // .is--overwide のサイズを is--container ごとにセット。
9
+ --overwideSize: 100cqw;
10
+
7
11
  > * {
8
- --maxIs: var(--item-size, 100%);
12
+ --maxIs: var(--contentSize, 100%);
9
13
  max-inline-size: min(100%, var(--maxIs, 100%));
10
14
  margin-inline: auto;
11
15
  }
@@ -13,14 +17,14 @@
13
17
 
14
18
  // Memo: それぞれの直下要素( > * ) に対してスタイルをセットした方が、ネスト時の影響をなくせるが、constrainedのネストが多様されることは少ないので親側の変数管理のみで実装。
15
19
  .-container\:s {
16
- --item-size: var(--size--s);
17
- --wide-size: var(--size--m);
20
+ --contentSize: var(--size--s);
21
+ --wideSize: var(--size--m);
18
22
  }
19
23
  .-container\:m {
20
- --item-size: var(--size--m);
21
- --wide-size: var(--size--l);
24
+ --contentSize: var(--size--m);
25
+ --wideSize: var(--size--l);
22
26
  }
23
27
  .-container\:l {
24
- --item-size: var(--size--l);
25
- --wide-size: var(--size--xl);
28
+ --contentSize: var(--size--l);
29
+ --wideSize: var(--size--xl);
26
30
  }