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

allow disabling colors #929

Open
KiaraGrouwstra opened this issue Feb 28, 2025 · 1 comment
Open

allow disabling colors #929

KiaraGrouwstra opened this issue Feb 28, 2025 · 1 comment
Labels
feature A new feature or a feature request

Comments

@KiaraGrouwstra
Copy link

i use stylix in conjunction with pywal clone wallust (c.f. #99), using the latter to dynamically swap colors out, while using stylix for typography.
currently tho, stylix doesn't really allow use for just one of those two.
it would be nice if such a use-case were supported tho.
would you be open to a PR adding such a toggle stylix.colors.enable?

@trueNAHO
Copy link
Collaborator

i use stylix in conjunction with pywal clone wallust (c.f. #99), using the latter to dynamically swap colors out, while using stylix for typography. currently tho, stylix doesn't really allow use for just one of those two. it would be nice if such a use-case were supported tho. would you be open to a PR adding such a toggle stylix.colors.enable?

IIRC, this use case was already very briefly mentioned once somewhere, but I do not know where. Either way, adding guards for explicit and major Stylix functionalities would surely be great. For example, we could add the following guards:

  • stylix.colors.enable

    • Disables all color scheme declarations. Since some of our Mustache templates couple colors with related functionalities, like border radius or border width, we could guard all of it or first decouple them. Considering that decoupling functionalities probably takes a while, it might be better for this guard to disable all of it together for now.
  • stylix.fonts.enable

    • Disables all font declarations.
  • stylix.image.enable

    • Allows extracting the color scheme from the image without setting it anywhere. Although, this naming convention is convenient and consistent with the Nix .enable convention, this introduces a breaking change since stylix.image is an option and not an attribute set. We should reconsider how to handle this.

@trueNAHO trueNAHO added the feature A new feature or a feature request label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature or a feature request
Projects
None yet
Development

No branches or pull requests

2 participants