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

Idea: add a new option "auto" for dark theme #3

Closed
filipac opened this issue Feb 8, 2019 · 2 comments
Closed

Idea: add a new option "auto" for dark theme #3

filipac opened this issue Feb 8, 2019 · 2 comments

Comments

@filipac
Copy link

filipac commented Feb 8, 2019

I was tinkering (no pun intended) with the idea of a new option for dark theme called "auto" (so it will accept true/false and "auto").

    /*
     * If light hurts you eyes, set this to true.
     */
    'dark_theme' => 'auto',

All that it does is adding a new class to html element and then using media queries the interface of the package will changed based on user's OS preference. The media query is not yet supported by many browsers, but Safari already tested it in Safari Technology Preview and it will become standard.

image

Quick demo:
image

What do you say, it is worth doing it? When the media query becomes a standard on all browser, this package would already support it.

@freekmurze
Copy link
Member

@willemvb What do you think about this?

@willemvb
Copy link
Contributor

Good idea, we do the same in our dashboard: https://github.com/spatie/dashboard.spatie.be/blob/master/resources/css/bootstrap.css#L41-L53

PR on it's way…

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

3 participants