Skip to content

Commit

Permalink
Revert "Merge pull request #12831 from guardian/support-datawrapper-a…
Browse files Browse the repository at this point in the history
…uto-dark-mode"

It turns out the font colour on iOS is not responding correctly to dark
mode graphics, giving us black text on a dark background. While we
figure out how to fix that, we’d like to revert the support for
auto-dark-mode, as adding it slightly reduced the spacing around
light-mode graphics in dark mode.

This reverts commit 90f72e9, reversing
changes made to 89a9121.
  • Loading branch information
emdash-ie committed Dec 16, 2024
1 parent 94387a9 commit 8e85840
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,7 @@ const wrapperStyle = ({
isDatawrapperGraphic: boolean;
}) => css`
${format.theme === ArticleSpecial.Labs ? textSans17 : article17}
background-color: ${themePalette(
isDatawrapperGraphic
? '--interactive-block-background-datawrapper'
: '--interactive-block-background',
)};
background-color: ${themePalette('--interactive-block-background')};
min-height: ${getMinHeight(role, loaded)};
position: relative;
display: flex;
Expand Down
35 changes: 0 additions & 35 deletions dotcom-rendering/src/paletteDeclarations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4015,37 +4015,6 @@ const interactiveBlockBackgroundLight: PaletteFunction = ({

const interactiveBlockBackgroundDark = () => sourcePalette.neutral[100];

const interactiveBlockBackgroundDatawrapperDark: PaletteFunction = ({
design,
theme,
}) => {
switch (design) {
case ArticleDesign.DeadBlog:
case ArticleDesign.LiveBlog:
return sourcePalette.neutral[10]; // same as liveBlockContainerBackgroundDark
case ArticleDesign.Standard:
case ArticleDesign.Review:
case ArticleDesign.Explainer:
case ArticleDesign.Feature:
case ArticleDesign.Interview:
case ArticleDesign.Interactive:
case ArticleDesign.PhotoEssay:
case ArticleDesign.FullPageInteractive:
case ArticleDesign.NewsletterSignup:
case ArticleDesign.Comment:
case ArticleDesign.Letter:
case ArticleDesign.Editorial:
switch (theme) {
case ArticleSpecial.SpecialReportAlt:
return sourcePalette.specialReportAlt[100]; // same as articleBackgroundDark
default:
return sourcePalette.neutral[10]; // same as articleBackgroundDark
}
default:
return sourcePalette.neutral[10]; // same as articleBackgroundDark
}
};

const mostViewedHeadlineLight = (): string => sourcePalette.neutral[7];
const mostViewedHeadlineDark = (): string => sourcePalette.neutral[86];

Expand Down Expand Up @@ -6549,10 +6518,6 @@ const paletteColours = {
light: interactiveBlockBackgroundLight,
dark: interactiveBlockBackgroundDark,
},
'--interactive-block-background-datawrapper': {
light: interactiveBlockBackgroundLight,
dark: interactiveBlockBackgroundDatawrapperDark,
},
'--interactive-contents-hover': {
light: interactiveContentsHoverLight,
dark: interactiveContentsHoverDark,
Expand Down

0 comments on commit 8e85840

Please sign in to comment.