userstyles icon indicating copy to clipboard operation
userstyles copied to clipboard

bsky: userstyle maintainability

Open RoootTheFox opened this issue 1 month ago • 0 comments

Is there an existing issue outlining your problem?

  • [x] I am using the latest version of the provided userstyle.
  • [x] I have searched the existing issues and they do not solve my problem.

What userstyles are you seeing the problem on?

lbl:bsky

Describe your problem.

as of right now, the bluesky userstyle primarily uses color selectors for theming, due to the lack of CSS variables and classes in social-app.

however, that palette gets changed every now and then, causing the style to break frequently (and often severely); see #700, #722 and #1965

bluesky's social-app uses a in-house theming and style library called Application Layout Framework, or ALF for short, which also handles its color palette generation. this library, including its palette, gets published as an NPM package which can be used in other projects.

using this library, we could write a script that automatically gets the color palettes used in social-app, and apply them to the selectors in the userstyle. i've made an initial proof-of-concept tool that lets you dump color palettes, and also allows you to diff the changes between color palette versions.

my idea would be to write a script that does what alfdump does, and writes the color palettes to a LESS library in the form of variables (which can be used in selectors!), which can then be included in the userscript like the regular catppuccin library. this would mean that instead of direct color selectors in the stylesheet we can use the internal, (to my knowledge very consistent) color names, and the userstyle itself would only need to be updated for new UI elements or possible breakages through other changes.

integrating this with CI instead of manually running something like deno run bsky:updatePalette would imo also be worth considering.

opening this as issue to get some more ideas about this c:

RoootTheFox avatar Oct 30 '25 14:10 RoootTheFox