Skip to content

Commit

Permalink
fix: simplify Beachball rendering; remove overflow-x properties
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgrasset committed Jul 29, 2022
1 parent 9b5ab0a commit 1bbf9d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/BeachBall/BeachBall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import React from 'react';
*/
export const BeachBall = () => {
return (
<div id="beachball" className={"absolute top-0 right-0 overflow-hidden filter-blur-70 dark:opacity-20"} style={{ animation: 'spin 12s ease-in-out alternate infinite', zIndex: '-1' }}>
<div className="relative grid grid-cols-2 origin-center transform -rotate-45 dark:filter-grayscale-30">
<div id="beachball" className={"absolute top-0 right-0 overflow-hidden filter-blur-80 dark:opacity-20"} style={{ zIndex: '-1' }}>
<div className="relative grid grid-cols-2 origin-center transform -rotate-45 dark:filter-grayscale-30" style={{ animation: 'spin 12s ease-in-out alternate infinite'}}>
<div className="top-0 left-0 bg-yellow-400 rounded-full rounded-br-none w-60 h-60"></div>
<div className="top-0 right-0 bg-pink-400 rounded-full rounded-bl-none w-60 h-60"></div>
<div className="bottom-0 right-0 bg-purple-300 rounded-full rounded-tr-none w-60 h-60"></div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const IndexPage = ({ pageContext }: IndexPageProps) => {
</Helmet>

<main
className="pb-20 overflow-x-hidden transition-colors"
className="pb-20 transition-colors"
ref={refs.top}
>
<Alert
Expand Down
6 changes: 3 additions & 3 deletions src/styles/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ nav > div:first-child.show {

@keyframes spin {
0% {
transform: rotate(0deg) scale(1);
transform: rotate(-45deg) scale(1);
}
100% {
transform: rotate(360deg) scale(1.2);
transform: rotate(315deg) scale(1.2);
}
}

Expand All @@ -64,7 +64,7 @@ nav > div:first-child.show {
}

@media screen and (max-width: 768px) {
#beachball {
#beachball > div {
animation-play-state: paused !important;
}
#contact {
Expand Down

0 comments on commit 1bbf9d4

Please sign in to comment.