-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
267 lines (235 loc) · 5.62 KB
/
styles.css
File metadata and controls
267 lines (235 loc) · 5.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
:root {
--panel-bg: rgba(255, 255, 255, 0.82);
--panel-border: rgba(0, 0, 0, 0.08);
--text: #111;
--muted: #6c6c70; /* iOS gray */
--primary: #0A84FF; /* iOS blue */
--primary-contrast: #fff;
--shadow: 0 14px 34px rgba(0,0,0,0.16);
}
html, body {
height: 100%;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, Segoe UI, Roboto, Helvetica, Arial;
color: var(--text);
background: #000; /* 实时预览用 */
transition: background-color .18s ease;
}
#app {
position: fixed;
right: calc(20px + env(safe-area-inset-right));
top: calc(20px + env(safe-area-inset-top));
width: min(880px, calc(100% - 40px));
background: var(--panel-bg);
backdrop-filter: saturate(120%) blur(16px);
border: 1px solid var(--panel-border);
border-radius: 16px;
box-shadow: var(--shadow);
z-index: 10;
opacity: 1;
transform: translateY(0);
transition: opacity .18s ease, transform .18s ease;
}
#app.is-hidden {
opacity: 0;
transform: translateY(8px);
pointer-events: none;
}
.panel__header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 16px;
border-bottom: 1px solid var(--panel-border);
}
.panel__header h1 {
margin: 0;
font-size: 20px;
font-weight: 700;
}
.header__actions button {
margin-left: 8px;
}
.panel__section {
padding: 14px 16px 6px 16px;
}
.panel__section h2 {
margin: 0 0 8px 0;
font-size: 14px;
font-weight: 600;
color: var(--muted);
}
.controls {
display: flex;
gap: 10px;
flex-wrap: wrap;
align-items: flex-end;
}
.controls--color {
align-items: center;
}
.control {
display: grid;
grid-template-rows: auto auto;
gap: 6px;
}
.control--grow { flex: 1 1 280px; }
label span {
font-size: 12px;
color: var(--muted);
}
input[type="text"], input[type="number"], select, input[readonly] {
height: 44px; /* iOS touch target */
padding: 6px 10px;
border: 1px solid var(--panel-border);
border-radius: 12px;
background: #fff;
outline: none;
font-size: 14px;
}
input[type="color"] {
appearance: none;
width: 48px;
height: 44px;
padding: 0;
border: 1px solid var(--panel-border);
border-radius: 12px;
background: #fff;
}
button {
height: 44px;
padding: 0 14px;
border: 1px solid var(--panel-border);
border-radius: 12px;
background: #fff;
cursor: pointer;
transition: transform .06s ease, background-color .12s ease, box-shadow .12s ease, color .12s ease;
}
.btn--primary {
background: var(--primary);
border-color: var(--primary);
color: var(--primary-contrast);
box-shadow: 0 2px 6px rgba(10,132,255,.35);
}
button:active { transform: scale(0.98); }
.readouts {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
margin-top: 10px;
}
.readout {
display: grid;
grid-template-columns: auto 1fr auto;
gap: 8px;
align-items: center;
}
.readout span {
font-size: 12px;
color: var(--muted);
}
#toast {
position: fixed;
left: calc(50% + env(safe-area-inset-left)/2 - env(safe-area-inset-right)/2);
bottom: calc(20px + env(safe-area-inset-bottom));
transform: translateX(-50%);
background: rgba(0,0,0,0.85);
color: #fff;
padding: 10px 14px;
border-radius: 14px;
font-size: 13px;
opacity: 0;
pointer-events: none;
transition: opacity .2s ease, transform .2s ease;
z-index: 20;
}
#toast.show {
opacity: 1;
transform: translateX(-50%) translateY(-4px);
}
@media (max-width: 640px) {
#app {
left: calc(10px + env(safe-area-inset-left));
right: calc(10px + env(safe-area-inset-right));
width: auto;
}
.readouts { grid-template-columns: 1fr; }
}
.fab {
position: fixed;
left: calc(20px + env(safe-area-inset-left));
bottom: calc(20px + env(safe-area-inset-bottom));
height: 44px;
padding: 0 14px;
border-radius: 22px;
border: 1px solid rgba(255,255,255,0.35);
background: rgba(255,255,255,0.16); /* 高透明 */
color: #111;
backdrop-filter: saturate(120%) blur(20px);
box-shadow: 0 8px 24px rgba(0,0,0,0.18);
z-index: 15;
}
/* 根据背景自适应的两种透明方案 */
.fab.fab--light { /* 背景较暗时,浅色磨砂 */
background: rgba(255,255,255,0.18);
border-color: rgba(255,255,255,0.45);
color: #111;
}
.fab.fab--dark { /* 背景较亮时,深色磨砂 */
background: rgba(0,0,0,0.25);
border-color: rgba(255,255,255,0.25);
color: #fff;
}
.segmented {
display: inline-flex;
background: #F2F2F7; /* iOS grouped background */
border-radius: 12px;
padding: 2px;
border: 1px solid rgba(0,0,0,0.06);
}
.segmented > button {
height: 36px;
padding: 0 14px;
border: 0;
background: transparent;
color: #111;
border-radius: 10px;
}
.segmented > button[aria-selected="true"] {
background: var(--primary);
color: #fff;
box-shadow: 0 1px 3px rgba(10,132,255,.3);
}
.visually-hidden {
position: absolute !important;
height: 1px; width: 1px;
overflow: hidden;
clip: rect(1px, 1px, 1px, 1px);
white-space: nowrap;
border: 0; padding: 0; margin: -1px;
}
.icon-btn {
width: 44px;
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
}
/* Recent chips */
.chips { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.chip { height: 28px; line-height: 28px; padding: 0 10px; border-radius: 999px; border:1px solid var(--panel-border); background:#fff; font-size:12px; cursor:pointer; }
.chip:active { transform: scale(.98); }
/* Ensure header action buttons align and group correctly */
.header__actions {
display: flex;
align-items: center;
gap: 8px;
}
/* Normalize range control height for better alignment in controls */
input[type="range"] {
height: 44px;
margin: 0;
accent-color: var(--primary);
}