Repository navigation
Conversation
Add a new --color-scheme [light|dark|no-preference] option to the shot, multi, and javascript commands, allowing emulation of the prefers-color-scheme CSS media feature via Playwright's color_scheme browser context option. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Independent confirmation that this fills a real gap — with evidence that there's no user-side workaround, which I think is the part that makes this worth having in core. I needed exactly this today and first tried to get it without patching shot-scraper (1.11). There's no way to do it:
That leaves CDP One scope note for anyone finding this later: #121 also asks for per-shot keys in the (Heads up that this currently shows as conflicting against |
Hey @simonw, thanks for shot-scraper! Found it through your post about showboat (sidenote: the showboat README has a broken link to shot-scraper that should be pointing to https://github.com/simonw/shot-scraper rather than https://github.com/shot-scraper).
I've steered Claude to add a flag for dark mode / light mode, as it makes things simpler than trying to wrangle the Javascript via the args. Have used it in one of my own projects to create alternate light and dark illustrative screenshots depending on what the user has selected.
Dropping the PR for it here in case you find it useful.
📚 Documentation preview 📚: https://shot-scraper--191.org.readthedocs.build/en/191/