Skip to content

Commit 0e5badb

Browse files
committed
Change ol to ul following scrollable carousel change. Moved styles below component to keep with essence of file ordering.
1 parent bdf2332 commit 0e5badb

1 file changed

Lines changed: 36 additions & 37 deletions

File tree

dotcom-rendering/src/components/ScrollableSmallOnwards.tsx

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,6 @@ type Props = {
2727
headingUrl?: string;
2828
};
2929

30-
const cardsContainerStyles = css`
31-
${grid.column.centre}
32-
position: relative;
33-
${from.desktop} {
34-
${grid.between('centre-column-start', 'right-column-end')}
35-
}
36-
${from.leftCol} {
37-
${grid.between('centre-column-start', 'right-column-end')}
38-
}
39-
${from.leftCol} {
40-
&::before {
41-
content: '';
42-
position: absolute;
43-
left: -11px;
44-
top: 0;
45-
bottom: 0;
46-
width: 1px;
47-
background-color: ${palette('--onward-content-border')};
48-
}
49-
ol {
50-
padding-left: 0;
51-
}
52-
}
53-
`;
54-
5530
export const ScrollableSmallOnwards = (props: Props) => {
5631
const trails = props.trails.slice(0, 4); // Limit to 4 cards
5732
if (trails.length !== 4) return null;
@@ -63,18 +38,7 @@ export const ScrollableSmallOnwards = (props: Props) => {
6338
<section
6439
data-component={props.onwardsSource}
6540
data-link={props.onwardsSource}
66-
css={css`
67-
${grid.paddedContainer}
68-
background-color: ${palette('--onward-background')};
69-
padding-top: ${space[1]}px;
70-
padding-bottom: ${space[6]}px;
71-
${from.tablet} {
72-
padding-top: 0;
73-
border-left: 1px solid ${palette('--onward-content-border')};
74-
border-right: 1px solid
75-
${palette('--onward-content-border')};
76-
}
77-
`}
41+
css={containerStyles}
7842
>
7943
<StraightLines
8044
cssOverrides={[
@@ -137,6 +101,40 @@ export const ScrollableSmallOnwards = (props: Props) => {
137101
);
138102
};
139103

104+
const containerStyles = css`
105+
${grid.paddedContainer}
106+
background-color: ${palette('--onward-background')};
107+
padding-top: ${space[1]}px;
108+
padding-bottom: ${space[6]}px;
109+
${from.tablet} {
110+
padding-top: 0;
111+
border-left: 1px solid ${palette('--onward-content-border')};
112+
border-right: 1px solid ${palette('--onward-content-border')};
113+
}
114+
`;
115+
116+
const cardsContainerStyles = css`
117+
${grid.column.centre}
118+
position: relative;
119+
${from.desktop} {
120+
${grid.between('centre-column-start', 'right-column-end')}
121+
}
122+
${from.leftCol} {
123+
&::before {
124+
content: '';
125+
position: absolute;
126+
left: -11px;
127+
top: 0;
128+
bottom: 0;
129+
width: 1px;
130+
background-color: ${palette('--onward-content-border')};
131+
}
132+
ul {
133+
padding-left: 0;
134+
}
135+
}
136+
`;
137+
140138
const Title = ({
141139
title,
142140
headingUrl,
@@ -236,5 +234,6 @@ const getDefaultCardProps = (
236234
isOnwardContent: true,
237235
showLivePlayable: false,
238236
};
237+
239238
return defaultProps;
240239
};

0 commit comments

Comments
 (0)