Skip to content

Commit e181a1e

Browse files
committed
Reduce the gap between mobile card. Use gap over padding. Adjust spacing above and below container
1 parent 880174c commit e181a1e

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

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

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ type Props = {
1919
};
2020

2121
const containerStyles = css`
22+
padding: ${space[2]}px 0 ${space[3]}px;
2223
${from.tablet} {
23-
padding: 0 ${space[5]}px;
24+
padding: ${space[2]}px ${space[5]}px;
2425
}
2526
${from.wide} {
2627
padding-right: 100px;
@@ -29,6 +30,8 @@ const containerStyles = css`
2930

3031
const carouselStyles = css`
3132
display: grid;
33+
gap: 10px;
34+
padding: 0 10px;
3235
grid-auto-columns: 1fr;
3336
grid-auto-flow: column;
3437
overflow-x: auto;
@@ -37,11 +40,12 @@ const carouselStyles = css`
3740
scroll-behavior: smooth;
3841
overscroll-behavior-x: contain;
3942
overscroll-behavior-y: auto;
40-
${until.tablet} {
41-
scroll-padding-left: 10px;
42-
}
43+
scroll-padding-left: 10px;
44+
4345
${from.tablet} {
46+
padding: 0;
4447
scroll-padding-left: 120px;
48+
gap: ${space[5]}px;
4549
}
4650
${from.desktop} {
4751
scroll-padding-left: 240px;
@@ -70,17 +74,6 @@ const itemStyles = css`
7074
scroll-snap-align: start;
7175
grid-area: span 1;
7276
position: relative;
73-
margin: ${space[2]}px 10px ${space[3]}px;
74-
:first-child {
75-
${from.tablet} {
76-
margin-left: 0;
77-
}
78-
}
79-
:last-child {
80-
${from.tablet} {
81-
margin-right: 0;
82-
}
83-
}
8477
`;
8578

8679
const verticalLineStyles = css`

0 commit comments

Comments
 (0)