|
36 | 36 |
|
37 | 37 | @theme inline { |
38 | 38 | --animate-skeleton: skeleton 2s -1s infinite linear; |
| 39 | + /* Duty-cycled indicator animations: long opacity holds with short stepped |
| 40 | + ramps, so the compositor only produces frames while the value changes |
| 41 | + (~20% of the cycle) instead of every vsync. Keep flat holds dominant. */ |
| 42 | + --animate-status-pulse: status-pulse 2s infinite; |
| 43 | + --animate-status-ping: status-ping 2s infinite; |
39 | 44 | --font-sans: |
40 | 45 | "DM Sans Variable", "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, |
41 | 46 | sans-serif; |
|
78 | 83 | background-position: -200% 0; |
79 | 84 | } |
80 | 85 | } |
| 86 | + @keyframes status-pulse { |
| 87 | + 0%, |
| 88 | + 40% { |
| 89 | + opacity: 1; |
| 90 | + animation-timing-function: steps(6); |
| 91 | + } |
| 92 | + 50%, |
| 93 | + 90% { |
| 94 | + opacity: 0.5; |
| 95 | + animation-timing-function: steps(6); |
| 96 | + } |
| 97 | + 100% { |
| 98 | + opacity: 1; |
| 99 | + } |
| 100 | + } |
| 101 | + @keyframes status-ping { |
| 102 | + /* Burst first (immediate feedback for click ripples), then hold |
| 103 | + invisible for the rest of the cycle. Mirrors animate-ping's |
| 104 | + 75%-scale start. */ |
| 105 | + 0% { |
| 106 | + opacity: 0.9; |
| 107 | + scale: 0.75; |
| 108 | + animation-timing-function: steps(8); |
| 109 | + } |
| 110 | + 40%, |
| 111 | + 100% { |
| 112 | + opacity: 0; |
| 113 | + scale: 2; |
| 114 | + } |
| 115 | + } |
81 | 116 | } |
82 | 117 |
|
83 | 118 | @layer base { |
|
151 | 186 | padding-inline-end: calc(env(safe-area-inset-right) + 0.75rem); |
152 | 187 | } |
153 | 188 |
|
154 | | - .chat-composer-glass, |
155 | | - .chat-composer-lower-chrome { |
| 189 | + .chat-composer-glass { |
156 | 190 | background: color-mix(in srgb, var(--card) 20%, transparent); |
157 | 191 | } |
158 | 192 |
|
| 193 | + /* Mix from --background (not --card): the lower chrome is a full-width |
| 194 | + strip over the main view, and a card-tinted wash reads as a lighter |
| 195 | + seam against it when no content is scrolled underneath. The backdrop |
| 196 | + blur, not the tint, carries the frosted effect. */ |
| 197 | + .chat-composer-lower-chrome { |
| 198 | + background: color-mix(in srgb, var(--background) 20%, transparent); |
| 199 | + } |
| 200 | + |
159 | 201 | .chat-composer-glass { |
160 | 202 | box-shadow: |
161 | 203 | 0 18px 48px -20px rgb(0 0 0 / 28%), |
|
167 | 209 | backdrop-filter: blur(16px); |
168 | 210 | } |
169 | 211 |
|
170 | | - .dark .chat-composer-glass, |
171 | | - .dark .chat-composer-lower-chrome { |
| 212 | + .dark .chat-composer-glass { |
172 | 213 | background: color-mix(in srgb, var(--card) 45%, transparent); |
173 | 214 | } |
174 | 215 |
|
| 216 | + .dark .chat-composer-lower-chrome { |
| 217 | + background: color-mix(in srgb, var(--background) 45%, transparent); |
| 218 | + } |
| 219 | + |
175 | 220 | .dark .chat-composer-glass { |
176 | 221 | box-shadow: |
177 | 222 | 0 18px 48px -20px rgb(0 0 0 / 60%), |
|
192 | 237 | } |
193 | 238 |
|
194 | 239 | @supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { |
195 | | - .chat-composer-glass, |
196 | | - .chat-composer-lower-chrome { |
| 240 | + .chat-composer-glass { |
197 | 241 | background: var(--card); |
198 | 242 | } |
| 243 | + |
| 244 | + .chat-composer-lower-chrome { |
| 245 | + background: var(--background); |
| 246 | + } |
199 | 247 | } |
200 | 248 | } |
201 | 249 |
|
|
215 | 263 | padding-right: max(env(safe-area-inset-right), 0px); |
216 | 264 | } |
217 | 265 |
|
| 266 | +/* Grain texture for chrome surfaces that float above the body (see the |
| 267 | + --surface-grain note). Layered over the element's background-color, so it |
| 268 | + composes with bg-* utilities. */ |
| 269 | +@utility surface-grain { |
| 270 | + background-image: var(--surface-grain); |
| 271 | + background-repeat: repeat; |
| 272 | + background-size: 256px 256px; |
| 273 | +} |
| 274 | + |
218 | 275 | /* Suppress all transitions during theme changes */ |
219 | 276 | .no-transitions, |
220 | 277 | .no-transitions *, |
@@ -320,13 +377,19 @@ body { |
320 | 377 | padding-top: max(env(safe-area-inset-top), 0px); |
321 | 378 | } |
322 | 379 |
|
323 | | -body::after { |
324 | | - content: ""; |
325 | | - position: fixed; |
326 | | - inset: 0; |
327 | | - pointer-events: none; |
328 | | - opacity: 0.035; |
329 | | - background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); |
| 380 | +/* App-chrome grain. Baked into each surface's own background (behind |
| 381 | + content) rather than a fixed overlay on top: a full-viewport overlay |
| 382 | + forces the compositor to re-blend every frame any animation produces, |
| 383 | + which multiplied idle GPU cost. The overlay's 0.035 opacity lives in the |
| 384 | + SVG rect instead. Surfaces that float over the body (e.g. the inset main |
| 385 | + card) must opt in via the surface-grain utility, or they lose the |
| 386 | + grain's subtle brightening and stand out against the body. */ |
| 387 | +:root { |
| 388 | + --surface-grain: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E"); |
| 389 | +} |
| 390 | + |
| 391 | +body { |
| 392 | + background-image: var(--surface-grain); |
330 | 393 | background-repeat: repeat; |
331 | 394 | background-size: 256px 256px; |
332 | 395 | } |
|
0 commit comments