Skip to content

Commit 73fd691

Browse files
committed
Fix stories
1 parent 8bdf8c3 commit 73fd691

File tree

2 files changed

+46
-17
lines changed

2 files changed

+46
-17
lines changed

dotcom-rendering/src/components/Contributor.tsx

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { css } from '@emotion/react';
22
import {
33
headlineMedium17,
4+
palette as sourcePalette,
45
textEgyptianItalic17,
56
textSansItalic17,
67
until,
@@ -30,6 +31,16 @@ const standfirstColourBelowDesktop = css`
3031
}
3132
`;
3233

34+
const galleryBylineStyles = css`
35+
a {
36+
font-style: italic;
37+
:hover {
38+
text-decoration: none;
39+
border-color: ${schemedPalette('--byline-anchor')};
40+
}
41+
}
42+
`;
43+
3344
const bylineStyles = (format: ArticleFormat) => {
3445
const defaultStyles = css`
3546
${headlineMedium17}
@@ -52,17 +63,25 @@ const bylineStyles = (format: ArticleFormat) => {
5263

5364
switch (format.design) {
5465
case ArticleDesign.Gallery:
55-
return css`
56-
${defaultStyles}
57-
a {
58-
font-style: italic;
59-
:hover {
60-
text-decoration: none;
61-
border-color: ${schemedPalette('--byline-anchor')};
62-
}
63-
}
64-
`;
66+
switch (format.theme) {
67+
case ArticleSpecial.Labs: {
68+
return css`
69+
${defaultStyles}
70+
${galleryBylineStyles}
6571
72+
a {
73+
border-bottom: 0.5px solid
74+
${sourcePalette.neutral[46]};
75+
}
76+
`;
77+
}
78+
default: {
79+
return css`
80+
${defaultStyles}
81+
${galleryBylineStyles}
82+
`;
83+
}
84+
}
6685
default:
6786
return defaultStyles;
6887
}

dotcom-rendering/src/paletteDeclarations.ts

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -979,7 +979,12 @@ export const tabs = {
979979
const datelineLight: PaletteFunction = ({ design, theme }) => {
980980
switch (design) {
981981
case ArticleDesign.Gallery:
982-
return sourcePalette.neutral[60];
982+
switch (theme) {
983+
case ArticleSpecial.Labs:
984+
return sourcePalette.neutral[86];
985+
default:
986+
return sourcePalette.neutral[60];
987+
}
983988
case ArticleDesign.Comment:
984989
case ArticleDesign.Editorial:
985990
case ArticleDesign.Letter:
@@ -2738,16 +2743,21 @@ const captionTextDark: PaletteFunction = ({ design, theme }) => {
27382743
}
27392744
};
27402745

2741-
const captionMainMediaTextLight: PaletteFunction = ({ design }) => {
2742-
switch (design) {
2746+
const captionMainMediaTextLight: PaletteFunction = (format) => {
2747+
switch (format.design) {
27432748
case ArticleDesign.Gallery:
2744-
return sourcePalette.neutral[60];
2749+
switch (format.theme) {
2750+
case ArticleSpecial.Labs:
2751+
return captionTextLight(format);
2752+
default:
2753+
return sourcePalette.neutral[60];
2754+
}
27452755
default:
2746-
return sourcePalette.neutral[46];
2756+
return captionTextLight(format);
27472757
}
27482758
};
2749-
const captionMainMediaTextDark: PaletteFunction = () =>
2750-
sourcePalette.neutral[60];
2759+
const captionMainMediaTextDark: PaletteFunction = (format) =>
2760+
captionTextDark(format);
27512761

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

0 commit comments

Comments
 (0)