Skip to content

Commit

Permalink
Update link colours for audio articles (#12608)
Browse files Browse the repository at this point in the history
* update links in Audio components to use light text colours
  • Loading branch information
oliverabrahams authored Oct 24, 2024
1 parent 873c655 commit 45aa8ab
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@ export const QuotedDeadBlogDesignAllThemes = {
},
} satisfies Story;

export const QuotedCommentDesignAudioAllThemes = {
args: QuotedStandardDesignAllThemes.args,
parameters: {
formats: getAllThemes({
design: ArticleDesign.Audio,
display: ArticleDisplay.Standard,
}),
},
} satisfies Story;

export const QuotedAllDesignsNewsTheme = {
args: QuotedStandardDesignAllThemes.args,
parameters: {
Expand Down
17 changes: 15 additions & 2 deletions dotcom-rendering/src/palette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3131,6 +3131,9 @@ const articleSectionTitleDark: PaletteFunction = () =>
sourcePalette.neutral[86];

const articleLinkTextLight: PaletteFunction = ({ design, theme }) => {
if (design === ArticleDesign.Audio) {
return sourcePalette.neutral[86];
}
if (design === ArticleDesign.Analysis) return sourcePalette.news[300];
switch (theme) {
case Pillar.Lifestyle:
Expand Down Expand Up @@ -3170,8 +3173,10 @@ const articleLinkTextDark: PaletteFunction = ({ display, theme }) => {
};

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

if (theme === ArticleSpecial.SpecialReport) {
return sourcePalette.specialReport[300];
}
Expand Down Expand Up @@ -3205,6 +3210,9 @@ const articleMetaLinesDark: PaletteFunction = ({ design }) => {
};

const articleLinkHoverLight: PaletteFunction = ({ design, theme }) => {
if (design === ArticleDesign.Audio) {
return sourcePalette.neutral[86];
}
switch (design) {
case ArticleDesign.DeadBlog:
switch (theme) {
Expand Down Expand Up @@ -3274,7 +3282,12 @@ const articleLinkHoverLight: PaletteFunction = ({ design, theme }) => {
const articleLinkHoverDark: PaletteFunction = (f) => articleLinkTextDark(f);

const articleLinkBorderHoverLight: PaletteFunction = ({ design, theme }) => {
if (theme === ArticleSpecial.Labs) return sourcePalette.neutral[7];
if (design === ArticleDesign.Audio) {
return sourcePalette.neutral[86];
}
if (theme === ArticleSpecial.Labs) {
return sourcePalette.neutral[7];
}
if (theme === ArticleSpecial.SpecialReport) {
return sourcePalette.specialReport[100];
}
Expand Down

0 comments on commit 45aa8ab

Please sign in to comment.