Skip to content

Commit 9c8548b

Browse files
Rough implementation
1 parent 5993924 commit 9c8548b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dotcom-rendering/src/components/InteractiveBlockComponent.importable.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,16 @@ export const InteractiveBlockComponent = ({
346346
// Datawrapper-specific fix to suppress scrollbars appearing
347347
if (url.includes('datawrapper')) {
348348
iframe.scrolling = 'no';
349+
iframe.scrolling = 'no';
350+
// Turn off dark mode for Datawrapper embeds on web
351+
// This should be removed if/when dark mode is implements on the website
352+
if (
353+
!document.querySelector('.ios') ||
354+
!document.querySelector('.android')
355+
) {
356+
iframe.src +=
357+
(iframe.src.includes('?') ? '&' : '?') + 'dark=false';
358+
}
349359
}
350360

351361
setupWindowListeners(iframe);

0 commit comments

Comments
 (0)