Skip to content

Commit f633ae1

Browse files
In mobile view, moves the play button to the top left
1 parent ce499e1 commit f633ae1

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import styled from 'styled-components';
22

3+
import { breakpointValues } from '../../../theme/shared/allBreakpoints';
34
import zIndex from '../../../theme/shared/zIndex';
45

6+
const mobileMaxWidth = breakpointValues.L - 1;
7+
58
const Wrapper = styled.div`
69
width: 100%;
710
height: 100%;
@@ -79,14 +82,21 @@ const PlayPauseButton = styled.button`
7982
justify-content: center;
8083
opacity: 0;
8184
transition: opacity 0.2s ease 2s;
82-
${zIndex('high')};
8385
8486
// Play icon is shifted to the right slightly as it
8587
// doesn't look quite right when centered normally
8688
&[data-play-pause='play'] ${PlayPauseIcon} {
8789
transform: translateX(2px);
8890
}
8991
92+
// Play icon needs to go to the top left on mobile
93+
// as with the hero banner, the text container can
94+
// overlap it
95+
@media (max-width: ${mobileMaxWidth}px) {
96+
top: 15px;
97+
bottom: auto;
98+
}
99+
90100
@media (prefers-reduced-motion: reduce) {
91101
display: none;
92102
}

0 commit comments

Comments
 (0)