Skip to content

Commit bc10e88

Browse files
Merge pull request #14749 from guardian/dark-mode-for-all-new-web-interactives
2 parents 709eccf + bf9fe00 commit bc10e88

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

dotcom-rendering/src/server/render.article.web.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,10 @@ window.twttr = (function(d, s, id) {
164164
}(document, "script", "twitter-wjs"));
165165
</script>`;
166166

167-
const { canonicalUrl } = frontendData;
167+
const { canonicalUrl, webPublicationDate } = frontendData;
168+
169+
const isBeforeInteractiveDarkModeSupport =
170+
Date.parse(webPublicationDate) < Date.parse('2026-01-13T00:00:00Z');
168171

169172
const pageHtml = htmlPageTemplate({
170173
linkedData,
@@ -188,8 +191,9 @@ window.twttr = (function(d, s, id) {
188191
hasLiveBlogTopAd: !!frontendData.config.hasLiveBlogTopAd,
189192
hasSurveyAd: !!frontendData.config.hasSurveyAd,
190193
onlyLightColourScheme:
191-
design === ArticleDesign.FullPageInteractive ||
192-
design === ArticleDesign.Interactive,
194+
(design === ArticleDesign.FullPageInteractive ||
195+
design === ArticleDesign.Interactive) &&
196+
isBeforeInteractiveDarkModeSupport,
193197
});
194198

195199
return { html: pageHtml, prefetchScripts };

0 commit comments

Comments
 (0)