-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed white blocks after shuffling + allowed reduced motion #1038
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -166,7 +166,10 @@ export default function Matchups({ session }: { session: HsSession }) { | |||
if (currentStep >= totalSteps) { | |||
clearInterval(spinInterval) | |||
document.body.style.transform = 'rotate(0deg)' // reset to initial state | |||
document.body.style.paddingTop = '1px' | |||
document.body.style.paddingTop = '0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question deleting this line may work why we are setting it to 0 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for the others.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually we don't need to set it to 0, I was just testing stuff and left it - transform and willChange is enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But it doesn't change anything, as it's initially 0 too, so Ig it's up to reviewer to leave it or not ; )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting it to 1px fixed the white blocks issue before which was why it was included FYI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor question!
Tested - LGTM! |
Some weird white blocks were showing up after shuffling at the top and bottom, fixed that.
Also made animation's duration 0 when prefers-reduced-motion is set