Skip to content

Commit dc5d364

Browse files
Make interactives support dark mode across platforms
1 parent cc6456c commit dc5d364

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,11 @@ 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+
// Interactive dark mode support launched with full DCAR on June 25th 2025
170+
const isBeforeInteractiveDarkModeSupportLaunch =
171+
Date.parse(webPublicationDate) < Date.parse('2024-07-01T00:00:00Z');
168172

169173
const pageHtml = htmlPageTemplate({
170174
linkedData,
@@ -189,7 +193,8 @@ window.twttr = (function(d, s, id) {
189193
hasSurveyAd: !!frontendData.config.hasSurveyAd,
190194
onlyLightColourScheme:
191195
design === ArticleDesign.FullPageInteractive ||
192-
design === ArticleDesign.Interactive,
196+
(design === ArticleDesign.Interactive &&
197+
isBeforeInteractiveDarkModeSupportLaunch),
193198
});
194199

195200
return { html: pageHtml, prefetchScripts };

0 commit comments

Comments
 (0)