Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
265d0f2
Remove leftover debug crop and duplicate CSS from immersive grid layout
DanielCliftonGuardian Jul 30, 2026
724623d
Fix immersive content overlapping the Labs header
DanielCliftonGuardian Jul 30, 2026
996fd99
Preserve immersive main media aspect ratios
DanielCliftonGuardian Jul 30, 2026
e96161e
Route only Labs immersive articles through the new grid
DanielCliftonGuardian Aug 3, 2026
12c9356
Update DecideLayout.stories.tsx
DanielCliftonGuardian Aug 3, 2026
1b5a7b6
Merge branch 'main' into portrait-layout
DanielCliftonGuardian Aug 3, 2026
09f4a73
Update playwright assertion
DanielCliftonGuardian Aug 3, 2026
8970a22
Merge branch 'main' into portrait-layout
DanielCliftonGuardian Aug 3, 2026
ce1eafa
align title to bottom of container
alessiaAmitrano Aug 3, 2026
52297b5
fix standfirst font-size
alessiaAmitrano Aug 3, 2026
995f40a
make layoutType optional for Standfirst
alessiaAmitrano Aug 3, 2026
9dbab9d
make layoutType optional for Standfirst styling
alessiaAmitrano Aug 3, 2026
d3fda35
headline and standfirst colour
alessiaAmitrano Aug 3, 2026
e1ff037
fix title text colour and background
alessiaAmitrano Aug 3, 2026
28db79b
remove unused import
alessiaAmitrano Aug 3, 2026
be01639
style title for immersive portrait layout
alessiaAmitrano Aug 10, 2026
1874966
style headline and meta for immersive portrait layout
alessiaAmitrano Aug 10, 2026
1c7d5eb
remove wild comma from styling array
alessiaAmitrano Aug 10, 2026
1ef7105
Merge remote-tracking branch 'origin/main' into aa/portrait-layout-co…
alessiaAmitrano Aug 13, 2026
3acb139
Merge portrait-layout into aa/portrait-layout-continued-2, keeping Al…
DanielCliftonGuardian Aug 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 63 additions & 3 deletions dotcom-rendering/src/components/ArticleHeadline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const decideMobileHeadlineFont = (format: ArticleFormat) => {
}
};

const headlineFont = (format: ArticleFormat) => {
const headlineFont = (format: ArticleFormat, layoutType?: LayoutType) => {
if (format.design === ArticleDesign.Gallery) {
return css`
${decideMobileHeadlineFont(format)}
Expand All @@ -132,6 +132,17 @@ const headlineFont = (format: ArticleFormat) => {
}
`;
}
if (
layoutType === 'immersivePortraitDefault' ||
layoutType === 'immersivePortraitFeature'
) {
return css`
${decideMobileHeadlineFont(format)}
${from.leftCol} {
${decideHeadlineFont(format)}
}
`;
}
return css`
${decideMobileHeadlineFont(format)}
${from.tablet} {
Expand Down Expand Up @@ -292,6 +303,45 @@ const gridHeadlineText = css`
color: ${themePalette('--immersive-grid-headline-colour')};
`;

/** Headline colour specific to the immersive portrait grid layout */
const immersivePortraitHeadlineText = css`
color: ${themePalette('--immersive-portrait-headline-text')};
`;

const gridColumns = css`
${from.desktop} {
grid-column: 1 / 6;
}
${from.leftCol} {
grid-column: 1 / 7;
}
${from.wide} {
grid-column: 1 / 8;
}
`;

const displayGrid = css`
${from.desktop} {
display: grid;
grid-template-columns: repeat(6, 1fr);
grid-gap: 0.25fr;
}
${from.leftCol} {
grid-template-columns: repeat(7, 1fr);
}
${from.wide} {
grid-template-columns: repeat(8, 1fr);
}
`;

const paddingBottom = css`
padding-bottom: ${space[6]}px;

${from.desktop} {
padding-bottom: 0;
}
`;

const maxWidth = css`
${from.desktop} {
max-width: 620px;
Expand Down Expand Up @@ -488,6 +538,9 @@ export const ArticleHeadline = ({
starRating,
}: Props) => {
const isInverted = layoutType === 'immersiveLandscapeDefault';
const isImmersivePortrait =
layoutType === 'immersivePortraitDefault' ||
layoutType === 'immersivePortraitFeature';
const isLegacyImmersive = layoutType == null;
switch (format.display) {
case ArticleDisplay.Immersive: {
Expand Down Expand Up @@ -568,20 +621,27 @@ export const ArticleHeadline = ({
]
: isInverted
? [invertedText, darkBackground]
: gridHeadlineText,
: isImmersivePortrait
? immersivePortraitHeadlineText
: gridHeadlineText,
isImmersivePortrait && [
displayGrid,
paddingBottom,
],
]}
>
<span
css={[
format.theme === ArticleSpecial.Labs
? jumboLabsFont
: headlineFont(format),
: headlineFont(format, layoutType),
maxWidth,
isLegacyImmersive && [
legacyInvertedStyles,
legacyImmersiveStyles,
],
displayBlock,
isImmersivePortrait && gridColumns,
]}
>
{headlineString}
Expand Down
22 changes: 21 additions & 1 deletion dotcom-rendering/src/components/ArticleMeta.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,22 @@ const metaNumbersExtrasLiveBlog = css`
}
`;

const borderTop = css`
border-top: 1px solid ${themePalette('--article-border')};

${from.desktop} {
border-top: none;
}
`;

const paddingTop = css`
padding-top: ${space[3]}px;

${from.leftCol} {
padding-top: 0;
}
`;

export const ArticleMeta = ({
branding,
format,
Expand Down Expand Up @@ -343,7 +359,11 @@ export const ArticleMeta = ({
className={
isInteractive ? interactiveLegacyClasses.metaContainer : ''
}
css={metaContainer(format)}
css={[
metaContainer(format),
isImmersiveGrid && borderTop,
isImmersiveGrid && paddingTop,
]}
>
<div css={meta(format)}>
{branding && (
Expand Down
27 changes: 26 additions & 1 deletion dotcom-rendering/src/components/ArticleTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
ArticleDisplay,
type ArticleFormat,
} from '../lib/articleFormat';
import { palette as themePalette } from '../palette';
import type { TagType } from '../types/tag';
import { SeriesSectionLink } from './SeriesSectionLink';

Expand Down Expand Up @@ -63,6 +64,21 @@ const galleryStyles = css`
}
`;

const immersivePortraitStyles = css`
${from.leftCol} {
height: 100%;
justify-content: flex-end;
}
`;

const immersivePortraitSeriesSectionWrapperStyles = css`
padding: 3px 6px 4px;
margin-bottom: 0;
background-color: ${themePalette('--immersive-portrait-title-background')};
width: fit-content;
min-width: unset;
`;

export const ArticleTitle = ({
format,
layoutType,
Expand All @@ -77,6 +93,9 @@ export const ArticleTitle = ({
[ArticleDesign.Gallery, ArticleDesign.HostedGallery].includes(
format.design,
) && galleryStyles,
(layoutType === 'immersivePortraitDefault' ||
layoutType === 'immersivePortraitFeature') &&
immersivePortraitStyles,
sectionStyles,
]}
>
Expand All @@ -85,7 +104,13 @@ export const ArticleTitle = ({
format.display === ArticleDisplay.Immersive
? layoutType == null
? legacyImmersiveMargins
: immersiveGridMargins
: layoutType === 'immersivePortraitDefault' ||
layoutType === 'immersivePortraitFeature'
? [
immersiveGridMargins,
immersivePortraitSeriesSectionWrapperStyles,
]
: immersiveGridMargins
: undefined
}
>
Expand Down
8 changes: 6 additions & 2 deletions dotcom-rendering/src/layouts/StandardLayoutArticleGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,12 @@ export const StandardLayoutArticleGrid = ({
`,
isImmersivePortrait &&
css`
align-self: end;
margin-bottom: 2px;
${from.desktop} {
margin: auto 0 0;
}
${from.leftCol} {
margin: 0;
}
`,
]}
>
Expand Down
4 changes: 2 additions & 2 deletions dotcom-rendering/src/layouts/lib/articleArrangements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ const immersivePortraitDefaultCss: LayoutCssMap = {
standfirst: {
mobile: 'grid-row: 4;',
tablet: 'grid-row: 4;',
desktop: `grid-row: 3; ${grid.between('centre-column-start', 7)};`,
desktop: `grid-row: 3; ${grid.between('centre-column-start', 8)};`,
leftCol: `grid-row: 3; ${grid.between('centre-column-start', 8)};`,
wide: `grid-row: 3; ${grid.between('centre-column-start', 9)};`,
},
Expand Down Expand Up @@ -231,7 +231,7 @@ const immersivePortraitFeatureCss: LayoutCssMap = {
standfirst: {
mobile: 'grid-row: 4;',
tablet: 'grid-row: 4;',
desktop: `grid-row: 3; ${grid.between('centre-column-start', 7)};`,
desktop: `grid-row: 3; ${grid.between('centre-column-start', 8)};`,
leftCol: `grid-row: 3; ${grid.between('centre-column-start', 8)};`,
wide: `grid-row: 3; ${grid.between('centre-column-start', 9)};`,
},
Expand Down
42 changes: 42 additions & 0 deletions dotcom-rendering/src/paletteDeclarations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,40 @@ const immersiveGridHeadlineTextLight: PaletteFunction = () =>
const immersiveGridHeadlineTextDark: PaletteFunction = () =>
sourcePalette.neutral[97];

/** Headline colour for the immersive portrait grid layout specifically */
const immersivePortraitHeadlineLight: PaletteFunction = () =>
sourcePalette.neutral[0];

const immersivePortraitHeadlineDark: PaletteFunction = () =>
sourcePalette.neutral[100];

/** Background for the series/section label on the immersive portrait grid layout */
const immersivePortraitTitleBackgroundLight: PaletteFunction = (format) => {
switch (format.theme) {
case Pillar.News:
case Pillar.Opinion:
case Pillar.Sport:
case Pillar.Lifestyle:
case Pillar.Culture:
return pillarPalette(format.theme, 400);
default:
return sourcePalette.neutral[100];
}
};

const immersivePortraitTitleBackgroundDark: PaletteFunction = (format) => {
switch (format.theme) {
case Pillar.News:
case Pillar.Opinion:
case Pillar.Sport:
case Pillar.Lifestyle:
case Pillar.Culture:
return pillarPalette(format.theme, 500);
default:
return sourcePalette.neutral[7];
}
};

const headlineBackgroundLight: PaletteFunction = ({
display,
design,
Expand Down Expand Up @@ -7575,6 +7609,14 @@ const paletteColours = {
light: immersiveGridHeadlineTextLight,
dark: immersiveGridHeadlineTextDark,
},
'--immersive-portrait-headline-text': {
light: immersivePortraitHeadlineLight,
dark: immersivePortraitHeadlineDark,
},
'--immersive-portrait-title-background': {
light: immersivePortraitTitleBackgroundLight,
dark: immersivePortraitTitleBackgroundDark,
},
'--interactive-atom-background': {
light: interactiveAtomBackgroundLight,
dark: interactiveAtomBackgroundDark,
Expand Down
Loading