Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set browser prefers-color-scheme to test apps in dark mode #1439

Closed
EmaSuriano opened this issue Nov 21, 2023 · 1 comment
Closed

Set browser prefers-color-scheme to test apps in dark mode #1439

EmaSuriano opened this issue Nov 21, 2023 · 1 comment

Comments

@EmaSuriano
Copy link

Summary

I started using the CLI command via Github Actions, like it's described in the official docs:

      - run: npm install --save-dev @percy/cli
      - run: npx percy snapshot _site/ # or any directory such as public/
        env:
          PERCY_TOKEN: $

And everything works as expected, nevertheless in my project I'm currently using tailwind for styling with the feature of Dark mode. Depending on the prefers-color-scheme the app changes the styles in order to follow dark:

I was navigating the documentation and Github Issues, but couldn't find any relevant option in order to set this option into the browser before the snapshots are generated.

@EmaSuriano EmaSuriano changed the title Configure prefers-color-scheme in order to test Dark mode. Set browser prefers-color-scheme to test apps in dark mode Nov 21, 2023
@itsjwala
Copy link
Contributor

Hey @EmaSuriano 👋

Please follow https://www.browserstack.com/docs/percy/take-percy-snapshots/snapshots-via-cli

if you still have queries please reach us via support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants