Skip to content

Fix wave css animation#1599

Draft
Jeet-Bubna wants to merge 3 commits intopython-discord:mainfrom
Jeet-Bubna:fix-wave-css-animation
Draft

Fix wave css animation#1599
Jeet-Bubna wants to merge 3 commits intopython-discord:mainfrom
Jeet-Bubna:fix-wave-css-animation

Conversation

@Jeet-Bubna
Copy link
Copy Markdown

Summary

Fixed the wave animations on the home page, reducing the CLS score to near zero. The screenshot below was taken from the local development environment. This improvement was achieved by changing the animation method from margin-based to transform-based animation.

![Wave animation after fix]image

Description of changes

  • Updated wave animation to use transform: translateX() instead of animating margin-left, preventing layout recalculation and reducing CLS.
  • Adjusted overflow attributes on the wave container to accommodate a wider set of overflow scenarios.
  • TO DO: Implement seamless infinite loop for wave width, as discussed in the original issue.

I confirm I have:

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 8, 2026

Deploy Preview for pydis-static failed. Why did it fail? →

Name Link
🔨 Latest commit b70a73a
🔍 Latest deploy log https://app.netlify.com/projects/pydis-static/deploys/69acf9fa07a3e900083f0f6d

@Jeet-Bubna
Copy link
Copy Markdown
Author

Checking back in on this. The refactor to transform: translateX() successfully eliminated the 2.46 CLS on the home page in local testing. Happy to adjust the 'TO-DO' items if that's a blocker for the merge!"

@wookie184
Copy link
Copy Markdown
Contributor

Thanks for the PR. I've not tried it out yet but it seems like the linting CI is failing due to trailing whitespace.

Could you undo the formatting changes? They make the git diff less clear and are not consistent with the rest of the file.

@ChrisLovering
Copy link
Copy Markdown
Member

Marking as draft until CI failures are fixed

@ChrisLovering ChrisLovering marked this pull request as draft April 3, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants