Skip to content

Hero: run neon scan left-to-right once and fix descender clipping#36

Open
Gonza10V wants to merge 1 commit into
mainfrom
codex/fix-glow-animation-on-hero-text
Open

Hero: run neon scan left-to-right once and fix descender clipping#36
Gonza10V wants to merge 1 commit into
mainfrom
codex/fix-glow-animation-on-hero-text

Conversation

@Gonza10V

@Gonza10V Gonza10V commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • The hero headline glow currently replays and the green highlight direction/timing should be a single left-to-right sweep to match the intended effect.
  • Headline descenders are being visually clipped, so the text needs slightly more vertical space.
  • The hover replay behavior is unnecessary and should be disabled so the scan only runs once on load.

Description

  • Adjusted the neon scan keyframes and initial background-position so the green highlight travels left-to-right by animating from -120% to 120% and set the animation duration to 1s in src/styles/global.css.
  • Set the default background-position to -120% so the scan starts off the left edge and added padding-bottom: 0.08em and increased line-height to 1.06 (and 1.08 on small screens) to prevent descender clipping in src/styles/global.css.
  • Updated the hero script in src/pages/index.astro to add a hasPlayedHeroScan flag and removed the pointerenter replay handler so the hero scan runs only once after page load.
  • Tuned the .hero-neon-text--active animation usage to a single iteration and ensured the class is removed on animationend for cleanup.

Testing

  • Ran pnpm format:check which passed with no formatting issues.
  • Ran pnpm build which completed successfully and produced the static site build without errors.

Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/styles/global.css
);
background-size: 240% 100%;
background-position: 120% 0;
background-position: -120% 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant