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

[FR]support auto mode #20

Open
rexzhang opened this issue Dec 25, 2023 · 1 comment
Open

[FR]support auto mode #20

rexzhang opened this issue Dec 25, 2023 · 1 comment

Comments

@rexzhang
Copy link

The latest version no longer supports separate light/dark theme

@Nedra1998
Copy link

I hacked together a bash command to merge the light and dark themes together with prefers-color-scheme to decide between light and dark:

for f in dist/theme-catppuccin-latte-*.css; do
    printf "@media (prefers-color-scheme: dark) {\n%s\n}\n\n@media (prefers-color-scheme: light){\n%s\n}" "$(cat "${f/latte/frappe}")" "$(cat "${f}")" > "out/$(basename "${f/latte/frappe}")"
    printf "@media (prefers-color-scheme: dark) {\n%s\n}\n\n@media (prefers-color-scheme: light){\n%s\n}" "$(cat "${f/latte/macchiato}")" "$(cat "${f}")" > "out/$(basename "${f/latte/macchiato}")"
    printf "@media (prefers-color-scheme: dark) {\n%s\n}\n\n@media (prefers-color-scheme: light){\n%s\n}" "$(cat "${f/latte/mocha}")" "$(cat "${f}")" > "out/$(basename "${f/latte/mocha}")"
done

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