diff --git a/apps/web/src/app/globals.css b/apps/web/src/app/globals.css index 24a0ba2..24b8456 100644 --- a/apps/web/src/app/globals.css +++ b/apps/web/src/app/globals.css @@ -245,13 +245,19 @@ overflow: hidden; width: 0; border-right: 1.5px solid currentColor; - animation: nebula-type 5s steps(4, end) forwards, nebula-caret 0.9s steps(1, end) infinite; + /* type "such", hold, backspace (nebula-type, once); blink a finite number of times + (nebula-caret); then fade the whole thing out so it stops being distracting. */ + animation: + nebula-type 3s steps(4, end) forwards, + nebula-caret 0.8s steps(1, end) 10, + nebula-term-out 0.6s ease-in 7.4s forwards; } @keyframes nebula-type { 0% { width: 0; } - 16% { width: 4ch; } - 60% { width: 4ch; } - 74% { width: 0; } + 27% { width: 4ch; } + 67% { width: 4ch; } + 87% { width: 0; } 100% { width: 0; } } -@keyframes nebula-caret { 50% { border-color: transparent; } } \ No newline at end of file +@keyframes nebula-caret { 0%, 50% { border-color: currentColor; } 50.01%, 100% { border-color: transparent; } } +@keyframes nebula-term-out { to { opacity: 0; } } \ No newline at end of file diff --git a/packages/ui/src/procedural/nebula-field.tsx b/packages/ui/src/procedural/nebula-field.tsx index 8e43b91..1ae7b49 100644 --- a/packages/ui/src/procedural/nebula-field.tsx +++ b/packages/ui/src/procedural/nebula-field.tsx @@ -284,7 +284,10 @@ export const NebulaField = ({ className, density = 8, themeMode = 'dark', positi d={d} themeMode={themeMode} onHit={handleHit} - width={themeMode === 'light' ? 0.08 : 0.12} + // preserveAspectRatio="none" squishes the stroke horizontally on a narrow + // phone, so the thin lines render sub-pixel and vanish. Fatten them on + // mobile to compensate (dial: the 2.5x factor). + width={(themeMode === 'light' ? 0.08 : 0.12) * (isMobile ? 2.5 : 1)} index={i} /> ))}