Skip to content

Commit

Permalink
Add new colour --bio-link-underline
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbyford committed Dec 11, 2024
1 parent 669bd62 commit cd08a97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dotcom-rendering/src/components/Bio.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css } from '@emotion/react';
import { neutral, space, textSans14 } from '@guardian/source/foundations';
import { space, textSans14 } from '@guardian/source/foundations';
import sanitise from 'sanitize-html';
import { palette } from '../palette';

Expand All @@ -20,7 +20,7 @@ const bioStyles = css`
text-underline-offset: 3px;
}
a:not(:hover) {
text-decoration-color: ${neutral[86]};
text-decoration-color: ${palette('--bio-link-underline')};
}
a:hover {
text-decoration: underline;
Expand Down
6 changes: 6 additions & 0 deletions dotcom-rendering/src/paletteDeclarations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5374,6 +5374,8 @@ const lastUpdatedTextDark: PaletteFunction = ({ theme, design }) => {
}
};

const bioLinkUnderline: PaletteFunction = () => sourcePalette.neutral[86];

const bioTextSubduedLight: PaletteFunction = () => sourcePalette.neutral[46];
const bioTextSubduedDark: PaletteFunction = () => sourcePalette.neutral[86];

Expand Down Expand Up @@ -5915,6 +5917,10 @@ const paletteColours = {
light: avatarLight,
dark: avatarDark,
},
'--bio-link-underline': {
light: bioLinkUnderline,
dark: bioLinkUnderline,
},
'--bio-text-subdued': {
light: bioTextSubduedLight,
dark: bioTextSubduedDark,
Expand Down

0 comments on commit cd08a97

Please sign in to comment.