Skip to content

Commit d461349

Browse files
committed
Merge branch 'ENG-4396_port_RichTextCarousel_styles_from_CR' of https://github.com/comicrelief/component-library into ENG-4396_port_RichTextCarousel_styles_from_CR
2 parents 6059fe1 + 1517cc4 commit d461349

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

src/components/Atoms/AmbientVideo/AmbientVideo.style.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
import styled from 'styled-components';
1+
import styled, { keyframes } from 'styled-components';
22

33
import zIndex from '../../../theme/shared/zIndex';
44

5+
// This is so that the button is initially visible, then afterwards
6+
// it's only seen again on hover
7+
const playPauseIntro = keyframes`
8+
0%,
9+
93.75% {
10+
opacity: 0.8;
11+
}
12+
100% {
13+
opacity: 0;
14+
}
15+
`;
16+
517
const Wrapper = styled.div`
618
width: 100%;
719
height: 100%;
@@ -78,7 +90,8 @@ const PlayPauseButton = styled.button`
7890
align-items: center;
7991
justify-content: center;
8092
opacity: 0;
81-
transition: opacity 0.2s ease 2s;
93+
animation: ${playPauseIntro} 3s ease;
94+
transition: opacity 0.2s ease 3s;
8295
${zIndex('high')};
8396
8497
// Play icon is shifted to the right slightly as it

src/components/Molecules/PictureOrVideo/__snapshots__/PictureOrVideo.test.js.snap

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ exports[`renders AmbientVideo when video props are provided correctly 1`] = `
6262
-ms-flex-pack: center;
6363
justify-content: center;
6464
opacity: 0;
65-
-webkit-transition: opacity 0.2s ease 2s;
66-
transition: opacity 0.2s ease 2s;
65+
-webkit-animation: diKSqD 3s ease;
66+
animation: diKSqD 3s ease;
67+
-webkit-transition: opacity 0.2s ease 3s;
68+
transition: opacity 0.2s ease 3s;
6769
z-index: 3;
6870
}
6971

0 commit comments

Comments
 (0)