Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update link colours for audio articles #12608

Merged
merged 13 commits into from
Oct 24, 2024
Merged
Changes from 3 commits
Commits
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
33 changes: 27 additions & 6 deletions dotcom-rendering/src/palette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3130,8 +3130,11 @@ const articleSectionTitleLight: PaletteFunction = () =>
const articleSectionTitleDark: PaletteFunction = () =>
sourcePalette.neutral[86];

const articleLinkTextLight: PaletteFunction = ({ design, theme }) => {
const articleLinkTextLight: PaletteFunction = ({ display, design, theme }) => {
if (design === ArticleDesign.Analysis) return sourcePalette.news[300];
if (design === ArticleDesign.Audio) {
return articleLinkTextDark({ display, design, theme });
oliverabrahams marked this conversation as resolved.
Show resolved Hide resolved
}
switch (theme) {
case Pillar.Lifestyle:
return sourcePalette.lifestyle[300];
Expand Down Expand Up @@ -3169,9 +3172,15 @@ const articleLinkTextDark: PaletteFunction = ({ display, theme }) => {
}
};

const articleLinkBorderLight: PaletteFunction = ({ design, theme }) => {
const articleLinkBorderLight: PaletteFunction = ({
display,
design,
theme,
}) => {
if (theme === ArticleSpecial.Labs) return sourcePalette.neutral[60];

if (design === ArticleDesign.Audio) {
return articleLinkBorderDark({ display, design, theme });
oliverabrahams marked this conversation as resolved.
Show resolved Hide resolved
}
if (theme === ArticleSpecial.SpecialReport) {
return sourcePalette.specialReport[300];
}
Expand Down Expand Up @@ -3204,7 +3213,10 @@ const articleMetaLinesDark: PaletteFunction = ({ design }) => {
}
};

const articleLinkHoverLight: PaletteFunction = ({ design, theme }) => {
const articleLinkHoverLight: PaletteFunction = ({ display, design, theme }) => {
if (design === ArticleDesign.Audio) {
return articleLinkHoverDark({ display, design, theme });
oliverabrahams marked this conversation as resolved.
Show resolved Hide resolved
}
switch (design) {
case ArticleDesign.DeadBlog:
switch (theme) {
Expand Down Expand Up @@ -3273,8 +3285,17 @@ const articleLinkHoverLight: PaletteFunction = ({ design, theme }) => {

const articleLinkHoverDark: PaletteFunction = (f) => articleLinkTextDark(f);

const articleLinkBorderHoverLight: PaletteFunction = ({ design, theme }) => {
if (theme === ArticleSpecial.Labs) return sourcePalette.neutral[7];
const articleLinkBorderHoverLight: PaletteFunction = ({
display,
design,
theme,
}) => {
if (theme === ArticleSpecial.Labs) {
return sourcePalette.neutral[7];
}
if (design === ArticleDesign.Audio) {
return articleLinkBorderHoverDark({ display, design, theme });
oliverabrahams marked this conversation as resolved.
Show resolved Hide resolved
}
if (theme === ArticleSpecial.SpecialReport) {
return sourcePalette.specialReport[100];
}
Expand Down
Loading