Skip to content

Commit b5c51fa

Browse files
committed
small tweaks
1 parent c1b0527 commit b5c51fa

File tree

5 files changed

+34
-26
lines changed

5 files changed

+34
-26
lines changed

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
import { Hide } from '@guardian/source/react-components';
1010
import { palette } from '../../../palette';
1111

12-
export type TrailTextSize = 'regular' | 'large' | 'xlarge';
12+
export type TrailTextSize = 'regular' | 'large';
1313

1414
const trailTextStyles = css`
1515
display: flex;
@@ -28,7 +28,6 @@ const fontStyles = (trailTextSize: TrailTextSize) => css`
2828
${textSans14}
2929
${from.desktop} {
3030
${trailTextSize === 'large' && textSans17}
31-
${trailTextSize === 'xlarge' && textSans20}
3231
}
3332
strong {
3433
font-weight: bold;
@@ -56,16 +55,12 @@ export const TrailText = ({
5655
padBottom = true,
5756
padTop = false,
5857
}: Props) => {
59-
const effectiveColour =
60-
trailTextSize === 'xlarge'
61-
? palette('--card-headline')
62-
: trailTextColour;
6358
const trailText = (
6459
<div
6560
css={[
6661
trailTextStyles,
6762
css`
68-
color: ${effectiveColour};
63+
color: ${trailTextColour};
6964
`,
7065
fontStyles(trailTextSize),
7166
padBottom && bottomPadding,

dotcom-rendering/src/components/FlexibleSpecial.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,13 @@ const determineCardProperties = (
6262
case 'default':
6363
return {
6464
headlineSizes: {
65-
desktop: imageSuppressed ? 'xxlarge' : 'xlarge',
66-
tablet: 'large',
67-
mobile: 'medium',
65+
desktop: SCStyle
66+
? 'small'
67+
: imageSuppressed
68+
? 'xxlarge'
69+
: 'xlarge',
70+
tablet: SCStyle ? 'small' : 'large',
71+
mobile: SCStyle ? 'xxsmall' : 'medium',
6872
},
6973
mediaSize: 'xlarge',
7074
mediaPositionOnDesktop: 'right',
@@ -204,7 +208,9 @@ export const OneCardLayout = ({
204208
trailTextSize={trailTextSize}
205209
canPlayInline={true}
206210
showKickerImage={card.format.design === ArticleDesign.Audio}
207-
headlinePosition={isSplashCard ? 'outer' : 'inner'}
211+
headlinePosition={
212+
SCStyle ? 'inner' : isSplashCard ? 'outer' : 'inner'
213+
}
208214
showLabsRedesign={showLabsRedesign}
209215
subtitleSize={subtitleSize}
210216
/>

dotcom-rendering/src/components/StorylineSection.tsx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ const sectionContentBorderFromLeftCol = css`
370370
position: absolute;
371371
top: ${space[2]}px;
372372
bottom: 0;
373+
border-left: 1px solid ${schemePalette('--section-border')};
373374
transform: translateX(-50%);
374375
/** Keeps the vertical divider ontop of carousel item dividers */
375376
z-index: 1;
@@ -386,15 +387,19 @@ const sectionBottomContent = css`
386387
`;
387388

388389
const sectionTreats = css`
389-
display: none;
390+
/* Mobile: treats appear at the bottom */
391+
grid-row: bottom-content;
392+
grid-column: content;
393+
${from.leftCol} {
394+
padding-top: ${space[2]}px;
395+
}
396+
padding-bottom: ${space[3]}px;
390397
391398
${from.leftCol} {
392-
padding-bottom: ${space[3]}px;
393-
display: block;
394399
align-self: end;
395-
396400
grid-row: treats;
397401
grid-column: title;
402+
padding-top: 0;
398403
}
399404
400405
.hidden > & {
@@ -426,7 +431,7 @@ const topBorder = css`
426431
`;
427432

428433
const bottomPadding = css`
429-
padding-bottom: ${space[6]}px;
434+
padding-bottom: ${space[4]}px;
430435
`;
431436

432437
const bottomPaddingBetaContainer = (
@@ -435,13 +440,13 @@ const bottomPaddingBetaContainer = (
435440
) => css`
436441
${until.tablet} {
437442
padding-bottom: ${useLargeSpacingMobile
438-
? `${space[10]}px`
439-
: `${space[6]}px`};
443+
? `${space[8]}px`
444+
: `${space[4]}px`};
440445
}
441446
${from.tablet} {
442447
padding-bottom: ${useLargeSpacingDesktop
443-
? `${space[10]}px`
444-
: `${space[6]}px`};
448+
? `${space[8]}px`
449+
: `${space[4]}px`};
445450
}
446451
`;
447452

@@ -744,7 +749,7 @@ export const StorylineSection = ({
744749
</div>
745750

746751
{treats && !hasPageSkin && (
747-
<div css={[sectionTreats, topPadding]}>
752+
<div css={[sectionTreats]}>
748753
<Treats
749754
treats={treats}
750755
borderColour={schemePalette('--section-border')}

dotcom-rendering/src/components/StorylineTabContent.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ const categoryTitleCss = css`
1515
${textSans20};
1616
font-weight: 700;
1717
color: ${sourcePalette.news[300]};
18+
margin: ${space[2]}px 0;
1819
padding: ${space[2]}px 0;
1920
${from.tablet} {
20-
padding: 10px;
21+
margin: 10px;
2122
}
2223
2324
border-top: 1px solid ${palette('--section-border-secondary')};
@@ -52,6 +53,7 @@ export const StorylineTabContent = ({ content }: { content: Category[] }) => {
5253
aspectRatio={'5:4'}
5354
collectionId={0}
5455
SCStyle={true}
56+
containerLevel="Secondary"
5557
/>
5658
);
5759
case 'flexible/general':

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const tabsContainerStyles = css`
3636
display: flex;
3737
width: 100%;
3838
align-items: stretch; /* Makes all tabs the same height */
39-
margin-bottom: ${space[2]}px;
39+
margin-bottom: ${space[6]}px;
4040
margin-left: -${space[2]}px; /* on mobile at least */
4141
`;
4242

@@ -86,9 +86,9 @@ export const StorylinesSection = ({
8686
format: { design: 0, display: 0, theme: 0 },
8787
dataLinkName: 'news | group-0 | card-@1',
8888
url: '',
89-
headline: '',
90-
trailText:
89+
headline:
9190
'The former prince remains under scrutiny as Buckingham Palace finalises plans for his future as a commoner',
91+
trailText: undefined,
9292
starRating: undefined,
9393
webPublicationDate: '2025-10-31T19:24:41.000Z',
9494
kickerText: undefined,
@@ -700,7 +700,7 @@ export const StorylinesSection = ({
700700
{/* Tab selector */}
701701
<div css={tabsContainerStyles}>
702702
<ScrollableCarousel
703-
carouselLength={Math.ceil(testStorylines.length / 2)}
703+
carouselLength={Math.ceil(testStorylines.length)}
704704
visibleCarouselSlidesOnMobile={2}
705705
visibleCarouselSlidesOnTablet={4}
706706
sectionId={'sectionId'}

0 commit comments

Comments
 (0)