Skip to content

Commit 94b325a

Browse files
authored
Merge pull request #13652 from guardian/doml/dividing-line-editorials
Display line between cards in secondary Flexible General containers on mobile
2 parents 8331892 + 2bffcbf commit 94b325a

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

dotcom-rendering/src/components/Card/components/CardWrapper.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const sublinkHoverStyles = css`
6262
}
6363
`;
6464

65-
const desktopTopBarStyles = css`
65+
const topBarStyles = css`
6666
:before {
6767
border-top: 1px solid ${palette('--card-border-top')};
6868
content: '';
@@ -72,12 +72,14 @@ const desktopTopBarStyles = css`
7272
background-color: unset;
7373
}
7474
`;
75-
7675
const mobileTopBarStyles = css`
7776
${until.tablet} {
78-
${desktopTopBarStyles}
77+
${topBarStyles}
7978
}
8079
`;
80+
const desktopTopBarStyles = css`
81+
${topBarStyles}
82+
`;
8183

8284
const onwardContentStyles = css`
8385
border-radius: ${space[2]}px;

dotcom-rendering/src/components/FlexibleGeneral.stories.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,3 +502,15 @@ export const WithSpecialPaletteVariations = {
502502
</>
503503
),
504504
} satisfies Story;
505+
506+
export const SecondaryContainerStandardCards: Story = {
507+
name: 'Secondary container with standard cards',
508+
args: {
509+
frontSectionTitle: 'Secondary container standard cards',
510+
containerLevel: 'Secondary',
511+
groupedTrails: {
512+
...defaultGroupedTrails,
513+
standard: standardCards.slice(0, 4),
514+
},
515+
},
516+
};

dotcom-rendering/src/components/FlexibleGeneral.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,8 @@ const StandardCardLayout = ({
504504
showTopBarMobile={
505505
!isFirstRow ||
506506
(containerLevel === 'Primary' &&
507-
!isMediaCard(card.format))
507+
!isMediaCard(card.format)) ||
508+
(containerLevel !== 'Primary' && cardIndex > 0)
508509
}
509510
trailText={undefined}
510511
// On standard cards, we increase the headline size if the trail image has been hidden

0 commit comments

Comments
 (0)