danth / stylix

System-wide colorscheming and typography for NixOS
https://stylix.danth.me/
MIT License
906 stars 105 forks source link

doc: add mention of `lib.stylix.pixel` to tricks #327

Closed head-gardener closed 2 months ago

head-gardener commented 3 months ago

The function implements a fairly popular feature and is pretty old, but never gets mentioned in the docs. In fact, I only found it by randomly going through the sources. As a result, a person I spoke to wrote the section above describing a re-implementation of the function, which does work but doesn't need to be the default approach.

This change will improve discoverability of the codebase and direct users to a more standardized implementation.

P.S. base16-schemes changed catppuccin.yaml to a couple of variant themes, which is represented in this commit.

head-gardener commented 3 months ago

cc @danth @trueNAHO

danth commented 3 months ago

Hmm, the only difference between the existing code snippet and pixel is that the former produces a 1920×1080 image, whereas the latter produces a 1×1 image. These should appear the same when used as a wallpaper, unless the single pixel causes issues with scaling (since it has a 1:1 aspect ratio). Perhaps we should consider removing the existing example entirely?

head-gardener commented 3 months ago

Perhaps we should consider removing the existing example entirely?

I agree. Since the snippet was written by a person who didn't know the function was there it seems redundant. I'm not an expert on image manipulation stuff and can't comment on how well the function works, but I'll ask around.

danth commented 3 months ago

If you like, we can merge this as-is and look at removing the redundant example later.

head-gardener commented 3 months ago

If you like, we can merge this as-is and look at removing the redundant example later.

Yes, I think that would be better.

P.S. Was little busy today.