Skip to content

Commit fb98a25

Browse files
committed
Hero entrance animation moves text without hiding it
The hero copy is the largest contentful paint: animating its opacity from 0 delayed LCP by several seconds on slow devices.
1 parent 0ff989a commit fb98a25

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎inertia/css/app.css‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,13 @@
233233
}
234234
}
235235

236+
/* Movement only, never opacity: hero text is the LCP element and must be
237+
visible from the very first paint. */
236238
@keyframes rise {
237239
from {
238-
opacity: 0;
239-
translate: 0 18px;
240+
translate: 0 14px;
240241
}
241242
to {
242-
opacity: 1;
243243
translate: 0 0;
244244
}
245245
}

0 commit comments

Comments
 (0)