lism-css 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/defaults/props.js +1 -3
- package/dist/components/Lism/index.js +4 -5
- package/dist/components/Modal/Inner.js +2 -2
- package/dist/components/Modal/getProps.js +13 -6
- package/dist/components/Modal/setModal.js +28 -23
- package/dist/config/defaults/props.js +1 -3
- package/dist/config/defaults/tokens.js +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/main.css +1 -1
- package/dist/css/main_no_layer.css +1 -1
- package/dist/css/modules/dynamic.css +1 -1
- package/dist/css/modules/layout.css +1 -1
- package/dist/css/props.css +1 -1
- package/dist/css/reset.css +1 -1
- package/dist/{components → lib}/getLayoutProps.js +3 -3
- package/dist/lib/getLismProps.js +49 -48
- package/package.json +1 -1
- package/packages/astro/Lism/Lism.astro +2 -3
- package/packages/astro/Modal/Inner.astro +2 -2
- package/src/scss/_auto_output.scss +1 -1
- package/src/scss/_mixin.scss +2 -2
- package/src/scss/_prop-config.scss +2 -4
- package/src/scss/_with_layer.scss +6 -4
- package/src/scss/base/_dom.scss +22 -12
- package/src/scss/base/_tokens.scss +3 -7
- package/src/scss/base/index.scss +0 -8
- package/src/scss/base/set/_plain.scss +2 -2
- package/src/scss/main_no_layer.scss +3 -1
- package/src/scss/modules/dynamic/_modal.scss +24 -15
- package/src/scss/modules/layout/_flow.scss +3 -8
- package/src/scss/props/_border.scss +6 -2
- package/src/scss/reset.scss +84 -68
- package/src/scss/__props copy.scss +0 -797
- package/src/scss/__props.scss +0 -786
package/dist/lib/getLismProps.js
CHANGED
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { STATES as U, PROPS as
|
|
1
|
+
var k = Object.defineProperty;
|
|
2
|
+
var E = (r, t, s) => t in r ? k(r, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[t] = s;
|
|
3
|
+
var f = (r, t, s) => E(r, typeof t != "symbol" ? t + "" : t, s);
|
|
4
|
+
import { STATES as U, PROPS as S } from "../config/index.js";
|
|
5
|
+
import A from "./getLayoutProps.js";
|
|
5
6
|
import g from "./isPresetValue.js";
|
|
6
7
|
import V from "./isTokenValue.js";
|
|
7
8
|
import O from "./getUtilKey.js";
|
|
8
|
-
import
|
|
9
|
+
import $ from "./getMaybeCssVar.js";
|
|
9
10
|
import _ from "./getBpData.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
const
|
|
15
|
-
const t =
|
|
11
|
+
import x from "./helper/atts.js";
|
|
12
|
+
import z from "./helper/isEmptyObj.js";
|
|
13
|
+
import b from "./helper/filterEmptyObj.js";
|
|
14
|
+
import j from "./helper/splitWithComma.js";
|
|
15
|
+
const w = (r) => {
|
|
16
|
+
const t = S[r];
|
|
16
17
|
return t && (t == null ? void 0 : t.token) || "";
|
|
17
18
|
};
|
|
18
|
-
class
|
|
19
|
+
class L {
|
|
19
20
|
constructor(t) {
|
|
20
21
|
// propList = {};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const { forwardedRef: s, class: i, className: l, lismClass: a,
|
|
27
|
-
this.styles = { ...
|
|
28
|
-
let
|
|
29
|
-
if (
|
|
30
|
-
const
|
|
31
|
-
|
|
22
|
+
f(this, "className", "");
|
|
23
|
+
f(this, "uClasses", []);
|
|
24
|
+
f(this, "lismState", []);
|
|
25
|
+
f(this, "styles", {});
|
|
26
|
+
f(this, "attrs", {});
|
|
27
|
+
const { forwardedRef: s, class: i, className: l, lismClass: a, variant: e, style: h = {}, _propConfig: n = {}, ...c } = t;
|
|
28
|
+
this.styles = { ...h }, this._propConfig = { ...n };
|
|
29
|
+
let o = a || "";
|
|
30
|
+
if (e && a) {
|
|
31
|
+
const y = a.split(" "), d = y[0], m = `${d}--${e}`;
|
|
32
|
+
o = [d, m, ...y.slice(1)].join(" ");
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
+
z(c) || (this.attrs = { ...c }, this.analyzeProps()), s && (this.attrs.ref = s), this.className = x(l || i, o, this.lismState, this.uClasses);
|
|
34
35
|
}
|
|
35
36
|
analyzeState(t, s) {
|
|
36
|
-
const { className: i, preset: l, presetClass: a, customVar: e, tokenKey: h, setStyles:
|
|
37
|
-
s === !0 ? this.lismState.push(i) : l && g(l, s) ? this.lismState.push(`${i} ${a}:${s}`) : s && (this.lismState.push(i), h ? this.addStyle(e,
|
|
37
|
+
const { className: i, preset: l, presetClass: a, customVar: e, tokenKey: h, setStyles: n } = t;
|
|
38
|
+
s === !0 ? this.lismState.push(i) : l && g(l, s) ? this.lismState.push(`${i} ${a}:${s}`) : s && (this.lismState.push(i), h ? this.addStyle(e, $(s, h)) : n && this.addStyles(n(s)));
|
|
38
39
|
}
|
|
39
40
|
// prop解析
|
|
40
41
|
analyzeProps() {
|
|
@@ -42,7 +43,7 @@ class w {
|
|
|
42
43
|
if (Object.hasOwn(U, t)) {
|
|
43
44
|
const s = this.extractProp(t), i = U[t];
|
|
44
45
|
typeof i == "string" ? s && this.lismState.push(i) : this.analyzeState(i, s);
|
|
45
|
-
} else if (Object.hasOwn(
|
|
46
|
+
} else if (Object.hasOwn(S, t)) {
|
|
46
47
|
const s = this.attrs[t];
|
|
47
48
|
delete this.attrs[t], this.analyzeLismProp(t, s);
|
|
48
49
|
} else if (t === "hov") {
|
|
@@ -57,7 +58,7 @@ class w {
|
|
|
57
58
|
// Lism Prop 解析
|
|
58
59
|
analyzeLismProp(t, s) {
|
|
59
60
|
if (s == null) return;
|
|
60
|
-
let i =
|
|
61
|
+
let i = S[t] || null;
|
|
61
62
|
if (i === null) return;
|
|
62
63
|
this._propConfig[t] && (i = Object.assign({}, i, this._propConfig[t]));
|
|
63
64
|
const { base: l, ...a } = _(s);
|
|
@@ -103,18 +104,18 @@ class w {
|
|
|
103
104
|
return;
|
|
104
105
|
}
|
|
105
106
|
if (!l) {
|
|
106
|
-
const { presets:
|
|
107
|
-
if (
|
|
107
|
+
const { presets: d, tokenClass: m, utils: P, shorthands: C } = i;
|
|
108
|
+
if (d && g(d, s)) {
|
|
108
109
|
this.addUtil(`${e}:${s}`);
|
|
109
110
|
return;
|
|
110
111
|
}
|
|
111
|
-
if (
|
|
112
|
+
if (m && V(i.token, s)) {
|
|
112
113
|
this.addUtil(`${e}:${s}`);
|
|
113
114
|
return;
|
|
114
115
|
}
|
|
115
|
-
let
|
|
116
|
-
if (
|
|
117
|
-
this.addUtil(`${e}:${
|
|
116
|
+
let u = "";
|
|
117
|
+
if (P && (u = O(P, s)), !u && C && (u = O(C, s, !0)), u) {
|
|
118
|
+
this.addUtil(`${e}:${u}`);
|
|
118
119
|
return;
|
|
119
120
|
}
|
|
120
121
|
}
|
|
@@ -122,12 +123,12 @@ class w {
|
|
|
122
123
|
this.addUtil(e);
|
|
123
124
|
return;
|
|
124
125
|
}
|
|
125
|
-
let { prop: h, isVar:
|
|
126
|
-
if (o && (s =
|
|
127
|
-
if (
|
|
126
|
+
let { prop: h, isVar: n, alwaysVar: c, token: o, bp: y } = i;
|
|
127
|
+
if (o && (s = $(s, o)), !l) {
|
|
128
|
+
if (n) {
|
|
128
129
|
this.addStyle(`--${t}`, s);
|
|
129
130
|
return;
|
|
130
|
-
} else if (!
|
|
131
|
+
} else if (!y && !c) {
|
|
131
132
|
this.addStyle(h, s);
|
|
132
133
|
return;
|
|
133
134
|
}
|
|
@@ -148,28 +149,28 @@ class w {
|
|
|
148
149
|
// });
|
|
149
150
|
// }
|
|
150
151
|
setHovProps(t) {
|
|
151
|
-
t && (t === "-" || t === !0 ? this.addUtil("-hov") : typeof t == "string" ?
|
|
152
|
+
t && (t === "-" || t === !0 ? this.addUtil("-hov") : typeof t == "string" ? j(t).forEach((s) => {
|
|
152
153
|
this.addUtil(`-hov:${s}`);
|
|
153
154
|
}) : typeof t == "object" && Object.keys(t).forEach((s) => {
|
|
154
155
|
let i = t[s];
|
|
155
|
-
i == null || i === "" || i === !1 || (i === "-" || i === !0 ? this.addUtil(`-hov:${s}`) : s === "class" ?
|
|
156
|
+
i == null || i === "" || i === !1 || (i === "-" || i === !0 ? this.addUtil(`-hov:${s}`) : s === "class" ? j(i).forEach((l) => {
|
|
156
157
|
this.addUtil(`-hov:${l}`);
|
|
157
|
-
}) : (i =
|
|
158
|
+
}) : (i = $(i, w(s)), this.addUtil(`-hov:${s}`), this.addStyle(`--hov-${s}`, i)));
|
|
158
159
|
}));
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
|
-
function
|
|
162
|
+
function X(r) {
|
|
162
163
|
if (r.length === 0)
|
|
163
164
|
return {};
|
|
164
|
-
const t = new
|
|
165
|
-
return
|
|
166
|
-
className:
|
|
167
|
-
style:
|
|
165
|
+
const { layout: t, ...s } = r, i = new L(A(t, s));
|
|
166
|
+
return b({
|
|
167
|
+
className: i.className,
|
|
168
|
+
style: b(i.styles),
|
|
168
169
|
//filterEmptyObj(styles), // filterEmptyObj は最後にかける
|
|
169
|
-
...
|
|
170
|
+
...i.attrs
|
|
170
171
|
// 処理されずに残っているprops
|
|
171
172
|
});
|
|
172
173
|
}
|
|
173
174
|
export {
|
|
174
|
-
|
|
175
|
+
X as default
|
|
175
176
|
};
|
package/package.json
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { LismProps } from '../../types';
|
|
3
3
|
import getLismProps from '../../../dist/lib/getLismProps';
|
|
4
|
-
import getLayoutProps from '../../../dist/components/getLayoutProps';
|
|
5
4
|
|
|
6
5
|
// Propsの定義
|
|
7
6
|
interface Props extends LismProps {}
|
|
8
7
|
|
|
9
|
-
const { as, tag,
|
|
8
|
+
const { as, tag, exProps, ...props } = Astro.props || {};
|
|
10
9
|
const JSX = as || tag || 'div';
|
|
11
10
|
---
|
|
12
11
|
|
|
13
|
-
<JSX {...getLismProps(
|
|
12
|
+
<JSX {...getLismProps(props)} {...exProps}>
|
|
14
13
|
<slot />
|
|
15
14
|
</JSX>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import type { LismProps } from '../../types';
|
|
3
|
-
import {
|
|
3
|
+
import { getInnerProps } from '../../../dist/components/Modal/getProps';
|
|
4
4
|
import { Lism } from '../Lism';
|
|
5
5
|
|
|
6
6
|
// Propsの定義
|
|
@@ -8,6 +8,6 @@ interface Props extends LismProps {}
|
|
|
8
8
|
const props = Astro.props || {};
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
<Lism {...
|
|
11
|
+
<Lism {...getInnerProps(props)}>
|
|
12
12
|
<slot />
|
|
13
13
|
</Lism>
|
package/src/scss/_mixin.scss
CHANGED
|
@@ -14,7 +14,7 @@ $maybe_important: '';
|
|
|
14
14
|
// @return '';
|
|
15
15
|
// }
|
|
16
16
|
|
|
17
|
-
@mixin maybe_where($selectors, $mode) {
|
|
17
|
+
@mixin maybe_where($selectors, $mode: '') {
|
|
18
18
|
// memo: セレクタリストを引数で受け取り、modeで出力方法を切り替える
|
|
19
19
|
@if $layer_mode == 1 {
|
|
20
20
|
@if $mode == '' {
|
|
@@ -25,7 +25,7 @@ $maybe_important: '';
|
|
|
25
25
|
:is(#{$selectors}) {
|
|
26
26
|
@content;
|
|
27
27
|
}
|
|
28
|
-
} @else if $mode == 'base' {
|
|
28
|
+
} @else if $mode == '@base' {
|
|
29
29
|
@layer lism.base {
|
|
30
30
|
#{$selectors} {
|
|
31
31
|
@content;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// 自動生成されたファイル. 生成日時: 2025-
|
|
1
|
+
// 自動生成されたファイル. 生成日時: 2025-12-03T10:57:09.980Z
|
|
2
2
|
$props: (
|
|
3
3
|
'f': (
|
|
4
4
|
prop: 'font',
|
|
@@ -661,9 +661,7 @@ $props: (
|
|
|
661
661
|
),
|
|
662
662
|
exUtility: (
|
|
663
663
|
'repeat': (
|
|
664
|
-
'
|
|
665
|
-
'--rows': '1',
|
|
666
|
-
'grid-template': 'repeat(var(--rows), 1fr) / repeat(var(--cols), 1fr)',
|
|
664
|
+
'grid-template': 'repeat(var(--rows,1), 1fr) / repeat(var(--cols,1), 1fr)',
|
|
667
665
|
),
|
|
668
666
|
),
|
|
669
667
|
bp: 1,
|
|
@@ -4,15 +4,17 @@
|
|
|
4
4
|
@use 'sass:meta';
|
|
5
5
|
|
|
6
6
|
// 最初に順序定義
|
|
7
|
-
@layer lism
|
|
7
|
+
// @layer lism-reset, lism;
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
// resetは中で layer定義済み
|
|
10
|
+
@include meta.load-css('reset');
|
|
11
|
+
|
|
12
|
+
// baese
|
|
12
13
|
@layer lism.base {
|
|
13
14
|
@include meta.load-css('base');
|
|
14
15
|
}
|
|
15
16
|
|
|
17
|
+
// modules
|
|
16
18
|
@layer lism.modules {
|
|
17
19
|
@layer state {
|
|
18
20
|
@include meta.load-css('modules/state');
|
package/src/scss/base/_dom.scss
CHANGED
|
@@ -31,7 +31,7 @@ body {
|
|
|
31
31
|
/* ----------------------------------------
|
|
32
32
|
Heading
|
|
33
33
|
---------------------------------------- */
|
|
34
|
-
@include mixin.maybe_where('h1, h2, h3, h4, h5, h6'
|
|
34
|
+
@include mixin.maybe_where('h1, h2, h3, h4, h5, h6') {
|
|
35
35
|
font-family: var(--heading-ff, inherit);
|
|
36
36
|
font-weight: var(--heading-fw, bolder);
|
|
37
37
|
font-size: var(--fz, revert);
|
|
@@ -64,7 +64,7 @@ h6 {
|
|
|
64
64
|
/* ----------------------------------------
|
|
65
65
|
list
|
|
66
66
|
---------------------------------------- */
|
|
67
|
-
@include mixin.maybe_where('ul, ol'
|
|
67
|
+
@include mixin.maybe_where('ul, ol') {
|
|
68
68
|
list-style: none;
|
|
69
69
|
padding: 0;
|
|
70
70
|
padding-inline-start: var(--list-px-s, 0);
|
|
@@ -74,26 +74,31 @@ h6 {
|
|
|
74
74
|
texts
|
|
75
75
|
---------------------------------------- */
|
|
76
76
|
// link
|
|
77
|
-
@include mixin.maybe_where('a'
|
|
77
|
+
@include mixin.maybe_where('a') {
|
|
78
78
|
color: var(--c--link);
|
|
79
79
|
text-decoration: var(--link-td, underline);
|
|
80
80
|
// text-underline-offset: var(--underline-offset, auto);
|
|
81
81
|
// text-decoration-thickness: var(--underline-thickness, 1px);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
+
// フォーカス要素
|
|
85
|
+
@include mixin.maybe_where(':focus-visible') {
|
|
86
|
+
outline-offset: var(--focus-offset, 0px);
|
|
87
|
+
}
|
|
88
|
+
|
|
84
89
|
/* ----------------------------------------
|
|
85
90
|
table
|
|
86
91
|
---------------------------------------- */
|
|
87
|
-
@include mixin.maybe_where('th'
|
|
92
|
+
@include mixin.maybe_where('th') {
|
|
88
93
|
color: var(--th--c, inherit);
|
|
89
94
|
background-color: var(--th--bgc, transparent);
|
|
90
95
|
}
|
|
91
|
-
// @include mixin.maybe_where('td'
|
|
96
|
+
// @include mixin.maybe_where('td') {
|
|
92
97
|
// color: var(--td--c, inherit);
|
|
93
98
|
// background-color: var(--td--bgc, transparent);
|
|
94
99
|
// }
|
|
95
100
|
|
|
96
|
-
@include mixin.maybe_where('td, th'
|
|
101
|
+
@include mixin.maybe_where('td, th') {
|
|
97
102
|
padding: var(--cell-p, 0.375em 0.5em);
|
|
98
103
|
min-inline-size: var(--cell-minW, initial);
|
|
99
104
|
}
|
|
@@ -101,18 +106,18 @@ h6 {
|
|
|
101
106
|
/* ----------------------------------------
|
|
102
107
|
others
|
|
103
108
|
---------------------------------------- */
|
|
104
|
-
@include mixin.maybe_where('hr'
|
|
109
|
+
@include mixin.maybe_where('hr') {
|
|
105
110
|
border: none;
|
|
106
111
|
border-block-start: 1px solid;
|
|
107
112
|
block-size: 0;
|
|
108
113
|
}
|
|
109
114
|
|
|
110
|
-
@include mixin.maybe_where('blockquote'
|
|
115
|
+
@include mixin.maybe_where('blockquote') {
|
|
111
116
|
border-inline-start: solid 3px currentColor;
|
|
112
117
|
padding: var(--s20) var(--s30);
|
|
113
118
|
}
|
|
114
119
|
|
|
115
|
-
@include mixin.maybe_where('pre'
|
|
120
|
+
@include mixin.maybe_where('pre') {
|
|
116
121
|
// 横にスクロールできるように(overflow-inline: auto; ← まだ使えない)
|
|
117
122
|
overflow-x: auto; // 縦書きモードにしてもこれでいけた
|
|
118
123
|
}
|
|
@@ -127,11 +132,16 @@ h6 {
|
|
|
127
132
|
/* ----------------------------------------
|
|
128
133
|
dialog
|
|
129
134
|
---------------------------------------- */
|
|
135
|
+
/* ダイアログ展開時のガタツキを防ぐ */
|
|
136
|
+
// html:has(:modal[open]) {
|
|
137
|
+
// scrollbar-gutter: stable;
|
|
138
|
+
// }
|
|
139
|
+
|
|
130
140
|
// showModal()にのみ適用するため、 dialog ではなく :modal を使用
|
|
131
141
|
@include mixin.switch_selector('body:has(:modal[open])', 'body:where(:has(:modal[open]))') {
|
|
132
142
|
overflow: hidden;
|
|
133
143
|
}
|
|
134
144
|
|
|
135
|
-
@include mixin.switch_selector('dialog:not([open])', 'dialog:where(:not([open]))') {
|
|
136
|
-
|
|
137
|
-
}
|
|
145
|
+
// @include mixin.switch_selector('dialog:not([open])', 'dialog:where(:not([open]))') {
|
|
146
|
+
// pointer-events: none;
|
|
147
|
+
// }
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
--sz--s: 640px; // 80*8
|
|
39
39
|
--sz--xs: 480px; // 80*6
|
|
40
40
|
|
|
41
|
-
--sz--min:
|
|
41
|
+
--sz--min: 18rem; // 最低限維持したいコンテンツサイズの標準値。 withSide等 で使用
|
|
42
42
|
|
|
43
43
|
// .l--flow の余白
|
|
44
44
|
--flow--base: var(--s40);
|
|
@@ -50,12 +50,8 @@
|
|
|
50
50
|
タイポグラフィ
|
|
51
51
|
------------------------------------------------------------ */
|
|
52
52
|
|
|
53
|
-
//
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
--ff--base: -apple-system, 'BlinkMacSystemFont', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif, 'Segoe UI Emoji';
|
|
57
|
-
|
|
58
|
-
// Optima, Georgia, Garamond, Baskerville;
|
|
53
|
+
// system-ui は 游ゴシックが適用されてしまう。-apple-system: safari, firefox用 / 'BlinkMacSystemFont': Chrome用
|
|
54
|
+
--ff--base: -apple-system, 'BlinkMacSystemFont', sans-serif, 'Segoe UI Emoji';
|
|
59
55
|
--ff--accent: 'Garamond', 'Baskerville', 'Times New Roman', serif;
|
|
60
56
|
--ff--mono: Menlo, Consolas, monaco, monospace;
|
|
61
57
|
|
package/src/scss/base/index.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use '../../_mixin' as mixin;
|
|
2
2
|
|
|
3
3
|
// Note: d--modalに使われる
|
|
4
|
-
@include mixin.maybe_where('.set-plain'
|
|
4
|
+
@include mixin.maybe_where('.set-plain') {
|
|
5
5
|
font: inherit;
|
|
6
6
|
width: auto;
|
|
7
7
|
height: auto;
|
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
border: none;
|
|
11
11
|
text-decoration: none;
|
|
12
12
|
padding: 0;
|
|
13
|
-
|
|
13
|
+
margin: 0;
|
|
14
14
|
}
|
|
@@ -1,33 +1,42 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
* dialog で実装.
|
|
3
|
+
* Memo: ::backdrop のアニメーションはFirefoxで動かない
|
|
4
|
+
*/
|
|
2
5
|
.d--modal {
|
|
3
6
|
--my-s: 0; // flow直下にきても影響しないように
|
|
4
|
-
--offset: 0 0; // アニメーション用
|
|
5
7
|
--duration: var(--modal-duration, 0.5s);
|
|
6
|
-
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
7
10
|
max-width: 100%;
|
|
8
11
|
max-height: 100%;
|
|
9
|
-
|
|
12
|
+
overflow: unset;
|
|
13
|
+
background: var(--backdrop-bg, rgb(0 0 0 / 0.6));
|
|
14
|
+
transition-duration: var(--duration);
|
|
15
|
+
transition-property: opacity;
|
|
10
16
|
|
|
11
17
|
&::backdrop {
|
|
12
|
-
|
|
13
|
-
background: var(--backdropBg);
|
|
18
|
+
background: none;
|
|
14
19
|
}
|
|
15
20
|
}
|
|
21
|
+
.d--modal[open] {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
}
|
|
16
26
|
|
|
17
27
|
.d--modal_inner {
|
|
18
|
-
|
|
28
|
+
--translate: 0 0; // アニメーション用
|
|
19
29
|
background-color: var(--c--base);
|
|
30
|
+
transition: translate var(--duration);
|
|
20
31
|
}
|
|
21
32
|
|
|
22
|
-
.d--modal_body {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
33
|
+
// .d--modal_body {
|
|
34
|
+
// overscroll-behavior: contain;
|
|
35
|
+
// }
|
|
26
36
|
|
|
27
37
|
.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
38
|
opacity: 0;
|
|
33
39
|
}
|
|
40
|
+
.d--modal:not([data-is-open]) > .d--modal_inner {
|
|
41
|
+
translate: var(--translate);
|
|
42
|
+
}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Memo:
|
|
3
|
-
- > * + * を使えば :first-child への my-s の打ち消しは不要になるが、 my-e 0 を :first-child にも効かせたいので、 > * で書いている。
|
|
4
|
-
*/
|
|
5
1
|
.l--flow {
|
|
6
2
|
display: flow-root;
|
|
7
3
|
// --flow: var(--flow--base);
|
|
8
4
|
|
|
9
|
-
> * {
|
|
5
|
+
> * + * {
|
|
10
6
|
--flow: var(--flow--base);
|
|
11
7
|
--my-s: var(--flow);
|
|
12
|
-
margin-block: var(--my-s)
|
|
8
|
+
margin-block-start: var(--my-s);
|
|
13
9
|
}
|
|
14
10
|
|
|
15
11
|
// flow 直下のメディア要素は block に初期リセット
|
|
16
|
-
> :where(img, video
|
|
12
|
+
> :where(img, video) {
|
|
17
13
|
display: block;
|
|
18
14
|
}
|
|
19
15
|
}
|
|
@@ -36,7 +32,6 @@
|
|
|
36
32
|
|
|
37
33
|
// Note: 打ち消しを最後に書く
|
|
38
34
|
// .l--flow > :where(.-max-sz\:full + .-max-sz\:full),
|
|
39
|
-
.l--flow > :first-child,
|
|
40
35
|
.is--skipFlow + * {
|
|
41
36
|
--my-s: 0px;
|
|
42
37
|
}
|
|
@@ -12,8 +12,12 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
// Memo: base レイヤーで初期値セット済み
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
// bdc, bdw などでカラーや太さを上書きできるように border 自体を変数管理
|
|
16
|
+
// .-bd .set--bd
|
|
17
|
+
@include mixin.maybe_where('.-bd,[class*=" -bd-"],[class^="-bd-"]', '@base') {
|
|
18
|
+
--bds: solid;
|
|
19
|
+
--bdw: 1px;
|
|
20
|
+
--bdc: currentColor;
|
|
17
21
|
border-width: var(--bdw) #{mixin.$maybe_important};
|
|
18
22
|
border-color: var(--bdc) #{mixin.$maybe_important};
|
|
19
23
|
}
|