Skip to content

Enhancement: follow light/dark mode of PL #96

@phocks

Description

@phocks

Odyssey light/dark theme has traditionally been a content producer-controlled option. With Presentation Layer introducing user-controlled light/dark mode switching, we should consider building that behaviour into Odyssey (possibly an optional setting that can be overridden).

Here's a proof of concept that seems to work:

https://github.com/abcnews/interactive-artemis-ii/blob/c0d3da7d4ef87752d57b1d04f080376235226650/src/lib/darkModeSwitcher.ts

Screen.Recording.2026-02-04.at.5.52.30.pm.mp4

There may be additional classes and datasets that need to be changed and checked on elements other than these (maybe blocks or something), but this should be enough to get started.

const main = document.querySelector(".Main") as HTMLElement;
const header = document.querySelector(".Header") as HTMLElement;

header?.classList.remove("is-dark");
header.dataset.scheme = "light";
main.dataset.scheme = "light";

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions