Skip to content

Instantly share code, notes, and snippets.

@cmbaughman
Created September 10, 2025 13:22
Show Gist options
  • Select an option

  • Save cmbaughman/78ceb0c3e765b96fe3403517a9550539 to your computer and use it in GitHub Desktop.

Select an option

Save cmbaughman/78ceb0c3e765b96fe3403517a9550539 to your computer and use it in GitHub Desktop.
CSS to include in all websites for smoother scrolling and GPU acceleration for all transforms
html {
scroll-behavior: smooth;
}
.section {
transform: translateZ(0); /* force GPU layer */
will-change: transform;
}
@cmbaughman
Copy link
Author

This should be included in all websites to make transforms more smooth and for GPU acceleration.

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