Skip to content

Commit b3e57c1

Browse files
committed
Align card edge with edge of screen on mobile devices
1 parent e911ffb commit b3e57c1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

dotcom-rendering/src/components/ScrollableProduct.importable.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { SerializedStyles } from '@emotion/react';
22
import { css } from '@emotion/react';
33
import type { Breakpoint } from '@guardian/source/foundations';
4-
import { from, space, textSans14 } from '@guardian/source/foundations';
4+
import { from, space, textSans14, until } from '@guardian/source/foundations';
55
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
66
import type { ArticleFormat } from '../lib/articleFormat';
77
import { nestedOphanComponents } from '../lib/ophan-helpers';
@@ -44,6 +44,12 @@ type Props = {
4444

4545
const baseContainerStyles = css`
4646
position: relative;
47+
${until.tablet} {
48+
margin-right: -20px;
49+
}
50+
${until.mobileLandscape} {
51+
margin-right: -10px; /* Align right card edge with edge of screen on mobile */
52+
}
4753
`;
4854
const navigationStyles = css`
4955
padding-bottom: ${space[1]}px;

0 commit comments

Comments
 (0)