Skip to content

Commit

Permalink
Fixed safari bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveeeie committed Nov 18, 2020
1 parent 6e56b2f commit 28ee857
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions src/lib/animations.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ export const animations = {
moveToLeft: {
keyframes: keyframes`
from { }
to { transform: translateX(-100%); }
to { transform: translateX(-100%) rotateZ(0.01deg); }
`,
duration: 600,
timing: 'ease',
fill: 'both'
},
moveFromLeft: {
keyframes: keyframes`
from { transform: translateX(-100%) };
from { transform: translateX(-100%) rotateZ(0.01deg); }
`,
duration: 600,
timing: 'ease',
Expand All @@ -21,15 +21,15 @@ export const animations = {
moveToRight: {
keyframes: keyframes`
from { }
to { transform: translateX(100%); }
to { transform: translateX(100%) rotateZ(0.01deg); }
`,
duration: 600,
timing: 'ease',
fill: 'both'
},
moveFromRight: {
keyframes: keyframes`
from { transform: translateX(100%); }
from { transform: translateX(100%) rotateZ(0.01deg); }
`,
duration: 600,
timing: 'ease',
Expand All @@ -38,15 +38,15 @@ export const animations = {
moveToTop: {
keyframes: keyframes`
from { }
to { transform: translateY(-100%); }
to { transform: translateY(-100%) rotateZ(0.01deg); }
`,
duration: 600,
timing: 'ease',
fill: 'both'
},
moveFromTop: {
keyframes: keyframes`
from { transform: translateY(-100%); }
from { transform: translateY(-100%) rotateZ(0.01deg); }
`,
duration: 600,
timing: 'ease',
Expand All @@ -55,15 +55,15 @@ export const animations = {
moveToBottom: {
keyframes: keyframes`
from { }
to { transform: translateY(100%); }
to { transform: translateY(100%) rotateZ(0.01deg); }
`,
duration: 600,
timing: 'ease',
fill: 'both'
},
moveFromBottom: {
keyframes: keyframes`
from { transform: translateY(100%); }
from { transform: translateY(100%) rotateZ(0.01deg); }
`,
duration: 600,
timing: 'ease',
Expand All @@ -81,15 +81,15 @@ export const animations = {
moveToLeftFade: {
keyframes: keyframes`
from { }
to { opacity: 0.3; transform: translateX(-100%); }
to { opacity: 0.3; transform: translateX(-100%) rotateZ(0.01deg); }
`,
duration: 700,
timing: 'ease',
fill: 'both'
},
moveFromLeftFade: {
keyframes: keyframes`
from { opacity: 0.3; transform: translateX(-100%); }
from { opacity: 0.3; transform: translateX(-100%) rotateZ(0.01deg); }
`,
duration: 700,
timing: 'ease',
Expand All @@ -98,15 +98,15 @@ export const animations = {
moveToRightFade: {
keyframes: keyframes`
from { }
to { opacity: 0.3; transform: translateX(100%); }
to { opacity: 0.3; transform: translateX(100%) rotateZ(0.01deg); }
`,
duration: 700,
timing: 'ease',
fill: 'both'
},
moveFromRightFade: {
keyframes: keyframes`
from { opacity: 0.3; transform: translateX(100%); }
from { opacity: 0.3; transform: translateX(100%) rotateZ(0.01deg); }
`,
duration: 700,
timing: 'ease',
Expand All @@ -115,15 +115,15 @@ export const animations = {
moveToTopFade: {
keyframes: keyframes`
from { }
to { opacity: 0.3; transform: translateY(-100%); }
to { opacity: 0.3; transform: translateY(-100%) rotateZ(0.01deg); }
`,
duration: 600,
timing: 'ease',
fill: 'both'
},
moveFromTopFade: {
keyframes: keyframes`
from { opacity: 0.3; transform: translateY(-100%); }
from { opacity: 0.3; transform: translateY(-100%) rotateZ(0.01deg); }
`,
duration: 700,
timing: 'ease',
Expand All @@ -132,15 +132,15 @@ export const animations = {
moveToBottomFade: {
keyframes: keyframes`
from { }
to { opacity: 0.3; transform: translateY(100%); }
to { opacity: 0.3; transform: translateY(100%) rotateZ(0.01deg); }
`,
duration: 700,
timing: 'ease',
fill: 'both'
},
moveFromBottomFade: {
keyframes: keyframes`
from { opacity: 0.3; transform: translateY(100%); }
from { opacity: 0.3; transform: translateY(100%) rotateZ(0.01deg); }
`,
duration: 700,
timing: 'ease',
Expand Down
1 change: 1 addition & 0 deletions src/lib/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const PageTransitionWrapper = styled.div`
transform-style: preserve-3d;
transform: translate3d(0, 0, 0);
width: 100%;
will-change: tranform;
${({ state }) => stateMap[state]};
`;

0 comments on commit 28ee857

Please sign in to comment.