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

Support separate light/dark themes #420

Open
samhh opened this issue Dec 21, 2024 · 4 comments · May be fixed by #442
Open

Support separate light/dark themes #420

samhh opened this issue Dec 21, 2024 · 4 comments · May be fixed by #442

Comments

@samhh
Copy link

samhh commented Dec 21, 2024

I've migrated my programs.zed-editor to take advantage of #359 (thank you!) and had to override the light theme given currently catppuccin only supports a single "flavour" which is implicitly applied across both light and dark modes: samhh/dotfiles@9ca1a63#diff-87b22b9d53b9e4c7e5bf904535ac70f0ef2566611199d4cf240ad1704423b58dR87-R89

Ideally, given the likes of Zed support specifying separate light and dark themes, we'd be able to optionally configure a different flavour for each. Presumably then there'd need to be some notion of a default where that dichotomy doesn't exist.

@isabelroses
Copy link
Member

It would be cool to see this. Though it would be interesting. One thing to note is only some ports would be capable of using the dark/light themes. Which may make it hard to implement.

A potential idea would be to modify the catppuccinLib.mkCatppuccinOptions to handle this, however it would make a bit of a grey area around the global flavour option.

Prior art in userstyles:
https://github.com/catppuccin/userstyles/blob/f90308af39acd7843372d1134965a826d4aa5534/template/catppuccin.user.css#L13-14

@42willow
Copy link
Member

in my opinion ports that support both light and dark themes should include latte as the light mode variant by default, but there should also be a global or local option to disable this (resulting in the global flavour option being used for both light and dark)

for example:
catppuccin.lightDarkEnable = true;

theme = {
  light = "Catppuccin Latte";
  dark = "Catppuccin " + catppuccinLib.mkUpper cfg.flavor;
};

catppuccin.lightDarkEnable = false;

theme = {
  dark = "Catppuccin " + catppuccinLib.mkUpper cfg.flavor;
  dark = "Catppuccin " + catppuccinLib.mkUpper cfg.flavor;
};

this could of course be shortened with an if statement but I don't know nix

@uncenter
Copy link
Member

in my opinion ports that support both light and dark themes should include latte as the light mode variant by default, but there should also be a global or local option to disable this (resulting in the global flavour option being used for both light and dark)

for example: catppuccin.lightDarkEnable = true;

theme = {
  light = "Catppuccin Latte";
  dark = "Catppuccin " + catppuccinLib.mkUpper cfg.flavor;
};

catppuccin.lightDarkEnable = false;

theme = {
  dark = "Catppuccin " + catppuccinLib.mkUpper cfg.flavor;
  dark = "Catppuccin " + catppuccinLib.mkUpper cfg.flavor;
};

this could of course be shortened with an if statement but I don't know nix

This seems like a weird solution to the problem. What if I use mocha as my dark theme and frappe as my light theme? That solution wouldn't work for me. The actual solution would be to add separate light and dark flavor options, and then a default flavor option for either light or dark wheb only one theme can be set.

@42willow
Copy link
Member

@uncenter ah ok, wasn't aware anyone really did that - and that does make more sense. light mode flavour can fallback to the dark mode one when unset

@isabelroses isabelroses linked a pull request Dec 31, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

4 participants