Hero: run neon scan left-to-right once and fix descender clipping#36
Hero: run neon scan left-to-right once and fix descender clipping#36Gonza10V wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 95b19ecf4b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ); | ||
| background-size: 240% 100%; | ||
| background-position: 120% 0; | ||
| background-position: -120% 0; |
There was a problem hiding this comment.
Stop the scan background from repeating
Since .hero-neon-text does not set background-repeat, the default repeat still applies here. With background-size: 240% 100%, background-position: -120% 0 does not put the gradient off the left edge; a repeated tile covers the headline and leaves the green band around the middle at rest, so the scan wraps instead of starting as a single left-to-right sweep. Add background-repeat: no-repeat or use positions that account for repeating.
Useful? React with 👍 / 👎.
Motivation
Description
background-positionso the green highlight travels left-to-right by animating from-120%to120%and set the animation duration to1sinsrc/styles/global.css.background-positionto-120%so the scan starts off the left edge and addedpadding-bottom: 0.08emand increasedline-heightto1.06(and1.08on small screens) to prevent descender clipping insrc/styles/global.css.src/pages/index.astroto add ahasPlayedHeroScanflag and removed thepointerenterreplay handler so the hero scan runs only once after page load..hero-neon-text--activeanimation usage to a single iteration and ensured the class is removed onanimationendfor cleanup.Testing
pnpm format:checkwhich passed with no formatting issues.pnpm buildwhich completed successfully and produced the static site build without errors.Codex Task