Skip to content

Commit

Permalink
refactor: resume animate where paused
Browse files Browse the repository at this point in the history
  • Loading branch information
zerosoul committed Oct 16, 2019
1 parent 8f822a7 commit 5711592
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/Bgm.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ const StyledWraper = styled.aside`
audio {
display: none;
}
animation: ${Rotation} 2s infinite linear forwards;
&.playing {
animation: ${Rotation} 2s infinite linear forwards;
animation-play-state: running;
}
&.paused {
animation-play-state: paused;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Wrapper = styled.li`
transition: all 0.5s;
align-self: flex-start;
opacity: 0.8;
background-color: ${({ rgb }) => `rgba(${rgb.join(',')},.4)`};
background-color: ${({ rgb }) => `rgba(${rgb.join(',')},.3)`};
&:hover {
opacity: 0.9;
box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
Expand Down

0 comments on commit 5711592

Please sign in to comment.