Skip to content

Commit ce87614

Browse files
authored
Replace TagLink fill bar colour with article background colour (#12062)
* replace fill bar colour with article background colour * replace transparent with neutral.100 in article background palette function * use transparent background on age warning wrapper for interviews
1 parent 81ee435 commit ce87614

File tree

2 files changed

+4
-60
lines changed

2 files changed

+4
-60
lines changed

dotcom-rendering/src/components/TagLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const arrowStyles = css`
9595
`;
9696

9797
const fillBarStyles = css`
98-
background-color: ${palette('--tag-link-fill-background')};
98+
background-color: ${palette('--article-background')};
9999
width: 100%;
100100
margin-top: -1px;
101101
margin-bottom: -1px;

dotcom-rendering/src/palette.ts

Lines changed: 3 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -3023,12 +3023,12 @@ const articleBackgroundLight: PaletteFunction = ({
30233023
case ArticleSpecial.Labs:
30243024
switch (display) {
30253025
case ArticleDisplay.Immersive:
3026-
return 'transparent';
3026+
return sourcePalette.neutral[100];
30273027
default:
30283028
return sourcePalette.neutral[97];
30293029
}
30303030
default:
3031-
return 'transparent';
3031+
return sourcePalette.neutral[100];
30323032
}
30333033
}
30343034
};
@@ -4210,7 +4210,7 @@ const linkKickerTextDark: PaletteFunction = ({ theme }) => {
42104210
const ageWarningWrapperBackground: PaletteFunction = (format) => {
42114211
switch (format.design) {
42124212
case ArticleDesign.Interview:
4213-
return articleBackgroundLight(format);
4213+
return 'transparent';
42144214
default:
42154215
return headlineBackgroundLight(format);
42164216
}
@@ -5439,58 +5439,6 @@ const pinnedPostBorderDark: PaletteFunction = ({ theme }) => {
54395439
};
54405440

54415441
const tagLinkBackground: PaletteFunction = () => sourcePalette.sport[800];
5442-
const tagLinkFillBackground: PaletteFunction = ({ design, display, theme }) => {
5443-
switch (design) {
5444-
case ArticleDesign.LiveBlog:
5445-
case ArticleDesign.DeadBlog:
5446-
return sourcePalette.neutral[97];
5447-
// Order matters. We want comment special report pieces to have the opinion background
5448-
case ArticleDesign.Letter:
5449-
return sourcePalette.opinion[800];
5450-
case ArticleDesign.Comment:
5451-
switch (theme) {
5452-
case ArticleSpecial.SpecialReportAlt:
5453-
return sourcePalette.specialReportAlt[800];
5454-
default:
5455-
return sourcePalette.opinion[800];
5456-
}
5457-
case ArticleDesign.Editorial:
5458-
return sourcePalette.opinion[800];
5459-
case ArticleDesign.Analysis:
5460-
switch (theme) {
5461-
case ArticleSpecial.SpecialReportAlt:
5462-
return sourcePalette.specialReportAlt[800];
5463-
default:
5464-
return sourcePalette.news[800];
5465-
}
5466-
case ArticleDesign.Picture:
5467-
case ArticleDesign.Audio:
5468-
case ArticleDesign.Video: {
5469-
switch (theme) {
5470-
case ArticleSpecial.Labs:
5471-
return sourcePalette.neutral[86];
5472-
default:
5473-
return sourcePalette.neutral[0];
5474-
}
5475-
}
5476-
default:
5477-
switch (theme) {
5478-
case ArticleSpecial.SpecialReport:
5479-
return sourcePalette.specialReport[800];
5480-
case ArticleSpecial.SpecialReportAlt:
5481-
return sourcePalette.specialReportAlt[800];
5482-
case ArticleSpecial.Labs:
5483-
switch (display) {
5484-
case ArticleDisplay.Immersive:
5485-
return 'transparent';
5486-
default:
5487-
return sourcePalette.neutral[97];
5488-
}
5489-
default:
5490-
return sourcePalette.neutral[100];
5491-
}
5492-
}
5493-
};
54945442

54955443
const tagLinkAccent: PaletteFunction = () => sourcePalette.sport[400];
54965444

@@ -6702,10 +6650,6 @@ const paletteColours = {
67026650
light: tagLinkBackground,
67036651
dark: tagLinkBackground,
67046652
},
6705-
'--tag-link-fill-background': {
6706-
light: tagLinkFillBackground,
6707-
dark: tagLinkFillBackground,
6708-
},
67096653
'--timeline-atom-bullet': {
67106654
light: timelineAtomBulletLight,
67116655
dark: timelineAtomBulletDark,

0 commit comments

Comments
 (0)