Skip to content

Commit e6e6ed8

Browse files
Only apply bottom padding in articles
1 parent 7c0f03d commit e6e6ed8

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

dotcom-rendering/src/components/SelfHostedVideo.island.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ type Props = {
319319
isExternalLink: boolean;
320320
};
321321
isInLoopClickTestVariant?: boolean;
322+
isInArticle?: boolean;
322323
};
323324

324325
export const SelfHostedVideo = ({
@@ -351,6 +352,7 @@ export const SelfHostedVideo = ({
351352
restrictHeightOnDesktop = false,
352353
cardLink,
353354
isInLoopClickTestVariant,
355+
isInArticle = false,
354356
}: Props) => {
355357
const adapted = useShouldAdapt();
356358
const { renderingTarget } = useConfig();
@@ -1075,9 +1077,13 @@ export const SelfHostedVideo = ({
10751077

10761078
return (
10771079
<figure
1078-
css={css`
1079-
margin-bottom: ${space[3]}px;
1080-
`}
1080+
css={
1081+
isInArticle
1082+
? css`
1083+
margin-bottom: ${space[3]}px;
1084+
`
1085+
: undefined
1086+
}
10811087
ref={videoContainerRef}
10821088
className={`video-container ${videoStyleFormat} ${
10831089
role === 'immersive' ? 'element-video-immersive' : ''

dotcom-rendering/src/components/SelfHostedVideoInArticle.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export const SelfHostedVideoInArticle = ({
7070
restrictHeightOnDesktop={
7171
isVerticalVideo && !isInteractive(format.design)
7272
}
73+
isInArticle={true}
7374
/>
7475
</Island>
7576
);

0 commit comments

Comments
 (0)