Skip to content

Commit 9eff885

Browse files
committed
Show top bar on non-top cards in flex gen secondary containers
1 parent 39bce09 commit 9eff885

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-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.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,8 @@ export const StandardCardLayout = ({
506506
showTopBarMobile={
507507
!isFirstRow ||
508508
(containerLevel === 'Primary' &&
509-
!isMediaCard(card.format))
509+
!isMediaCard(card.format)) ||
510+
(containerLevel !== 'Primary' && cardIndex > 0)
510511
}
511512
trailText={undefined}
512513
// On standard cards, we increase the headline size if the trail image has been hidden

0 commit comments

Comments
 (0)