Skip to content

Commit 243aad5

Browse files
authored
Merge pull request #15352 from guardian/doml/fix-subtitle-positioning
Set self-hosted video subtitles max width to 71%
2 parents 93b972e + 5c336f2 commit 243aad5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

dotcom-rendering/src/components/SubtitleOverlay.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ import { palette } from '../palette';
99
import type { ControlsPosition, SubtitleSize } from './SelfHostedVideoPlayer';
1010

1111
const subtitleOverlayStyles = (position: ControlsPosition) => css`
12-
max-width: 71%;
12+
width: 100%;
13+
display: flex;
14+
justify-content: center;
1315
pointer-events: none;
1416
position: absolute;
15-
left: 50%;
16-
transform: translateX(-50%);
1717
1818
${position === 'top' && `top: ${space[4]}px;`};
1919
${position === 'bottom' && `bottom: ${space[4]}px;`};
2020
`;
2121

2222
const cueBoxStyles = css`
23-
width: 100%;
23+
max-width: 71%;
2424
margin: 0 auto;
2525
text-align: center;
2626
pointer-events: none;

0 commit comments

Comments
 (0)