lism-css 0.0.1 → 0.0.3

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 (234) hide show
  1. package/README.md +52 -0
  2. package/dist/_virtual/jsx-runtime.js +5 -0
  3. package/dist/_virtual/jsx-runtime2.js +4 -0
  4. package/dist/_virtual/react-jsx-runtime.development.js +4 -0
  5. package/dist/_virtual/react-jsx-runtime.production.min.js +4 -0
  6. package/dist/components/Accordion/AccIcon.js +10 -0
  7. package/dist/components/Accordion/getProps.js +29 -0
  8. package/dist/components/Accordion/index.js +6 -0
  9. package/dist/components/Accordion/index2.js +32 -0
  10. package/dist/components/Accordion/setAccordion.js +37 -0
  11. package/dist/components/Accordion/style.css +1 -0
  12. package/dist/components/Box/getProps.js +7 -0
  13. package/dist/components/Box/index.js +9 -0
  14. package/dist/components/Center/index.js +8 -0
  15. package/dist/components/Columns/getProps.js +6 -0
  16. package/dist/components/Columns/index.js +9 -0
  17. package/dist/components/Container/index.js +9 -0
  18. package/dist/components/Decorator/getProps.js +15 -0
  19. package/dist/components/Decorator/index.js +9 -0
  20. package/dist/components/Divider/getProps.js +11 -0
  21. package/dist/components/Divider/index.js +9 -0
  22. package/dist/components/Dummy/getContent.js +9 -0
  23. package/dist/components/Dummy/index.js +17 -0
  24. package/dist/components/Dummy/texts.js +24 -0
  25. package/dist/components/Flex/Cluster.js +8 -0
  26. package/dist/components/Flex/FlexItem.js +9 -0
  27. package/dist/components/Flex/getProps.js +13 -0
  28. package/dist/components/Flex/index.js +9 -0
  29. package/dist/components/Frame/getProps.js +7 -0
  30. package/dist/components/Frame/index.js +9 -0
  31. package/dist/components/Grid/GridItem.js +10 -0
  32. package/dist/components/Grid/getProps.js +28 -0
  33. package/dist/components/Grid/index.js +9 -0
  34. package/dist/components/Icon/SVG.js +29 -0
  35. package/dist/components/Icon/getProps.js +34 -0
  36. package/dist/components/Icon/index.js +11 -0
  37. package/dist/components/Icon/presets.js +193 -0
  38. package/dist/components/Layer/getProps.js +9 -0
  39. package/dist/components/Layer/index.js +10 -0
  40. package/dist/components/LinkBox/index.js +9 -0
  41. package/dist/components/Lism/Link.js +8 -0
  42. package/dist/components/Lism/Media.js +10 -0
  43. package/dist/components/Lism/Text.js +8 -0
  44. package/dist/components/Lism/index.js +9 -0
  45. package/dist/components/Modal/Body.js +10 -0
  46. package/dist/components/Modal/CloseIconBtn.js +19 -0
  47. package/dist/components/Modal/Footer.js +10 -0
  48. package/dist/components/Modal/Header.js +10 -0
  49. package/dist/components/Modal/Inner.js +9 -0
  50. package/dist/components/Modal/getProps.js +19 -0
  51. package/dist/components/Modal/index.js +10 -0
  52. package/dist/components/Modal/index2.js +17 -0
  53. package/dist/components/Modal/setModal.js +37 -0
  54. package/dist/components/Modal/style.css +1 -0
  55. package/dist/components/Spacer/getProps.js +21 -0
  56. package/dist/components/Spacer/index.js +9 -0
  57. package/dist/components/Stack/index.js +8 -0
  58. package/dist/components/Tabs/Tab.js +22 -0
  59. package/dist/components/Tabs/TabItem.js +7 -0
  60. package/dist/components/Tabs/TabList.js +8 -0
  61. package/dist/components/Tabs/TabPanel.js +19 -0
  62. package/dist/components/Tabs/getProps.js +17 -0
  63. package/dist/components/Tabs/index.js +9 -0
  64. package/dist/components/Tabs/index2.js +55 -0
  65. package/dist/components/Tabs/setEvent.js +29 -0
  66. package/dist/components/Tabs/style.css +1 -0
  67. package/dist/components/WithSide/getProps.js +14 -0
  68. package/dist/components/WithSide/index.js +9 -0
  69. package/dist/components/getFilterProps.js +23 -0
  70. package/dist/components/getInsetProps.js +8 -0
  71. package/dist/components/getMediaProps.js +14 -0
  72. package/dist/components/getTransformProps.js +8 -0
  73. package/dist/config/prop_list.js +395 -0
  74. package/dist/config/tokens.js +67 -0
  75. package/dist/config.js +9 -0
  76. package/dist/css/all.css +1 -0
  77. package/dist/css/all_no_layer.css +1 -0
  78. package/dist/css/base.css +1 -0
  79. package/dist/css/dynamic.css +1 -0
  80. package/dist/css/layout.css +1 -0
  81. package/dist/css/props.css +1 -0
  82. package/dist/css/reset.css +1 -0
  83. package/dist/css/state.css +1 -0
  84. package/dist/css/utility.css +1 -0
  85. package/dist/css/with_layer.css +1 -0
  86. package/dist/index.js +54 -0
  87. package/dist/lib/getBpData.js +13 -0
  88. package/dist/lib/getLismProps.js +239 -0
  89. package/dist/lib/getMaybeCssVar.js +61 -0
  90. package/dist/lib/getMaybeUtilValue.js +6 -0
  91. package/dist/lib/helper/atts.js +11 -0
  92. package/dist/lib/helper/filterEmptyObj.js +9 -0
  93. package/dist/lib/helper/hasKeys.js +6 -0
  94. package/dist/lib/helper/isEmptyObj.js +6 -0
  95. package/dist/lib/helper/isNumStr.js +6 -0
  96. package/dist/lib/helper/splitWithComma.js +6 -0
  97. package/dist/lib/isPresetValue.js +6 -0
  98. package/dist/lib/isTokenValue.js +9 -0
  99. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js +604 -0
  100. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js +28 -0
  101. package/dist/node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js +10 -0
  102. package/dist/scripts/accordion.js +4 -0
  103. package/dist/scripts/modal.js +4 -0
  104. package/dist/scripts/tabs.js +6 -0
  105. package/package.json +22 -22
  106. package/packages/astro/Accordion/AccBody.astro +15 -0
  107. package/packages/astro/Accordion/AccHeader.astro +13 -0
  108. package/packages/astro/Accordion/AccIcon.astro +19 -0
  109. package/packages/astro/Accordion/AccLabel.astro +12 -0
  110. package/packages/astro/Accordion/Accordion.astro +21 -0
  111. package/packages/astro/Accordion/__setEvent.js +2 -0
  112. package/packages/astro/Accordion/index.js +7 -0
  113. package/packages/astro/Box/Box.astro +11 -0
  114. package/packages/astro/Box/index.js +1 -0
  115. package/packages/astro/Center/Center.astro +11 -0
  116. package/packages/astro/Center/index.js +1 -0
  117. package/packages/astro/Columns/Columns.astro +11 -0
  118. package/packages/astro/Columns/index.js +1 -0
  119. package/packages/astro/Container/Container.astro +11 -0
  120. package/packages/astro/Container/index.js +1 -0
  121. package/packages/astro/Decorator/Decorator.astro +13 -0
  122. package/packages/astro/Decorator/index.js +1 -0
  123. package/packages/astro/Divider/Divider.astro +12 -0
  124. package/packages/astro/Divider/index.js +1 -0
  125. package/packages/astro/Dummy/Dummy.astro +12 -0
  126. package/packages/astro/Dummy/index.js +1 -0
  127. package/packages/astro/Flex/Cluster.astro +11 -0
  128. package/packages/astro/Flex/Flex.astro +14 -0
  129. package/packages/astro/Flex/index.js +2 -0
  130. package/packages/astro/Frame/Frame.astro +12 -0
  131. package/packages/astro/Frame/index.js +1 -0
  132. package/packages/astro/Grid/Grid.astro +13 -0
  133. package/packages/astro/Grid/GridItem.astro +15 -0
  134. package/packages/astro/Grid/index.js +2 -0
  135. package/packages/astro/Icon/Icon.astro +25 -0
  136. package/packages/astro/Icon/SVG.astro +30 -0
  137. package/packages/astro/Icon/index.js +2 -0
  138. package/packages/astro/Layer/Layer.astro +15 -0
  139. package/packages/astro/Layer/index.js +1 -0
  140. package/packages/astro/LinkBox/LinkBox.astro +16 -0
  141. package/packages/astro/LinkBox/index.js +1 -0
  142. package/packages/astro/Lism/Link.astro +10 -0
  143. package/packages/astro/Lism/Lism.astro +14 -0
  144. package/packages/astro/Lism/Media.astro +24 -0
  145. package/packages/astro/Lism/Text.astro +10 -0
  146. package/packages/astro/Lism/index.js +4 -0
  147. package/packages/astro/Modal/Body.astro +14 -0
  148. package/packages/astro/Modal/CloseIconBtn.astro +24 -0
  149. package/packages/astro/Modal/Footer.astro +14 -0
  150. package/packages/astro/Modal/Header.astro +14 -0
  151. package/packages/astro/Modal/Inner.astro +13 -0
  152. package/packages/astro/Modal/Modal.astro +20 -0
  153. package/packages/astro/Modal/index.js +8 -0
  154. package/packages/astro/OverlayLink/OverlayLink.astro +10 -0
  155. package/packages/astro/OverlayLink/index.js +1 -0
  156. package/packages/astro/Spacer/Spacer.astro +11 -0
  157. package/packages/astro/Spacer/index.js +1 -0
  158. package/packages/astro/Stack/Stack.astro +7 -0
  159. package/packages/astro/Stack/index.js +1 -0
  160. package/packages/astro/Tabs/Tab.astro +26 -0
  161. package/packages/astro/Tabs/TabItem.astro +8 -0
  162. package/packages/astro/Tabs/TabList.astro +8 -0
  163. package/packages/astro/Tabs/TabPanel.astro +22 -0
  164. package/packages/astro/Tabs/Tabs.astro +60 -0
  165. package/packages/astro/Tabs/index.js +7 -0
  166. package/packages/astro/Tabs/transformTabitems.js +40 -0
  167. package/packages/astro/Test/Test.astro +14 -0
  168. package/packages/astro/Test/TestItem.astro +14 -0
  169. package/packages/astro/Test/index.js +4 -0
  170. package/packages/astro/WithSide/WithSide.astro +12 -0
  171. package/packages/astro/WithSide/index.js +1 -0
  172. package/packages/astro/helper/index.js +6 -0
  173. package/packages/astro/index.js +29 -0
  174. package/packages/astro/types.ts +28 -0
  175. package/packages/next-js/Accordion/Accordion.jsx +19 -0
  176. package/packages/next-js/Accordion/index.js +2 -0
  177. package/src/scss/__memo/_lh-auto-all.scss +46 -0
  178. package/src/scss/__memo/_lh-auto-h.scss +50 -0
  179. package/src/scss/__memo/_lh-manual.scss +58 -0
  180. package/src/scss/_auto_output.scss +194 -0
  181. package/src/scss/_mixin.scss +38 -0
  182. package/src/scss/_props.scss +771 -0
  183. package/src/scss/_query.scss +40 -0
  184. package/src/scss/_setting.scss +22 -0
  185. package/src/scss/all.scss +10 -0
  186. package/src/scss/all_no_layer.scss +26 -0
  187. package/src/scss/base/_dom.scss +140 -0
  188. package/src/scss/base/_tokens.scss +307 -0
  189. package/src/scss/base/index.scss +70 -0
  190. package/src/scss/dynamic/index.scss +4 -0
  191. package/src/scss/layout/__switcher.scss +11 -0
  192. package/src/scss/layout/_center.scss +5 -0
  193. package/src/scss/layout/_columns.scss +18 -0
  194. package/src/scss/layout/_divider.scss +6 -0
  195. package/src/scss/layout/_flex.scss +12 -0
  196. package/src/scss/layout/_frame.scss +13 -0
  197. package/src/scss/layout/_grid.scss +16 -0
  198. package/src/scss/layout/_icon.scss +19 -0
  199. package/src/scss/layout/_spacer.scss +3 -0
  200. package/src/scss/layout/_stack.scss +4 -0
  201. package/src/scss/layout/_withSide.scss +20 -0
  202. package/src/scss/layout/index.scss +12 -0
  203. package/src/scss/props/__/__aspect.bkup.scss +36 -0
  204. package/src/scss/props/__/__border.bkup.scss +197 -0
  205. package/src/scss/props/__/__color.bkup.scss +67 -0
  206. package/src/scss/props/__/__display.bukup.scss +11 -0
  207. package/src/scss/props/__/__flex-props.bkup.scss +66 -0
  208. package/src/scss/props/__/__gap.bkup.scss +18 -0
  209. package/src/scss/props/__/__grid-props.bkup.scss +158 -0
  210. package/src/scss/props/__/__margin.bkup.scss +92 -0
  211. package/src/scss/props/__/__padding.bkup.scss +93 -0
  212. package/src/scss/props/__/__place.bkup.scss +74 -0
  213. package/src/scss/props/__/__radius.bkup.scss +27 -0
  214. package/src/scss/props/__/__sizing.bkup.scss +45 -0
  215. package/src/scss/props/__/__typography.bkup.scss +146 -0
  216. package/src/scss/props/__memo.scss +15 -0
  217. package/src/scss/props/_border.scss +67 -0
  218. package/src/scss/props/_color.scss +16 -0
  219. package/src/scss/props/_hover.scss +73 -0
  220. package/src/scss/props/_transition.scss +20 -0
  221. package/src/scss/props/index.scss +12 -0
  222. package/src/scss/reset.scss +99 -0
  223. package/src/scss/state/__container.bkup.scss +145 -0
  224. package/src/scss/state/__flow.bkup.scss +52 -0
  225. package/src/scss/state/_container.scss +45 -0
  226. package/src/scss/state/_flow.scss +45 -0
  227. package/src/scss/state/_gutter.scss +3 -0
  228. package/src/scss/state/_has-divider.scss +30 -0
  229. package/src/scss/state/_layer.scss +7 -0
  230. package/src/scss/state/_linkbox.scss +18 -0
  231. package/src/scss/state/_size.scss +60 -0
  232. package/src/scss/state/index.scss +8 -0
  233. package/src/scss/utility/index.scss +76 -0
  234. package/src/scss/with_layer.scss +28 -0
@@ -0,0 +1,99 @@
1
+ @use './_mixin' as mixin;
2
+
3
+ /* 参考
4
+ - https://github.com/necolas/normalize.css/blob/master/normalize.css
5
+ - https://github.com/filipelinhares/ress/blob/master/ress.css
6
+ - https://elad2412.github.io/the-new-css-reset/
7
+ */
8
+
9
+ /* ------------------------------------------------------------
10
+ 基本方針: reset.cssの段階では、できるだけブラウザの標準スタイルに従う。
11
+
12
+ - box-sizing: border-box; にセット
13
+ - padding は ブラウザ標準スタイルのまま
14
+ - margin はすべて 0 にリセット
15
+ ------------------------------------------------------------ */
16
+ *,
17
+ ::before,
18
+ ::after {
19
+ box-sizing: border-box;
20
+ }
21
+
22
+ * {
23
+ margin: 0;
24
+ }
25
+
26
+ /* ------------------------------------------------------------
27
+ Texts
28
+ ------------------------------------------------------------ */
29
+
30
+ /* テキストのオーバーフローを回避 */
31
+ @include mixin.maybe_where('p, h1, h2, h3, h4, h5, h6', '') {
32
+ overflow-wrap: break-word;
33
+ }
34
+
35
+ /* ルビのサイズ統一 */
36
+ rt {
37
+ font-size: 50%;
38
+ }
39
+
40
+ /* ------------------------------------------------------------
41
+ Medias
42
+ ------------------------------------------------------------ */
43
+ @include mixin.maybe_where('img', '') {
44
+ /* 親要素をはみ出さないように */
45
+ max-inline-size: 100%;
46
+
47
+ /* 隙間ができるのを防ぐ。( インラインな img, svg を考慮し、 display はいじらない。) */
48
+ vertical-align: middle;
49
+
50
+ // アスペクト比を保持
51
+ block-size: auto;
52
+ }
53
+
54
+ /* img 以外のメディア系も飛び出さないように。 ( audio, embed, object にも必要か...? ) */
55
+ @include mixin.maybe_where('iframe, audio, picture, video', '') {
56
+ display: block;
57
+ max-inline-size: 100%;
58
+ }
59
+
60
+ @include mixin.maybe_where('iframe', '') {
61
+ border: none;
62
+ }
63
+
64
+ /* ------------------------------------------------------------
65
+ Form fields
66
+ - 基本要素のフォントとカラーをリセット
67
+ - テキストエリアの水平リサイズを無効に
68
+ - カーソルのセット
69
+ ------------------------------------------------------------ */
70
+ @include mixin.maybe_where('input, button, textarea, select', '') {
71
+ font: inherit;
72
+ color: inherit;
73
+ text-transform: none;
74
+ }
75
+
76
+ /* テキストエリアの水平リサイズを無効に */
77
+ textarea {
78
+ resize: vertical;
79
+ }
80
+
81
+ /* ------------------------------------------------------------
82
+ cursor 初期セット
83
+ ------------------------------------------------------------ */
84
+ // :where([type='button'], [type='reset'], [type='submit'], [type='radio'], [type='checkbox']),
85
+ // :where([t[role='option'], [role='button'], [aria-controls]),
86
+ button,
87
+ label,
88
+ select,
89
+ summary {
90
+ cursor: pointer;
91
+ }
92
+
93
+ :disabled {
94
+ cursor: not-allowed;
95
+ }
96
+
97
+ [aria-busy='true'] {
98
+ cursor: progress;
99
+ }
@@ -0,0 +1,145 @@
1
+ // 内部のコンテンツ幅を制御する。
2
+ // .l--container {
3
+ // container-type: inline-size;
4
+ // margin-inline: auto;
5
+ // inline-size: 100%; // gridやflex内での挙動を考慮。(container-type:inline-sizeだと横幅つぶれる)
6
+ // }
7
+
8
+ // -container:fit
9
+
10
+ // l--container--constrained
11
+ // それぞれの直下要素( > * ) に対してスタイルをセットした方が、ネスト時の影響をなくせるが、constrainedのネストが多様されることは少ないと思うので、一旦親側の変数管理のみで実装。
12
+ .is--container {
13
+ container-type: inline-size;
14
+ margin-inline: auto;
15
+ inline-size: 100%; // gridやflex内での挙動を考慮。(container-type:inline-sizeだと横幅つぶれる)
16
+ }
17
+
18
+ // l--container[data-content-size='']
19
+
20
+ [class*='is--container:'] {
21
+ container-type: inline-size;
22
+ --contentSize: var(--size--m);
23
+ --size--wide: var(--size--l);
24
+
25
+ > * {
26
+ max-inline-size: min(100%, var(--contentSize));
27
+ margin-inline: auto;
28
+ }
29
+ }
30
+
31
+ // .is--container.-contents\:m{}
32
+
33
+ // -content:s
34
+
35
+ // l--container -container:s
36
+ // is--flow:
37
+
38
+ // -container:m, -container:s, -container:l
39
+ // [data-content-size='']
40
+ .is--container\:xs {
41
+ --contentSize: var(--size--xs);
42
+ --size--wide: var(--size--s);
43
+ }
44
+ .is--container\:s {
45
+ --contentSize: var(--size--s);
46
+ --size--wide: var(--size--m);
47
+ }
48
+ .is--container\:m {
49
+ --contentSize: var(--size--m);
50
+ --size--wide: var(--size--l);
51
+ }
52
+ .is--container\:l {
53
+ --contentSize: var(--size--l);
54
+ --size--wide: 100%;
55
+ }
56
+ .is--container\:full {
57
+ --contentSize: 100%;
58
+ --size--wide: 100%;
59
+ }
60
+ // .is--constrained\:
61
+
62
+ // is--container かつ is--constrained を考慮するか?
63
+
64
+ // .is--container {
65
+ // --containerSize: var(--size--m);
66
+ // }
67
+ // .is--container\:s {
68
+ // --containerSize: var(--size--s);
69
+ // }
70
+ // .is--container\:l {
71
+ // --containerSize: var(--size--l);
72
+ // }
73
+ // .is--container\:full {max-inline-size: 100%;} // これは → .is--container.alignfull でできる
74
+
75
+ // Note: 詳細度は flow より強く、ユーティリティより弱く。(flowの後で定義し、0-1-0 を超えないように)
76
+ :where(.is--fullwide) + .is--fullwide {
77
+ margin-block-start: 0;
78
+ }
79
+
80
+ // Note: .is--container より後にかく。
81
+ // :is(.alignfull, .is--fullwide),
82
+ .is--fullwide {
83
+ // container-type: inline-size;
84
+ max-inline-size: 100%;
85
+
86
+ :where(.has--gutter) > & {
87
+ // --contentSize 変数は min()で100%と比較してるので、直接セット
88
+ max-inline-size: calc(100% + var(--gutter) * 2);
89
+ margin-inline: calc(var(--gutter) * -1);
90
+ }
91
+ }
92
+
93
+ // :is(.alignwide, .is--wide)
94
+ .is--wide {
95
+ // container-type: inline-size;
96
+ max-inline-size: var(--size--wide, 100%);
97
+ }
98
+
99
+ // .has--gutter\:s {
100
+ // padding-inline: var(--gutter--s);
101
+ // }
102
+
103
+ :root {
104
+ --size--full: 100vw;
105
+ }
106
+ .is--overwide {
107
+ max-inline-size: var(--size--full);
108
+ margin-inline: calc(50% - var(--size--full) / 2);
109
+ }
110
+
111
+ // @property が使える環境であればコンテナのさらに親要素の幅を参照できるので、containerを1段階飛び出せる。
112
+ // ↓ @property の疑似サポートチェック
113
+ // - @propety : chirome(85~),edge(85~),opera(71~),Samsung(14~)
114
+ // - content-visibility : chirome(85~),edge(85~),opera(71~), safari:x,firefox:x, Samsung(14~)
115
+ // - <length> lh : Safari(16.4~), Firefox(120~121 ?), Chrome,Edge(109~), Opera(95~), Samsung(21~)
116
+ // ↓
117
+ // @supports (content-visibility: auto) or (top: 0lh)
118
+ @supports (content-visibility: auto) or (top: 0lh) {
119
+ // cqw を算出値で保持するために登録済みカスタムプロパティとして定義
120
+ @property --size--full {
121
+ syntax: '<length-percentage>';
122
+ initial-value: 100%;
123
+ inherits: true;
124
+ }
125
+
126
+ :is(.is--container, [class*='is--container:']) {
127
+ --size--full: 100cqw; // is--container が配置された時点での 100cqw をセット
128
+ }
129
+
130
+ // bodyにコンテナ適用して直下要素に100cqwをセットできればいいが、コンテナ内の fixed要素の挙動が変わるので廃止。
131
+ // @property --size--screenW {
132
+ // syntax: '<length-percentage>';
133
+ // initial-value: 100vw;
134
+ // inherits: true;
135
+ // }
136
+ // body {
137
+ // --size--screenW: 100cqw;
138
+ // }
139
+ // .alignscreen {
140
+ // max-inline-size: var(--size--screenW);
141
+ // margin-inline: calc(50% - var(--size--screenW) / 2);
142
+ // }
143
+ }
144
+
145
+ // b--container{}
@@ -0,0 +1,52 @@
1
+ /*
2
+ flowGap はクエリ調整不可。クエリ調整必要な場合はStack使ってもらえばいい。
3
+ end:0 がどうせ :first-child に必要なので、 mbs も > * + * 使わず上書き形式で。
4
+
5
+ memo: :first-child , :last-child の詳細度は 0-1-0
6
+
7
+ .-mbs で上書きできるように 0-1-0 を超えないように注意。
8
+ */
9
+
10
+ :where(.is--flow) > * {
11
+ --mbs: var(--flowGap--m); // --base?
12
+ }
13
+ :where(.is--flow\:s) > * {
14
+ --mbs: var(--flowGap--s);
15
+ }
16
+ :where(.is--flow\:l) > * {
17
+ --mbs: var(--flowGap--l);
18
+ }
19
+ // カスタム値 Note: ネストに注意が必要
20
+ :where(.is--flow\:) > * {
21
+ --mbs: var(--flowGap);
22
+ }
23
+ // [data-flow-gap]
24
+
25
+ // 見出しの上部余白は少しだけ広くする. ただし、見出し直後の見出しの場合を除く。
26
+ // Note: :first-child での打消しのほうが優先度高くなるように注意する
27
+ :where(h1, h2, h3:not(h2 + h3), h4:not(h3 + h4), h5:not(h4 + h5), h6:not(h5 + h6)) {
28
+ --mbs: var(--flowGap--htag);
29
+ }
30
+ // :where(:is(h1, h2, h3, h4, h5, h6):not(:is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6))) {
31
+ // --mbs: var(--flowGap--htag);
32
+ // }
33
+
34
+ // :first-child への上書きのほうが優先度高くなるように。
35
+ :is(.is--flow, [class*='is--flow:']) {
36
+ > * {
37
+ margin-block-end: 0;
38
+ margin-block-start: var(--mbs); // resetCSSがlismであれば、これは不要
39
+ }
40
+
41
+ // :empty どうする?
42
+ > :where(:first-child) {
43
+ --mbs: 0;
44
+ }
45
+ }
46
+
47
+ // .is--skipFlow の次の要素は mbs を 0 にする。
48
+ // hidden要素 や absoluteな要素が先頭に入り込んでいる時などに活用できる。
49
+ .is--skipFlow + * {
50
+ // margin-block-start: 0;
51
+ --mbs: 0;
52
+ }
@@ -0,0 +1,45 @@
1
+ // @use '../_mixin' as mixin;
2
+
3
+ // 内部のコンテンツ幅を制御する。
4
+ .is--container {
5
+ container-type: inline-size;
6
+ margin-inline: auto;
7
+ inline-size: 100%; // gridやflex内での挙動を考慮。(container-type:inline-sizeだと横幅つぶれる)
8
+ // --wide-size: 100%;
9
+ > * {
10
+ --maxIs: var(--item-size, 100%);
11
+ max-inline-size: min(100%, var(--maxIs, 100%));
12
+ margin-inline: auto;
13
+ }
14
+ }
15
+
16
+ // 基本的には .is--container と併用する
17
+ // [data-content-size],
18
+ // .has--size
19
+ // [class*='-contentSize:'] {
20
+ // --size: 100%;
21
+ // --wide-size: 100%;
22
+ // > * {
23
+ // max-inline-size: min(100%, var(--size));
24
+ // margin-inline: auto;
25
+ // }
26
+ // }
27
+
28
+ // それぞれの直下要素( > * ) に対してスタイルをセットした方が、ネスト時の影響をなくせるが、constrainedのネストが多様されることは少ないと思うので、一旦親側の変数管理のみで実装。
29
+ // .-container\:s
30
+ // .-container\:xs {
31
+ // --size: var(--size--xs);
32
+ // --wide-size: var(--size--s);
33
+ // }
34
+ .-container\:s {
35
+ --item-size: var(--size--s);
36
+ --wide-size: var(--size--m);
37
+ }
38
+ .-container\:m {
39
+ --item-size: var(--size--m);
40
+ --wide-size: var(--size--l);
41
+ }
42
+ .-container\:l {
43
+ --item-size: var(--size--l);
44
+ --wide-size: var(--size--xl);
45
+ }
@@ -0,0 +1,45 @@
1
+ /*
2
+ flowG はクエリ調整不可。クエリ調整必要な場合はStack使ってもらえばいい。
3
+ end:0 がどうせ :first-child に必要なので、 mbs も > * + * 使わず上書き形式で。
4
+
5
+ memo: :first-child , :last-child の詳細度は 0-1-0
6
+
7
+ .-mbs で上書きできるように 0-1-0 を超えないように注意。
8
+ */
9
+
10
+ .is--flow {
11
+ // --flowGap: var(--flowGap--m)
12
+ > * {
13
+ --mbs: var(--flowGap, var(--flowGap--m));
14
+ margin-block: var(--mbs) 0;
15
+ }
16
+ }
17
+
18
+ .-flow\:s > * {
19
+ --flowGap: var(--flowGap--s);
20
+ }
21
+
22
+ .-flow\:ms > * {
23
+ // --flowGap: var(--flowGap--m);
24
+ --flowGap: var(--flowGap--m);
25
+ }
26
+ .-flow\:l > * {
27
+ --flowGap: var(--flowGap--l);
28
+ }
29
+
30
+ // :where(.is--flow\:) > * {
31
+ // --mbs: var(--flowG);
32
+ // }
33
+
34
+ // 見出しの上部余白は少しだけ広くする. ただし、見出し直後の見出しの場合を除く。
35
+ // Note: :first-child での打消しのほうが優先度高くなるように注意する
36
+ .is--flow > :where(h1, h2, h3:not(h2 + h3)) {
37
+ // --mbsではなく--flowGapを使うことで、is--flow単体(標準時)の直下でのみ効かせる。
38
+ --flowGap: var(--flowGap--h);
39
+ }
40
+
41
+ // :first-child への上書きのほうが優先度高くなるように。
42
+ .is--flow > :first-child {
43
+ // --mbs への上書きが気軽に書けるよう、--flowGap を 0 に。
44
+ --flowGap: 0;
45
+ }
@@ -0,0 +1,3 @@
1
+ .has--gutter {
2
+ padding-inline: var(--gutter);
3
+ }
@@ -0,0 +1,30 @@
1
+ // .has--divider {
2
+ // --bdc: var(--c--divider);
3
+ // --bds: solid;
4
+ // --bdw: 1px;
5
+ // }
6
+
7
+ // :where(.has--divider:not(.l--flex)) > :not(:last-child) {
8
+ // border-block-end: var(--bds) var(--bdw) var(--bdc);
9
+ // }
10
+
11
+ // :where(.has--divider.l--flex) > :not(:last-child) {
12
+ // border-inline-end: var(--bds) var(--bdw) var(--bdc);
13
+ // }
14
+
15
+ // has--blockDivider
16
+ .has--divider {
17
+ --bdc: var(--c--divider);
18
+ --bds: solid;
19
+ --bdw: 1px;
20
+ --_isRow: 0;
21
+ &:where(.l--flex, .-fxd\:r, .-fxd\:rr) {
22
+ --_isRow: 1;
23
+ }
24
+
25
+ > :where(:not(:last-child)) {
26
+ --_bdw: calc(var(--_isRow, 0) * var(--bdw)); // isRow 1 なら 1px, isRow 0 なら 0px
27
+ border-inline-end: var(--bds) var(--_bdw) var(--bdc);
28
+ border-block-end: var(--bds) calc(var(--bdw) - var(--_bdw)) var(--bdc);
29
+ }
30
+ }
@@ -0,0 +1,7 @@
1
+ // .l--layer,
2
+ .is--layer {
3
+ position: absolute;
4
+ inset: 0;
5
+ overflow: hidden;
6
+ // overflow: auto;
7
+ }
@@ -0,0 +1,18 @@
1
+ @use '../_mixin' as mixin;
2
+
3
+ .is--linkBox {
4
+ position: relative;
5
+ display: block;
6
+ color: inherit;
7
+ pointer-events: auto;
8
+ text-decoration: none;
9
+ cursor: pointer;
10
+ isolation: isolate; // 内部のz-index順位と外部のz-indexを混同させない。
11
+ }
12
+
13
+ // リンクを全てクリック可能にしておく
14
+ @include mixin.switch_selector('.is--linkBox > a', 'is--linkBox > :where(a)') {
15
+ pointer-events: auto; // カードメディア内のタグラベルをクリックできるようにする場合などに必要
16
+ position: relative; // isolation: isolate;
17
+ z-index: 1;
18
+ }
@@ -0,0 +1,60 @@
1
+ // Note: [data-content-size] より後にかく。
2
+ .is--fullwide {
3
+ // container-type: inline-size;
4
+ max-inline-size: 100%;
5
+
6
+ :where(.has--gutter) > & {
7
+ // --content-size 変数は min()で100%と比較してるので、直接セット
8
+ max-inline-size: calc(100% + var(--gutter) * 2);
9
+ margin-inline: calc(var(--gutter) * -1);
10
+ }
11
+ }
12
+
13
+ // Note: 詳細度は 0-1-0 より大きく.
14
+ .is--fullwide + .is--fullwide {
15
+ --flowGap: 0;
16
+ }
17
+
18
+ // :is(.alignwide, .is--wide)
19
+ .is--wide {
20
+ // container-type: inline-size;
21
+ max-inline-size: var(--wide-size, 100%);
22
+ }
23
+
24
+ .is--overwide {
25
+ max-inline-size: var(--overwide-size, 100vw);
26
+ margin-inline: calc(50% - var(--overwide-size) / 2);
27
+ }
28
+
29
+ // @property が使える環境であればコンテナのさらに親要素の幅を参照できるので、containerを1段階飛び出せる。
30
+ // ↓ @property の疑似サポートチェック
31
+ // - @propety : chirome(85~),edge(85~),opera(71~),Samsung(14~)
32
+ // - content-visibility : chirome(85~),edge(85~),opera(71~), safari:x,firefox:x, Samsung(14~)
33
+ // - <length> lh : Safari(16.4~), Firefox(120~121 ?), Chrome,Edge(109~), Opera(95~), Samsung(21~)
34
+ // ↓
35
+
36
+ @supports (content-visibility: auto) or (top: 0lh) {
37
+ // cqw を算出値で保持するために登録済みカスタムプロパティとして定義
38
+ @property --overwide-size {
39
+ syntax: '<length-percentage>';
40
+ initial-value: 100%;
41
+ inherits: true;
42
+ }
43
+ .is--container {
44
+ --overwide-size: 100cqw;
45
+ }
46
+
47
+ // bodyにコンテナ適用して直下要素に100cqwをセットできればいいが、コンテナ内の fixed要素の挙動が変わるので廃止。
48
+ // @property --size--screenW {
49
+ // syntax: '<length-percentage>';
50
+ // initial-value: 100vw;
51
+ // inherits: true;
52
+ // }
53
+ // body {
54
+ // --size--screenW: 100cqw;
55
+ // }
56
+ // .alignscreen {
57
+ // max-inline-size: var(--size--screenW);
58
+ // margin-inline: calc(50% - var(--size--screenW) / 2);
59
+ // }
60
+ }
@@ -0,0 +1,8 @@
1
+ // state
2
+ @forward './gutter';
3
+ @forward './has-divider';
4
+ @forward './flow';
5
+ @forward './container'; // Note: flow より後ろで読み込む
6
+ @forward './size'; // Note: container より後ろで読み込む
7
+ @forward './linkbox';
8
+ @forward './layer'; // Note: position の関係で、linkbox より後で読み込む
@@ -0,0 +1,76 @@
1
+ // for screen reader
2
+ .u--hidden {
3
+ position: absolute;
4
+ width: 1px;
5
+ height: 1px;
6
+ padding: 0;
7
+ margin: -1px;
8
+ overflow: hidden;
9
+ clip: rect(0, 0, 0, 0);
10
+ white-space: nowrap;
11
+ border-width: 0;
12
+ }
13
+
14
+ .u--trimHL {
15
+ > :where(p, h1, h2, h3, h4, h5, h6):first-child {
16
+ margin-block-start: calc(var(--herfLeading) * -1);
17
+ }
18
+ > :where(p, h1, h2, h3, h4, h5, h6):last-child {
19
+ margin-block-end: calc(var(--herfLeading) * -1);
20
+ }
21
+ }
22
+
23
+ /*
24
+ Note: c,bgc,bdc ユーティリティより前で読み込むこと。
25
+ */
26
+
27
+ // @supports (color: color-mix(in srgb, #000, #fff)) {
28
+ /* stylelint-disable */
29
+
30
+ // 優先度的な考慮をすると state より utility の方がいい
31
+ // --kc keyc
32
+ .u--colbox {
33
+ --c: var(--c--text);
34
+ --bgc: var(--c--base-2);
35
+ color: var(--c);
36
+ background-color: var(--bgc);
37
+ }
38
+ @supports (color: color-mix(in srgb, #000, #fff)) {
39
+ // --keycol は 必須. 親から引き継ぎたいこともあるかもしれないので、初期セットはしない
40
+ .u--colbox {
41
+ --c: color-mix(in srgb, var(--c--text), var(--keycol) var(--colbox-pct--c, 16%));
42
+ --bgc: color-mix(in srgb, var(--c--base), var(--keycol) var(--colbox-pct--bg, 5%));
43
+ --bdc: color-mix(in srgb, var(--c--base), var(--keycol) var(--colbox-pct--bdc, 25%));
44
+ --c--link: var(--keycol);
45
+ }
46
+ }
47
+
48
+ .u--overlayLink {
49
+ text-decoration: none;
50
+ position: static;
51
+ color: inherit;
52
+
53
+ &::before {
54
+ position: absolute;
55
+ inset: 0;
56
+ z-index: 0;
57
+ content: '';
58
+ }
59
+ }
60
+
61
+ // .u--hiddenLink {
62
+ // position: absolute;
63
+ // inset: 0;
64
+ // }
65
+
66
+ // 次の要素の mbs を 0 にする。(hidden要素 や absoluteな要素が先頭に入り込んでいる時などに活用できる。)
67
+ .u--skipFlow + * {
68
+ --mbs: 0;
69
+ }
70
+
71
+ // background-clip: text;は -webkit-
72
+ .u--clipText {
73
+ color: transparent;
74
+ -webkit-background-clip: text !important;
75
+ background-clip: text !important;
76
+ }
@@ -0,0 +1,28 @@
1
+ /*
2
+ @layout 使う
3
+ */
4
+ @use 'sass:meta';
5
+
6
+ @layer lism.reset, lism.base, lism.state, lism.layout, lism.dynamic, lism.component, lism.utility;
7
+
8
+ @layer lism.reset {
9
+ @include meta.load-css('reset');
10
+ }
11
+ @layer lism.base {
12
+ @include meta.load-css('base');
13
+ }
14
+ @layer lism.state {
15
+ @include meta.load-css('state');
16
+ }
17
+ @layer lism.layout {
18
+ @include meta.load-css('layout');
19
+ }
20
+ @layer lism.dynamic {
21
+ @include meta.load-css('dynamic');
22
+ }
23
+ // @layer lism-component {
24
+ // @include meta.load-css('component');
25
+ // }
26
+ // @layer lism-utility {
27
+ // @include meta.load-css('utility');
28
+ // }