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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: A option for colorScheme to follow the OS preference #30704

Open
silverwind opened this issue May 8, 2024 · 0 comments
Open

[Feature]: A option for colorScheme to follow the OS preference #30704

silverwind opened this issue May 8, 2024 · 0 comments

Comments

@silverwind
Copy link

silverwind commented May 8, 2024

馃殌 Feature Request

The colorScheme setting should provide a option to have it follow the current OS setting, e.g. emulate dark when OS prefers dark, and light when OS prefers light.

Example

Add a new colorScheme: "auto" option which when set, emulates the current OS color scheme preference.

Motivation

This is how it works in regular browsers, so playwright should offer it optionally. The default should stay at light to retain stable tests.

In my testing with OS set to dark, neither 'no-preference' nor null have any effect and it stays in light. Maybe null is meant to provide the OS behaviour, not sure.

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

No branches or pull requests

2 participants