Skip to content

[Feature]: Support matching light / dark mode to match mode used at capture time. #532

Description

@ikreymer

Context

Ideally, replay will match the light / dark mode used at capture time.
A page can detect if dark mode was used via window.matchMedia('(prefers-color-scheme: dark)').matches but this is generally not being stored anywhere in our captures.
Currently, RWP allows dark theme by adding color-scheme: light dark to the replay component.
However, if the original capture was made with light theme, while users' browser is using dark theme, this may result in incorrect replay. In Browsertrix, we always use light theme, while AWP is using the users' current theme, which may be dark mode.

What change would you like to see?

  • First step: add a way to disable color-scheme: light dark, since we know these crawls are generally always captured with light theme, while for AWP captures, it should generally be kept.
  • Further out: add a way to store which theme was used at capture time, and apply color-scheme: light or color-scheme: dark if we know for certain (will require changes in wabac.js and the crawler).

Requirements

No response

Todo

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions