lism-css 0.3.4 → 0.5.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 (253) hide show
  1. package/README.md +2 -2
  2. package/bin/build-config.js +157 -0
  3. package/bin/build-css.cjs +92 -0
  4. package/bin/build-css.js +90 -0
  5. package/bin/cli.mjs +69 -0
  6. package/bin/script-build-css.js +6 -0
  7. package/config/__prop_list.js +44 -0
  8. package/config/__props.scss +25 -0
  9. package/config/default-config.js +9 -0
  10. package/config/defaults/__props-memo.js +45 -0
  11. package/config/defaults/props.js +370 -0
  12. package/config/defaults/states.js +42 -0
  13. package/config/defaults/tokens.js +26 -0
  14. package/config/helper/getSvgUrl.js +28 -0
  15. package/config/helper/minifyHtml.js +22 -0
  16. package/config/helper.js +67 -0
  17. package/config/index.js +15 -0
  18. package/config.js +2 -0
  19. package/dist/components/Accordion/AccIcon.js +1 -1
  20. package/dist/components/Accordion/getProps.js +15 -17
  21. package/dist/components/Accordion/index.js +4 -4
  22. package/dist/components/Accordion/index2.js +28 -23
  23. package/dist/components/Accordion/setAccordion.js +11 -11
  24. package/dist/components/Box/index.js +5 -6
  25. package/dist/components/Center/index.js +2 -2
  26. package/dist/components/Cluster/index.js +8 -0
  27. package/dist/components/Columns/index.js +5 -6
  28. package/dist/components/Container/index.js +3 -3
  29. package/dist/components/Dummy/index.js +9 -14
  30. package/dist/components/Dummy/texts.js +6 -6
  31. package/dist/components/Flex/index.js +5 -6
  32. package/dist/components/Flow/index.js +8 -0
  33. package/dist/components/Frame/index.js +5 -6
  34. package/dist/components/Grid/index.js +5 -6
  35. package/dist/components/HTML/index.js +5 -0
  36. package/dist/components/HTML/index2.js +44 -0
  37. package/dist/components/Layer/index.js +5 -5
  38. package/dist/components/LinkBox/index.js +6 -6
  39. package/dist/components/Lism/Link.js +5 -5
  40. package/dist/components/Lism/Text.js +4 -4
  41. package/dist/components/Lism/index.js +5 -4
  42. package/dist/components/Modal/Body.js +5 -5
  43. package/dist/components/Modal/CloseBtn.js +13 -0
  44. package/dist/components/Modal/Inner.js +5 -5
  45. package/dist/components/Modal/OpenBtn.js +9 -0
  46. package/dist/components/Modal/getProps.js +12 -13
  47. package/dist/components/Modal/index.js +4 -5
  48. package/dist/components/Modal/index2.js +12 -12
  49. package/dist/components/Stack/index.js +5 -5
  50. package/dist/components/Tabs/Tab.js +7 -9
  51. package/dist/components/Tabs/TabList.js +4 -4
  52. package/dist/components/Tabs/TabPanel.js +6 -7
  53. package/dist/components/Tabs/getProps.js +1 -8
  54. package/dist/components/Tabs/index2.js +14 -23
  55. package/dist/components/WithSide/index.js +4 -5
  56. package/dist/components/atomic/Decorator/getProps.js +13 -0
  57. package/dist/components/{Decorator → atomic/Decorator}/index.js +1 -1
  58. package/dist/components/atomic/Divider/getProps.js +10 -0
  59. package/dist/components/atomic/Divider/index.js +9 -0
  60. package/dist/components/atomic/Icon/getProps.js +59 -0
  61. package/dist/components/{Icon → atomic/Icon}/index.js +1 -1
  62. package/dist/components/atomic/Media/getProps.js +9 -0
  63. package/dist/components/atomic/Media/index.js +9 -0
  64. package/dist/components/atomic/Spacer/getProps.js +21 -0
  65. package/dist/components/atomic/Spacer/index.js +9 -0
  66. package/dist/components/getFilterProps.js +8 -18
  67. package/dist/components/getLayoutProps.js +27 -0
  68. package/dist/config/default-config.js +11 -0
  69. package/dist/config/defaults/props.js +342 -0
  70. package/dist/config/defaults/states.js +36 -0
  71. package/dist/config/defaults/tokens.js +29 -0
  72. package/dist/config/helper/getSvgUrl.js +4 -0
  73. package/dist/config/helper.js +31 -0
  74. package/dist/config/index.js +11 -0
  75. package/dist/index.js +50 -50
  76. package/dist/lib/getBpData.js +1 -1
  77. package/dist/lib/getLismProps.js +109 -177
  78. package/dist/lib/getMaybeCssVar.js +30 -54
  79. package/dist/lib/getMaybeTokenValue.js +26 -0
  80. package/dist/lib/getUtilKey.js +13 -0
  81. package/dist/lib/isPresetValue.js +3 -3
  82. package/dist/lib/isTokenValue.js +6 -5
  83. package/package.json +16 -3
  84. package/packages/astro/Accordion/AccBody.astro +5 -6
  85. package/packages/astro/Accordion/AccHeader.astro +4 -4
  86. package/packages/astro/Accordion/AccHeaderLabel.astro +12 -0
  87. package/packages/astro/Accordion/AccIcon.astro +1 -1
  88. package/packages/astro/Accordion/AccLabel.astro +1 -1
  89. package/packages/astro/Accordion/Accordion.astro +1 -1
  90. package/packages/astro/Accordion/index.js +2 -1
  91. package/packages/astro/Box/Box.astro +2 -3
  92. package/packages/astro/Center/Center.astro +2 -8
  93. package/packages/astro/Cluster/Cluster.astro +5 -0
  94. package/packages/astro/Cluster/index.js +1 -0
  95. package/packages/astro/Columns/Columns.astro +2 -8
  96. package/packages/astro/Container/Container.astro +3 -4
  97. package/packages/astro/Decorator/Decorator.astro +2 -2
  98. package/packages/astro/Divider/Divider.astro +3 -3
  99. package/packages/astro/Dummy/Dummy.astro +3 -2
  100. package/packages/astro/Flex/Flex.astro +1 -10
  101. package/packages/astro/Flex/index.js +0 -1
  102. package/packages/astro/Flow/Flow.astro +5 -0
  103. package/packages/astro/Flow/index.js +1 -0
  104. package/packages/astro/Frame/Frame.astro +1 -8
  105. package/packages/astro/Grid/Grid.astro +1 -9
  106. package/packages/astro/Grid/index.js +0 -1
  107. package/packages/astro/HTML/a.astro +5 -0
  108. package/packages/astro/HTML/button.astro +5 -0
  109. package/packages/astro/HTML/div.astro +5 -0
  110. package/packages/astro/HTML/h.astro +6 -0
  111. package/packages/astro/HTML/img.astro +5 -0
  112. package/packages/astro/HTML/index.js +12 -0
  113. package/packages/astro/HTML/li.astro +5 -0
  114. package/packages/astro/HTML/ol.astro +5 -0
  115. package/packages/astro/HTML/p.astro +5 -0
  116. package/packages/astro/HTML/span.astro +5 -0
  117. package/packages/astro/HTML/ul.astro +5 -0
  118. package/packages/astro/Icon/Icon.astro +3 -5
  119. package/packages/astro/Layer/Layer.astro +3 -10
  120. package/packages/astro/LinkBox/LinkBox.astro +4 -5
  121. package/packages/astro/Lism/Link.astro +2 -2
  122. package/packages/astro/Lism/Lism.astro +4 -3
  123. package/packages/astro/Lism/Text.astro +2 -2
  124. package/packages/astro/Lism/index.js +0 -1
  125. package/packages/astro/{Lism → Media}/Media.astro +1 -9
  126. package/packages/astro/Media/index.js +1 -0
  127. package/packages/astro/Modal/Body.astro +4 -5
  128. package/packages/astro/Modal/CloseBtn.astro +24 -0
  129. package/packages/astro/Modal/Inner.astro +4 -4
  130. package/packages/astro/Modal/Modal.astro +4 -5
  131. package/packages/astro/Modal/OpenBtn.astro +14 -0
  132. package/packages/astro/Modal/index.js +3 -4
  133. package/packages/astro/OverlayLink/OverlayLink.astro +1 -1
  134. package/packages/astro/Spacer/Spacer.astro +3 -3
  135. package/packages/astro/Stack/Stack.astro +2 -4
  136. package/packages/astro/Tabs/Tab.astro +2 -11
  137. package/packages/astro/Tabs/TabList.astro +4 -4
  138. package/packages/astro/Tabs/TabPanel.astro +4 -4
  139. package/packages/astro/Tabs/Tabs.astro +6 -10
  140. package/packages/astro/Test/Test.astro +1 -1
  141. package/packages/astro/Test/TestItem.astro +1 -1
  142. package/packages/astro/WithSide/WithSide.astro +1 -8
  143. package/packages/astro/index.js +6 -2
  144. package/packages/types/index.d.ts +31 -38
  145. package/src/scss/{_props.scss → __props copy.scss } +146 -169
  146. package/src/scss/__props.scss +786 -0
  147. package/src/scss/_auto_output.scss +102 -76
  148. package/src/scss/_prop-config.scss +862 -0
  149. package/src/scss/_setting.scss +2 -3
  150. package/src/scss/_with_layer.scss +19 -14
  151. package/src/scss/base/_dom.scss +35 -26
  152. package/src/scss/base/_property.scss +4 -16
  153. package/src/scss/base/_tokens.scss +105 -116
  154. package/src/scss/base/index.scss +18 -42
  155. package/src/scss/base/set/_hover.scss +13 -0
  156. package/src/scss/base/set/_innerRs.scss +3 -0
  157. package/src/scss/base/set/_mask.scss +6 -0
  158. package/src/scss/base/set/_plain.scss +14 -0
  159. package/src/scss/base/set/_shadow.scss +27 -0
  160. package/src/scss/base/set/_snap.scss +8 -0
  161. package/src/scss/base/set/_transition.scss +20 -0
  162. package/src/scss/main.scss +0 -1
  163. package/src/scss/main_no_layer.scss +6 -14
  164. package/src/scss/modules/atomic/_divider.scss +6 -0
  165. package/src/scss/{layout → modules/atomic}/_icon.scss +3 -9
  166. package/src/scss/modules/atomic/_media.scss +3 -0
  167. package/src/scss/{layout → modules/atomic}/_spacer.scss +1 -1
  168. package/src/scss/modules/atomic/index.scss +6 -0
  169. package/src/scss/{dynamic → modules/dynamic}/_accordion.scss +24 -24
  170. package/src/scss/modules/dynamic/_modal.scss +33 -0
  171. package/src/scss/{dynamic → modules/dynamic}/_tabs.scss +4 -5
  172. package/src/scss/{layout/_flex.scss → modules/layout/_cluster.scss} +1 -4
  173. package/src/scss/modules/layout/_columns.scss +9 -0
  174. package/src/scss/modules/layout/_flex.scss +3 -0
  175. package/src/scss/modules/layout/_flow.scss +46 -0
  176. package/src/scss/{layout → modules/layout}/_frame.scss +1 -1
  177. package/src/scss/modules/layout/_grid.scss +35 -0
  178. package/src/scss/{layout → modules/layout}/_withSide.scss +3 -3
  179. package/src/scss/{layout → modules/layout}/index.scss +4 -6
  180. package/src/scss/modules/state/_container.scss +37 -0
  181. package/src/scss/{state → modules/state}/_linkbox.scss +1 -1
  182. package/src/scss/modules/state/index.scss +5 -0
  183. package/src/scss/props/_border.scss +25 -40
  184. package/src/scss/props/_hover.scss +12 -23
  185. package/src/scss/props/_size.scss +17 -0
  186. package/src/scss/props/index.scss +1 -2
  187. package/src/scss/reset.scss +1 -1
  188. package/src/scss/utility/_cbox.scss +5 -4
  189. package/src/scss/utility/_hidden.scss +14 -0
  190. package/src/scss/utility/_itemDivider.scss +11 -0
  191. package/src/scss/utility/_linkExpand.scss +10 -0
  192. package/src/scss/utility/_trimHL.scss +29 -13
  193. package/src/scss/utility/index.scss +3 -45
  194. package/dist/components/Box/getProps.js +0 -7
  195. package/dist/components/Columns/getProps.js +0 -6
  196. package/dist/components/Decorator/getProps.js +0 -17
  197. package/dist/components/Divider/getProps.js +0 -11
  198. package/dist/components/Divider/index.js +0 -9
  199. package/dist/components/Flex/Cluster.js +0 -8
  200. package/dist/components/Flex/FlexItem.js +0 -8
  201. package/dist/components/Flex/getProps.js +0 -13
  202. package/dist/components/Frame/getProps.js +0 -7
  203. package/dist/components/Grid/GridItem.js +0 -9
  204. package/dist/components/Grid/getProps.js +0 -28
  205. package/dist/components/Icon/getProps.js +0 -60
  206. package/dist/components/Layer/getProps.js +0 -9
  207. package/dist/components/Lism/Media.js +0 -9
  208. package/dist/components/Modal/CloseIconBtn.js +0 -19
  209. package/dist/components/Modal/Footer.js +0 -9
  210. package/dist/components/Modal/Header.js +0 -9
  211. package/dist/components/Spacer/getProps.js +0 -21
  212. package/dist/components/Spacer/index.js +0 -9
  213. package/dist/components/WithSide/getProps.js +0 -14
  214. package/dist/components/getInsetProps.js +0 -8
  215. package/dist/components/getMediaProps.js +0 -7
  216. package/dist/components/getTransformProps.js +0 -8
  217. package/dist/config/prop_list.js +0 -386
  218. package/dist/config/tokens.js +0 -43
  219. package/dist/config.js +0 -9
  220. package/dist/css/base.css +0 -1
  221. package/dist/css/dynamic.css +0 -1
  222. package/dist/css/layout.css +0 -1
  223. package/dist/css/main.css +0 -1
  224. package/dist/css/main_no_layer.css +0 -1
  225. package/dist/css/props.css +0 -1
  226. package/dist/css/reset.css +0 -1
  227. package/dist/css/state.css +0 -1
  228. package/dist/css/utility.css +0 -1
  229. package/dist/lib/getMaybeUtilValue.js +0 -6
  230. package/packages/astro/Flex/Cluster.astro +0 -11
  231. package/packages/astro/Grid/GridItem.astro +0 -15
  232. package/packages/astro/Modal/CloseIconBtn.astro +0 -24
  233. package/packages/astro/Modal/Footer.astro +0 -14
  234. package/packages/astro/Modal/Header.astro +0 -14
  235. package/src/scss/dynamic/_modal.scss +0 -30
  236. package/src/scss/layout/_columns.scss +0 -13
  237. package/src/scss/layout/_divider.scss +0 -3
  238. package/src/scss/layout/_grid.scss +0 -9
  239. package/src/scss/props/__memo.scss +0 -15
  240. package/src/scss/props/_color.scss +0 -7
  241. package/src/scss/props/_transition.scss +0 -20
  242. package/src/scss/state/_container.scss +0 -34
  243. package/src/scss/state/_flow.scss +0 -45
  244. package/src/scss/state/_size.scss +0 -22
  245. package/src/scss/state/index.scss +0 -12
  246. /package/dist/components/{Icon → atomic/Icon}/SVG.js +0 -0
  247. /package/dist/components/{Icon → atomic/Icon}/presets.js +0 -0
  248. /package/packages/astro/{helper/index.js → helper.js} +0 -0
  249. /package/src/scss/{dynamic → modules/dynamic}/index.scss +0 -0
  250. /package/src/scss/{layout → modules/layout}/_center.scss +0 -0
  251. /package/src/scss/{layout → modules/layout}/_stack.scss +0 -0
  252. /package/src/scss/{state → modules/state}/_gutter.scss +0 -0
  253. /package/src/scss/{state → modules/state}/_layer.scss +0 -0
@@ -0,0 +1,20 @@
1
+ @use '../../_mixin' as mixin;
2
+
3
+ .set-transition {
4
+ --duration: var(--transition-duration, 0.4s);
5
+ --delay: 0s;
6
+ --ease: ease;
7
+ --property: all;
8
+ transition: var(--duration) var(--ease) var(--delay);
9
+ transition-property: var(--property);
10
+ }
11
+
12
+ // .-ease\:in {--ease: ease-in;}
13
+ // .-ease\:out {--ease: ease-out;}
14
+ // .-ease\:in-out {--ease: ease-in-out;}
15
+ // .-ease\:linear {--ease: linear;}
16
+
17
+ // .set--animation {
18
+ // animation: var(--duration) var(--ease) var(--delay) var(--animation);
19
+ // }
20
+ // .-anim:slideIn
@@ -2,5 +2,4 @@
2
2
  @layer 使う
3
3
  */
4
4
  @use './with_layer';
5
- @use './utility/index' as utility;
6
5
  @use './props/index' as props;
@@ -5,26 +5,18 @@
5
5
  $layer_mode: 0
6
6
  );
7
7
 
8
- // reset
9
- @use './reset' as reset;
10
-
11
8
  // base
9
+ @use './reset' as reset;
12
10
  @use './base/index' as base;
13
11
 
14
- // layout state
15
- @use './state/index' as state;
12
+ // Modules
13
+ @use './modules/state/index' as state;
14
+ @use './modules/layout/index' as layout;
15
+ @use './modules/atomic/index' as atomic;
16
+ @use './modules/dynamic/index' as dynamic;
16
17
 
17
- // layout modules
18
- @use './layout/index' as layout;
19
-
20
- // dynamic modules
21
- @use './dynamic/index' as dynamic;
22
-
23
- // other modules
24
18
  // @use './component/index' as component;
25
19
 
26
20
  // utility
27
21
  @use './utility/index' as utility;
28
-
29
- // props
30
22
  @use './props/index' as props;
@@ -0,0 +1,6 @@
1
+ .a--divider {
2
+ --bdc: var(--c--line);
3
+ --bds: solid;
4
+ --bdw: 1px;
5
+ border-block-start: var(--bdw) var(--bds) var(--bdc);
6
+ }
@@ -1,20 +1,14 @@
1
- .l--icon {
2
- --scale: 1;
3
- --offset: 0;
4
- scale: var(--scale);
5
- translate: var(--offset);
6
- display: inline-flex;
7
- vertical-align: middle; //下にスペースができるのを防ぐ
1
+ .a--icon {
8
2
  flex-shrink: 0; // Callout など、アイコンはflex直下の子要素にしたい場合も多いので、指定しておく
9
3
  }
10
4
 
11
5
  /* fill指定のない svg にテキストカラーを継承させる */
12
- .l--icon:where(:not([fill])) {
6
+ .a--icon:where(:not([fill])) {
13
7
  fill: currentcolor;
14
8
  }
15
9
 
16
10
  /* 属性によるサイズ指定がない場合 */
17
- .l--icon:where(:not([width])) {
11
+ .a--icon:where(:not([width])) {
18
12
  width: 1em;
19
13
  height: 1em;
20
14
  }
@@ -0,0 +1,3 @@
1
+ .a--media {
2
+ display: block;
3
+ }
@@ -1,3 +1,3 @@
1
- // .l--spacer {
1
+ // .a--spacer {
2
2
  // block-size: 1em;
3
3
  // }
@@ -0,0 +1,6 @@
1
+ // dynamic layout
2
+ @forward './divider';
3
+ // @forward './decorator';
4
+ @forward './icon';
5
+ // @forward './spacer';
6
+ @forward './media';
@@ -1,16 +1,19 @@
1
1
  .d--accordion {
2
- --trsdu: var(--acc--trsdu, 0.4s);
3
- &._opened {
4
- --_notOpened: ;
2
+ --duration: var(--acc-duration, 0.4s);
3
+ &.js-opened {
4
+ --notOpened_: ;
5
5
  }
6
- &:not(._opened) {
7
- --_isOpened: ;
6
+ &:not(.js-opened) {
7
+ --isOpened_: ;
8
8
  }
9
9
  }
10
10
 
11
11
  .d--accordion_header {
12
- outline-offset: -1px; // overflow:clip|hidden; で見えなくなってしまうのを防ぐ
12
+ display: grid;
13
+ grid: auto / 1fr auto;
13
14
  gap: 0.5em;
15
+ align-items: center;
16
+ outline-offset: -1px; // overflow:clip|hidden; で見えなくなってしまうのを防ぐ
14
17
 
15
18
  /* Safariで表示されるデフォルトの三角形アイコンを消す */
16
19
  &::-webkit-details-marker {
@@ -18,37 +21,34 @@
18
21
  }
19
22
  }
20
23
 
21
- // .d--accordion_label {
22
- // flex: 1;
23
- // font: inherit;
24
- // }
25
-
26
24
  .d--accordion_body {
27
- grid-template-rows: 1fr;
28
- transition-property: margin-block, padding-block, opacity, grid-template-rows;
29
- transition-duration: var(--trsdu);
25
+ display: grid;
26
+ grid: 1fr / auto;
27
+ transition-property: margin-block, padding-block, opacity, grid-template;
28
+ transition-duration: var(--duration);
30
29
  }
31
30
 
32
31
  // ※ 正常な animation には必須
33
- // .d--accordion_inner {
34
- // overflow: hidden;
35
- // }
32
+ .d--accordion_inner {
33
+ overflow: hidden;
34
+ }
36
35
 
37
36
  // 閉じている時
38
- :where(.d--accordion:not(._opened)) {
37
+ .d--accordion:not(.js-opened) {
39
38
  > .d--accordion_body {
40
- // opacity: 0.5;
41
- grid-template-rows: 0fr;
39
+ grid: 0fr / auto;
42
40
  padding-block: 0 !important;
43
41
  margin-block: 0 !important;
44
42
  }
45
43
  }
46
44
 
47
45
  // アコーディオンブロックのネスト時、別のアイコンタイプにすると表示が崩れるがそこまでは考慮しない。
48
- :where(.d--accordion_icon) {
46
+ .d--accordion_icon {
47
+ display: grid;
48
+
49
49
  // __icon 自体にborderつけたりすると回転が見えてしまうので、 icon自体を回転させる。
50
- > .l--icon {
51
- transition-duration: var(--trsdu);
52
- rotate: var(--_isOpened, -180deg);
50
+ > .a--icon {
51
+ transition-duration: var(--duration);
52
+ rotate: var(--isOpened_, -180deg);
53
53
  }
54
54
  }
@@ -0,0 +1,33 @@
1
+ // dialog,
2
+ .d--modal {
3
+ --my-s: 0; // flow直下にきても影響しないように
4
+ --offset: 0 0; // アニメーション用
5
+ --duration: var(--modal-duration, 0.5s);
6
+ --backdropBg: rgb(0 0 0 / 0.6);
7
+ max-width: 100%;
8
+ max-height: 100%;
9
+ transition-duration: var(--duration, 0.5s);
10
+
11
+ &::backdrop {
12
+ transition: opacity var(--duration, 0.5s);
13
+ background: var(--backdropBg);
14
+ }
15
+ }
16
+
17
+ .d--modal_inner {
18
+ max-height: 100%;
19
+ background-color: var(--c--base);
20
+ }
21
+
22
+ .d--modal_body {
23
+ overflow: auto;
24
+ overscroll-behavior: contain;
25
+ }
26
+
27
+ .d--modal:not([data-is-open]) {
28
+ translate: var(--offset);
29
+ }
30
+ .d--modal:not([data-is-open]),
31
+ .d--modal:not([data-is-open])::backdrop {
32
+ opacity: 0;
33
+ }
@@ -4,26 +4,25 @@
4
4
  }
5
5
  .d--tabs_list {
6
6
  grid-area: list;
7
+ display: flex;
7
8
  overflow-x: auto;
8
9
  }
9
10
  .d--tabs_tab {
10
11
  &[aria-selected='true'] {
11
- --_notActive: ;
12
+ --notSelected_: ;
12
13
  }
13
14
  &[aria-selected='false'] {
14
- --_isActive: ;
15
+ --isSelected_: ;
15
16
  }
16
17
  // 非アクティブの時、薄いカラーに
17
18
  :where(&) {
18
- color: var(--_notActive, var(--c-text-2));
19
+ color: var(--notSelected_, var(--c--text-2));
19
20
  }
20
21
  }
21
22
 
22
23
  .d--tabs_panel {
23
- // position: relative;
24
24
  grid-area: panel;
25
25
  width: 100%;
26
- overflow-x: auto;
27
26
 
28
27
  &:where([aria-hidden='true']) {
29
28
  display: none;
@@ -1,8 +1,5 @@
1
- .l--flex {
1
+ .l--cluster {
2
2
  display: flex;
3
- }
4
-
5
- .l--flex-cluster {
6
3
  flex-wrap: wrap;
7
4
  align-items: center; // stretch を解除
8
5
  }
@@ -0,0 +1,9 @@
1
+ /*
2
+ memo: グリッドアイテムにはデフォルトでmin-width: autoが適用され、1frだけだとカラムサイズが揃わないことがある.
3
+ そのため、minmax を使っている。
4
+ */
5
+ .l--columns {
6
+ --cols: 2; // 初期値
7
+ display: grid;
8
+ grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
9
+ }
@@ -0,0 +1,3 @@
1
+ .l--flex {
2
+ display: flex;
3
+ }
@@ -0,0 +1,46 @@
1
+ /*
2
+ Memo:
3
+ - > * + * を使えば :first-child への my-s の打ち消しは不要になるが、 my-e 0 を :first-child にも効かせたいので、 > * で書いている。
4
+ - --flow を inherit させることで -flow:custom クラスがなくても任意の値をセットできるようにしつつ、離れたネストであれば l--flow 単体で使っても base に戻るようにしている。(ただし直下のネストでは影響が出る。)
5
+ */
6
+ .l--flow {
7
+ display: flow-root;
8
+ --flow: var(--flow--base);
9
+
10
+ > * {
11
+ --flow: inherit;
12
+ --my-s: var(--flow);
13
+ margin-block: var(--my-s) 0;
14
+ }
15
+
16
+ // flow 直下のメディア要素は block に初期リセット
17
+ > :where(img, video, audio) {
18
+ display: block;
19
+ }
20
+ }
21
+
22
+ .-flow\:base > * {
23
+ --flow: var(--flow--base);
24
+ }
25
+ .-flow\:s > * {
26
+ --flow: var(--flow--s);
27
+ }
28
+ .-flow\:l > * {
29
+ --flow: var(--flow--l);
30
+ }
31
+
32
+ // 見出しの上部余白は少しだけ広くする.
33
+ .l--flow > :where(h1, h2, h3, h4) {
34
+ // --my-s: var(--flow--h);
35
+ --my-s: calc(var(--flow) + var(--flow--h));
36
+ }
37
+
38
+ // Note: 打ち消しを最後に書く
39
+ // .l--flow > :where(.-max-sz\:full + .-max-sz\:full),
40
+ .l--flow > :first-child,
41
+ .is--skipFlow + * {
42
+ --my-s: 0px;
43
+ }
44
+
45
+ // is--side
46
+ // is--skipFlow
@@ -2,7 +2,7 @@
2
2
  overflow: hidden; // Memo: clip だと stack の直下で aspect-ratio が効かない。
3
3
 
4
4
  // 直下のメディアを frame いっぱいに広げる。
5
- > :where(img, video, picture, iframe) {
5
+ > :where(img, video, iframe, .a--media) {
6
6
  display: block;
7
7
  width: 100%;
8
8
  height: 100%;
@@ -0,0 +1,35 @@
1
+ .l--grid {
2
+ --gtr: none;
3
+ --gtc: none;
4
+ --gta: none;
5
+ display: grid;
6
+ grid-template: var(--gtr) / var(--gtc);
7
+ grid-template-areas: var(--gta);
8
+ }
9
+
10
+ // .-gtr\:repeat {
11
+ // --rows: 1;
12
+ // --gtr: repeat(var(--rows), 1fr);
13
+ // }
14
+
15
+ // .-gtc\:repeat {
16
+ // --cols: 1;
17
+ // --gtc: repeat(var(--cols), 1fr);
18
+ // }
19
+
20
+ // .-gtc\:liquid {
21
+ // --cols: var(--sz--min);
22
+ // --gtc: repeat(auto-fill, minmax(min(var(--cols), 100%), 1fr));
23
+ // }
24
+
25
+ // .l--grid--repeat {
26
+ // --rows: 1;
27
+ // --cols: 1;
28
+ // --gtr: repeat(var(--rows), 1fr);
29
+ // --gtc: repeat(var(--cols), 1fr);
30
+ // }
31
+
32
+ // .l--grid--liquid {
33
+ // --cols: var(--sz--min);
34
+ // --gtc: repeat(auto-fill, minmax(min(var(--cols), 100%), 1fr));
35
+ // }
@@ -4,16 +4,16 @@
4
4
  */
5
5
  .l--withSide {
6
6
  --sideW: auto;
7
- --mainW: max(var(--size-min), 50%);
7
+ --mainW: max(var(--sz--min), 50%);
8
8
  display: flex;
9
9
  flex-wrap: wrap;
10
10
 
11
- > [data-is-side] {
11
+ > .is--side {
12
12
  flex-basis: var(--sideW);
13
13
  flex-grow: 1; /* 0 だと折り返されたときに広がらない */
14
14
  }
15
15
 
16
- > :not([data-is-side]) {
16
+ > :not(.is--side) {
17
17
  flex-grow: 9999999; /* できるだけ fix側を 指定値ピッタリに近づけるためにかなり大きな数値を指定 */
18
18
  flex-basis: min(100%, var(--mainW)); /* このサイズが折り返しポイントの基準となる */
19
19
  }
@@ -1,12 +1,10 @@
1
1
  // modules
2
- @forward './frame';
2
+ @forward './flow';
3
3
  @forward './flex';
4
- @forward './grid';
4
+ @forward './cluster';
5
5
  @forward './stack';
6
+ @forward './grid';
6
7
  @forward './center';
7
8
  @forward './columns';
8
9
  @forward './withSide';
9
-
10
- @forward './icon';
11
- @forward './divider';
12
- // @forward './spacer';
10
+ @forward './frame';
@@ -0,0 +1,37 @@
1
+ // コンテナ定義 + 併用クラスで内部のコンテンツ幅を制御する。
2
+ .is--container {
3
+ container-type: inline-size;
4
+ // margin-inline: auto;
5
+ // inline-size: 100%; // gridやflex内での挙動を考慮。(mx:autoにするとcontainer-type:inline-sizeだと横幅つぶれる)
6
+
7
+ // is--container ごとにセット。
8
+ // --sz--outer: 100cqi;
9
+
10
+ // コンテナの親にhas--gutterがある場合はその分を加算
11
+ // :where(.has--gutter) > & {
12
+ // --sz--outer: calc(100cqi + var(--gutter) * 2);
13
+ // }
14
+
15
+ // 子要素の制御
16
+ > * {
17
+ --max-sz: var(--contentSz, 100%);
18
+ max-inline-size: var(--max-sz, 100%);
19
+ margin-inline: auto;
20
+ }
21
+ }
22
+
23
+ // 一番トップレベルのcontainerで outer サイズセット
24
+ .is--container:not(.is--container .is--container) {
25
+ --sz--outer: 100cqi;
26
+ }
27
+
28
+ // Memo: それぞれの直下要素( > * ) に対してスタイルをセットした方がネスト時の影響をなくせるが、constrainedのネストが多様されることは少ないので親側の変数管理のみで実装。
29
+ .-container\:s {
30
+ --contentSz: var(--sz--s);
31
+ }
32
+ .-container\:m {
33
+ --contentSz: var(--sz--m);
34
+ }
35
+ .-container\:l {
36
+ --contentSz: var(--sz--l);
37
+ }
@@ -1,4 +1,4 @@
1
- @use '../_mixin' as mixin;
1
+ @use '../../_mixin' as mixin;
2
2
 
3
3
  .is--linkBox {
4
4
  position: relative;
@@ -0,0 +1,5 @@
1
+ // state
2
+ @forward './gutter';
3
+ @forward './container';
4
+ @forward './layer'; // Note: position の関係で、linkbox より後で読み込む
5
+ @forward './linkbox';
@@ -1,26 +1,19 @@
1
1
  @use '../_mixin' as mixin;
2
2
 
3
- // has--border?
4
- // bdc だけとかの指定でも -bd:出力?
5
3
  /*
6
4
 
7
5
  使用される環境(resetCSS)によって挙動が変わりやすいので 各プロパティを変数で管理する。
8
- ブラウザのデフォルト挙動では、bds指定でborder出現してくるが、nextraのresetCSSみたいな特殊な環境だとbdwの指定でborderでてきたりする。
6
+ Memo: ブラウザのデフォルト挙動では、bds指定でborder出現してくるが、nextraのresetCSSみたいな特殊な環境だとbdwの指定でborderでてきたりする。
9
7
 
10
- borderはLismの中でも特殊な仕様になっている。
11
- --bds, --bdw, --bdc で管理できるようにしていて、そのために .-bd: クラスを使う。
12
- */
8
+ 各方向にそれぞれBP対応しているとCSSが肥大化することもあり、border はLismの中でも特殊な仕様になっている。
9
+ --bds, --bdw, --bdc で管理できるようにしていて、そのために .-bd, .-bd-{side} クラスを使う。
13
10
 
14
- // bdc, bdw などでカラーや太さを上書きできるように border 自体を変数管理
15
- // :where(.has--bd),
16
- @include mixin.maybe_where('.-bd,[class*="-bd:"]', 'base') {
17
- --bds: solid;
18
- --bdw: 1px;
19
- --bdc: currentColor;
20
- }
11
+ --bdw を変化させることで方向を変化させたりできるようになっている。
12
+ */
21
13
 
14
+ // Memo: base レイヤーで初期値セット済み
22
15
  .-bd,
23
- [class*='-bd:'] {
16
+ [class*='-bd-'] {
24
17
  border-width: var(--bdw) #{mixin.$maybe_important};
25
18
  border-color: var(--bdc) #{mixin.$maybe_important};
26
19
  }
@@ -31,42 +24,34 @@
31
24
  border-style: var(--bds) #{mixin.$maybe_important};
32
25
  }
33
26
 
34
- /* stylelint-disable */
35
- .-bd\:n {
36
- border: none #{mixin.$maybe_important};
37
- }
38
-
39
27
  // 方向指定
40
- // .-bd\:all {
41
- // border-style: var(--bds) #{mixin.$maybe_important};
42
- // }
43
- .-bd\:l {
44
- border-left-style: var(--bds) #{mixin.$maybe_important};
45
- }
46
- .-bd\:r {
47
- border-right-style: var(--bds) #{mixin.$maybe_important};
48
- }
49
- .-bd\:t {
50
- border-top-style: var(--bds) #{mixin.$maybe_important};
51
- }
52
- .-bd\:b {
53
- border-bottom-style: var(--bds) #{mixin.$maybe_important};
54
- }
55
- .-bd\:x {
28
+ .-bd-x {
56
29
  border-inline-style: var(--bds) #{mixin.$maybe_important};
57
30
  }
58
- .-bd\:y {
31
+ .-bd-y {
59
32
  border-block-style: var(--bds) #{mixin.$maybe_important};
60
33
  }
61
- .-bd\:is {
34
+ .-bd-x-s {
62
35
  border-inline-start-style: var(--bds) #{mixin.$maybe_important};
63
36
  }
64
- .-bd\:ie {
37
+ .-bd-x-e {
65
38
  border-inline-end-style: var(--bds) #{mixin.$maybe_important};
66
39
  }
67
- .-bd\:bs {
40
+ .-bd-t {
41
+ border-top-style: var(--bds) #{mixin.$maybe_important};
42
+ }
43
+ .-bd-b {
44
+ border-bottom-style: var(--bds) #{mixin.$maybe_important};
45
+ }
46
+ .-bd-l {
47
+ border-left-style: var(--bds) #{mixin.$maybe_important};
48
+ }
49
+ .-bd-r {
50
+ border-right-style: var(--bds) #{mixin.$maybe_important};
51
+ }
52
+ .-bd-y-s {
68
53
  border-block-start-style: var(--bds) #{mixin.$maybe_important};
69
54
  }
70
- .-bd\:be {
55
+ .-bd-y-e {
71
56
  border-block-end-style: var(--bds) #{mixin.$maybe_important};
72
57
  }
@@ -2,45 +2,34 @@
2
2
 
3
3
  @media (any-hover: hover) {
4
4
  .-hov\:c:hover {
5
- color: var(--hov-c, var(--c-link)) #{mixin.$maybe_important};
5
+ color: var(--hov-c, var(--c--link)) #{mixin.$maybe_important};
6
6
  }
7
7
  .-hov\:bdc:hover {
8
- border-color: var(--hov-bdc, var(--c-link)) #{mixin.$maybe_important};
8
+ border-color: var(--hov-bdc, var(--c--link)) #{mixin.$maybe_important};
9
9
  }
10
10
  .-hov\:bgc:hover {
11
- background-color: var(--hov-bgc, var(--c-base-2)) #{mixin.$maybe_important};
11
+ background-color: var(--hov-bgc, var(--c--base-2)) #{mixin.$maybe_important};
12
12
  }
13
- .-hov\:op:hover {
14
- opacity: var(--hov-op, 0.7) !important;
13
+ .-hov\:o:hover {
14
+ opacity: var(--hov-o, 0.7) !important;
15
15
  }
16
16
  .-hov\:bxsh:hover {
17
- box-shadow: var(--hov-bxsh, var(--bxsh-40)) #{mixin.$maybe_important};
17
+ box-shadow: var(--hov-bxsh, var(--bxsh--40)) #{mixin.$maybe_important};
18
18
  }
19
19
  // .-hov\:filter:hover {
20
20
  // filter: var(--hov-filter) !important;
21
21
  // }
22
- .-hov\:set:hover {
23
- --_notHov: ;
24
- }
25
- .-hov\:set:not(:hover) {
26
- --_isHov: ;
27
- }
28
- }
29
- @media (any-hover: none) {
30
- .-hov\:set {
31
- --_isHov: ;
32
- }
33
22
  }
34
23
 
35
24
  // ------------------------------------------------------------
36
- // .-hov\:get
25
+ // .-hov\:to
37
26
  // ------------------------------------------------------------
38
27
 
39
- .-hov\:get\:hide {
40
- opacity: var(--_isHov, 0) #{mixin.$maybe_important};
28
+ .-hov\:to\:hide {
29
+ opacity: var(--isHov_, 0) #{mixin.$maybe_important};
41
30
  }
42
31
 
43
- .-hov\:get\:show {
44
- opacity: var(--_notHov, 0) #{mixin.$maybe_important};
45
- visibility: var(--_notHov, hidden) #{mixin.$maybe_important};
32
+ .-hov\:to\:show {
33
+ opacity: var(--notHov_, 0) #{mixin.$maybe_important};
34
+ visibility: var(--notHov_, hidden) #{mixin.$maybe_important};
46
35
  }
@@ -0,0 +1,17 @@
1
+ .-max-sz\:full {
2
+ max-inline-size: 100%;
3
+
4
+ :where(.has--gutter) > & {
5
+ max-inline-size: calc(100% + var(--gutter) * 2);
6
+ margin-inline: calc(var(--gutter) * -1);
7
+ }
8
+ }
9
+
10
+ .-max-sz\:outer {
11
+ max-inline-size: var(--sz--outer, 100vi);
12
+ margin-inline: calc(50% - var(--sz--outer) / 2);
13
+ }
14
+
15
+ // .-max-sz\:wide {
16
+ // max-inline-size: var(--sz--wide, 100%);
17
+ // }
@@ -2,9 +2,8 @@
2
2
  // @forward './pass-get'; // 先に読み込む
3
3
 
4
4
  // 特殊
5
- // @forward './color';
6
5
  @forward './border';
7
- @forward './transition';
6
+ @forward './size';
8
7
 
9
8
  // 自動生成
10
9
  @forward '../auto_output';
@@ -48,7 +48,7 @@ rt {
48
48
  }
49
49
 
50
50
  /* 隙間ができるのを防ぐ。( display はいじらない。) */
51
- @include mixin.maybe_where('img, video, audio', '') {
51
+ @include mixin.maybe_where('svg, img, video, audio', '') {
52
52
  vertical-align: middle;
53
53
  }
54
54