Date: Wed, 3 Dec 2025 15:58:54 +0000
Subject: [PATCH 12/15] Add football stat colours to palette
---
.../src/components/FootballMatchStat.stories.tsx | 7 +++++--
.../src/components/FootballMatchStat.tsx | 8 ++++----
.../FootballMiniMatchStats.stories.tsx | 5 +++--
.../src/components/FootballMiniMatchStats.tsx | 9 +++++++--
dotcom-rendering/src/paletteDeclarations.ts | 16 ++++++++++++++++
5 files changed, 35 insertions(+), 10 deletions(-)
diff --git a/dotcom-rendering/src/components/FootballMatchStat.stories.tsx b/dotcom-rendering/src/components/FootballMatchStat.stories.tsx
index 65e3cdb6457..339ecc24a57 100644
--- a/dotcom-rendering/src/components/FootballMatchStat.stories.tsx
+++ b/dotcom-rendering/src/components/FootballMatchStat.stories.tsx
@@ -1,6 +1,7 @@
import { css } from '@emotion/react';
-import { palette, space } from '@guardian/source/foundations';
+import { space } from '@guardian/source/foundations';
import type { Meta, StoryObj } from '@storybook/react-webpack5';
+import { palette } from '../palette';
import { FootballMatchStat } from './FootballMatchStat';
const meta = {
@@ -11,7 +12,9 @@ const meta = {
diff --git a/dotcom-rendering/src/components/FootballMatchStat.tsx b/dotcom-rendering/src/components/FootballMatchStat.tsx
index a9dbf332d7f..47e55f94bd0 100644
--- a/dotcom-rendering/src/components/FootballMatchStat.tsx
+++ b/dotcom-rendering/src/components/FootballMatchStat.tsx
@@ -1,18 +1,18 @@
import { css } from '@emotion/react';
import {
from,
- palette,
textSansBold14,
textSansBold15,
textSansBold20,
textSansBold28,
visuallyHidden,
} from '@guardian/source/foundations';
+import { palette } from '../palette';
const containerCss = css`
position: relative;
padding: 5px 10px 10px;
- border: 1px solid ${palette.neutral[86]};
+ border: 1px solid ${palette('--footall-match-stat-border')};
border-radius: 6px;
&::before {
position: absolute;
@@ -21,7 +21,7 @@ const containerCss = css`
bottom: 0;
width: 1px;
height: 24px;
- background-color: ${palette.neutral[86]};
+ background-color: ${palette('--footall-match-stat-border')};
}
`;
@@ -43,7 +43,7 @@ const labelCss = css`
${textSansBold14};
grid-area: label;
justify-self: center;
- color: ${palette.neutral[7]};
+ color: ${palette('--footall-match-stat-name')};
${from.desktop} {
${textSansBold15};
}
diff --git a/dotcom-rendering/src/components/FootballMiniMatchStats.stories.tsx b/dotcom-rendering/src/components/FootballMiniMatchStats.stories.tsx
index 0749d03aa9c..7bfc0cbcbff 100644
--- a/dotcom-rendering/src/components/FootballMiniMatchStats.stories.tsx
+++ b/dotcom-rendering/src/components/FootballMiniMatchStats.stories.tsx
@@ -1,10 +1,11 @@
import { css } from '@emotion/react';
-import { breakpoints, from, palette } from '@guardian/source/foundations';
+import { breakpoints, from } from '@guardian/source/foundations';
import type { Meta, StoryObj } from '@storybook/react-webpack5';
+import { palette } from '../palette';
import { FootballMiniMatchStats as FootballMiniMatchStatsComponent } from './FootballMiniMatchStats';
const gridCss = css`
- background-color: ${palette.neutral[97]};
+ background-color: ${palette('--football-live-blog-background')};
/**
* Extremely simplified live blog grid layout as we're only interested in
* the 240px wide left column added at the desktop breakpoint.
diff --git a/dotcom-rendering/src/components/FootballMiniMatchStats.tsx b/dotcom-rendering/src/components/FootballMiniMatchStats.tsx
index d5159f6d8b1..badfac1d18f 100644
--- a/dotcom-rendering/src/components/FootballMiniMatchStats.tsx
+++ b/dotcom-rendering/src/components/FootballMiniMatchStats.tsx
@@ -1,9 +1,10 @@
import { css } from '@emotion/react';
-import { from, palette } from '@guardian/source/foundations';
+import { from } from '@guardian/source/foundations';
import {
LinkButton,
SvgArrowRightStraight,
} from '@guardian/source/react-components';
+import { palette } from '../palette';
import { FootballMatchStat } from './FootballMatchStat';
const containerCss = css`
@@ -74,7 +75,11 @@ export const FootballMiniMatchStats = ({
size="small"
icon={
}
iconSide="right"
- theme={{ backgroundPrimary: palette.sport[400] }}
+ theme={{
+ backgroundPrimary: palette(
+ '--footall-match-stat-button-background',
+ ),
+ }}
>
More stats, line-ups and tables
Stats and line ups
diff --git a/dotcom-rendering/src/paletteDeclarations.ts b/dotcom-rendering/src/paletteDeclarations.ts
index c6b0d50efc7..31239e3c77a 100644
--- a/dotcom-rendering/src/paletteDeclarations.ts
+++ b/dotcom-rendering/src/paletteDeclarations.ts
@@ -7043,6 +7043,10 @@ const paletteColours = {
light: () => '#3DB540',
dark: () => '#3DB540',
},
+ '--football-live-blog-background': {
+ light: () => sourcePalette.neutral[97],
+ dark: () => sourcePalette.neutral[10],
+ },
'--football-match-hover': {
light: () => sourcePalette.neutral[93],
dark: () => sourcePalette.neutral[38],
@@ -7055,6 +7059,18 @@ const paletteColours = {
light: () => sourcePalette.sport[500],
dark: () => sourcePalette.sport[500],
},
+ '--footall-match-stat-border': {
+ light: () => sourcePalette.neutral[86],
+ dark: () => sourcePalette.neutral[20],
+ },
+ '--footall-match-stat-button-background': {
+ light: () => sourcePalette.sport[400],
+ dark: () => sourcePalette.sport[400],
+ },
+ '--footall-match-stat-name': {
+ light: () => sourcePalette.neutral[7],
+ dark: () => sourcePalette.neutral[86],
+ },
'--football-score-border': {
light: () => sourcePalette.neutral[7],
dark: () => sourcePalette.neutral[7],
From 17db668b0a30e3b3f5043969d94a3dedb4d55dd0 Mon Sep 17 00:00:00 2001
From: James Mockett <1166188+jamesmockett@users.noreply.github.com>
Date: Wed, 3 Dec 2025 16:02:08 +0000
Subject: [PATCH 13/15] Update dark mode palette based on latest designs
---
dotcom-rendering/src/components/FootballMatchStat.tsx | 6 +++---
.../src/components/FootballMiniMatchStats.tsx | 2 +-
dotcom-rendering/src/paletteDeclarations.ts | 10 +++++-----
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dotcom-rendering/src/components/FootballMatchStat.tsx b/dotcom-rendering/src/components/FootballMatchStat.tsx
index 47e55f94bd0..106637d4447 100644
--- a/dotcom-rendering/src/components/FootballMatchStat.tsx
+++ b/dotcom-rendering/src/components/FootballMatchStat.tsx
@@ -12,7 +12,7 @@ import { palette } from '../palette';
const containerCss = css`
position: relative;
padding: 5px 10px 10px;
- border: 1px solid ${palette('--footall-match-stat-border')};
+ border: 1px solid ${palette('--football-match-stat-border')};
border-radius: 6px;
&::before {
position: absolute;
@@ -21,7 +21,7 @@ const containerCss = css`
bottom: 0;
width: 1px;
height: 24px;
- background-color: ${palette('--footall-match-stat-border')};
+ background-color: ${palette('--football-match-stat-border')};
}
`;
@@ -43,7 +43,7 @@ const labelCss = css`
${textSansBold14};
grid-area: label;
justify-self: center;
- color: ${palette('--footall-match-stat-name')};
+ color: ${palette('--football-match-stat-name')};
${from.desktop} {
${textSansBold15};
}
diff --git a/dotcom-rendering/src/components/FootballMiniMatchStats.tsx b/dotcom-rendering/src/components/FootballMiniMatchStats.tsx
index badfac1d18f..f4d40a01373 100644
--- a/dotcom-rendering/src/components/FootballMiniMatchStats.tsx
+++ b/dotcom-rendering/src/components/FootballMiniMatchStats.tsx
@@ -77,7 +77,7 @@ export const FootballMiniMatchStats = ({
iconSide="right"
theme={{
backgroundPrimary: palette(
- '--footall-match-stat-button-background',
+ '--football-match-stat-button-background',
),
}}
>
diff --git a/dotcom-rendering/src/paletteDeclarations.ts b/dotcom-rendering/src/paletteDeclarations.ts
index 31239e3c77a..7f83f005e34 100644
--- a/dotcom-rendering/src/paletteDeclarations.ts
+++ b/dotcom-rendering/src/paletteDeclarations.ts
@@ -7059,15 +7059,15 @@ const paletteColours = {
light: () => sourcePalette.sport[500],
dark: () => sourcePalette.sport[500],
},
- '--footall-match-stat-border': {
+ '--football-match-stat-border': {
light: () => sourcePalette.neutral[86],
- dark: () => sourcePalette.neutral[20],
+ dark: () => sourcePalette.neutral[38],
},
- '--footall-match-stat-button-background': {
+ '--football-match-stat-button-background': {
light: () => sourcePalette.sport[400],
- dark: () => sourcePalette.sport[400],
+ dark: () => sourcePalette.sport[500],
},
- '--footall-match-stat-name': {
+ '--football-match-stat-name': {
light: () => sourcePalette.neutral[7],
dark: () => sourcePalette.neutral[86],
},
From d432bc4869b88990acc699f322556c348856c255 Mon Sep 17 00:00:00 2001
From: James Mockett <1166188+jamesmockett@users.noreply.github.com>
Date: Wed, 3 Dec 2025 16:59:00 +0000
Subject: [PATCH 14/15] Add button hover colours to palette
---
dotcom-rendering/src/components/FootballMiniMatchStats.tsx | 3 +++
dotcom-rendering/src/paletteDeclarations.ts | 4 ++++
2 files changed, 7 insertions(+)
diff --git a/dotcom-rendering/src/components/FootballMiniMatchStats.tsx b/dotcom-rendering/src/components/FootballMiniMatchStats.tsx
index f4d40a01373..23ecea0b33e 100644
--- a/dotcom-rendering/src/components/FootballMiniMatchStats.tsx
+++ b/dotcom-rendering/src/components/FootballMiniMatchStats.tsx
@@ -79,6 +79,9 @@ export const FootballMiniMatchStats = ({
backgroundPrimary: palette(
'--football-match-stat-button-background',
),
+ backgroundPrimaryHover: palette(
+ '--football-match-stat-button-background-hover',
+ ),
}}
>
More stats, line-ups and tables
diff --git a/dotcom-rendering/src/paletteDeclarations.ts b/dotcom-rendering/src/paletteDeclarations.ts
index 7f83f005e34..91be5d18441 100644
--- a/dotcom-rendering/src/paletteDeclarations.ts
+++ b/dotcom-rendering/src/paletteDeclarations.ts
@@ -7067,6 +7067,10 @@ const paletteColours = {
light: () => sourcePalette.sport[400],
dark: () => sourcePalette.sport[500],
},
+ '--football-match-stat-button-background-hover': {
+ light: () => '#00679E', // replace with Source's `calculateHoverColour` when available
+ dark: () => '#00A1E6',
+ },
'--football-match-stat-name': {
light: () => sourcePalette.neutral[7],
dark: () => sourcePalette.neutral[86],
From 7106f31855695e889567daa6e56c7faab7a30825 Mon Sep 17 00:00:00 2001
From: James Mockett <1166188+jamesmockett@users.noreply.github.com>
Date: Tue, 9 Dec 2025 16:17:25 +0000
Subject: [PATCH 15/15] Remove console log
---
dotcom-rendering/src/components/FootballMiniMatchStats.tsx | 1 -
1 file changed, 1 deletion(-)
diff --git a/dotcom-rendering/src/components/FootballMiniMatchStats.tsx b/dotcom-rendering/src/components/FootballMiniMatchStats.tsx
index 23ecea0b33e..0c335fcb1cd 100644
--- a/dotcom-rendering/src/components/FootballMiniMatchStats.tsx
+++ b/dotcom-rendering/src/components/FootballMiniMatchStats.tsx
@@ -49,7 +49,6 @@ export const FootballMiniMatchStats = ({
awayTeam,
stats,
}: Props) => {
- console.log(homeTeam, awayTeam, stats);
return (
{stats.map((stat) => (