Skip to content

Commit a200b23

Browse files
ioannakokmarjisound
andcommitted
Make sure we cover PhotoEssay design requirements
Co-authored-by: Marjan Kalanaki <[email protected]>
1 parent 6f34d72 commit a200b23

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

dotcom-rendering/src/paletteDeclarations.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2745,6 +2745,8 @@ const captionTextDark: PaletteFunction = ({ design, theme }) => {
27452745

27462746
const captionMainMediaTextLight: PaletteFunction = (format) => {
27472747
switch (format.design) {
2748+
case ArticleDesign.PhotoEssay:
2749+
return sourcePalette.neutral[46];
27482750
case ArticleDesign.Gallery:
27492751
switch (format.theme) {
27502752
case ArticleSpecial.Labs:
@@ -2756,8 +2758,14 @@ const captionMainMediaTextLight: PaletteFunction = (format) => {
27562758
return captionTextLight(format);
27572759
}
27582760
};
2759-
const captionMainMediaTextDark: PaletteFunction = (format) =>
2760-
captionTextDark(format);
2761+
const captionMainMediaTextDark: PaletteFunction = (format) => {
2762+
switch (format.design) {
2763+
case ArticleDesign.PhotoEssay:
2764+
return sourcePalette.neutral[60];
2765+
default:
2766+
return captionTextDark(format);
2767+
}
2768+
};
27612769

27622770
const captionLink: PaletteFunction = ({ design, theme }) => {
27632771
if (design === ArticleDesign.Analysis && theme === Pillar.News) {

0 commit comments

Comments
 (0)