Why Nostr? What is Njump?
2025-03-25 22:53:11
in reply to

Pygoscelis Papua on Nostr: L.A.M.F. I'm not convinced adding a CSS pre-processor will really help. A bunch of ...

I'm not convinced adding a CSS pre-processor will really help. A bunch of the stylesheets are already modularized and PHP processes variables and concatenates those files on the server side already. That might be why none of the stylesheets I've looked at in Friendica are minified, like maybe it messes up parsing them or something? I'll have to test it on my dev server.

I'm not a fan of CSS pre-processors though. After nearly 30 years of doing web design+dev I don't like to introduce dependencies if I don't need to because I've seen a lot of these things come and go. Next week someone will tell me to rewrite it in PostCSS. 🤷 The only reason I can think to use them now is to support advanced CSS features for old browsers nobody should probably be using anymore. Because modularization, nesting rules, pseudo-selectors, variables, computation, reassigning values at runtime, and color transforms are now all built into vanilla CSS for modern browsers. Bookface is already making use of most of those features, and the PHP pre-processing is taking care of the rest.

So minifying and/or compressing is probably the best bet for optimizing it, but the real solution is probably a major rewrite or replacement of the underlying "Frio" theme itself, which is very, very code-heavy (thanks to legacy code reflecting its age). But that...will be a major undertaking because that theme as a lot of "moving parts."
Author Public Key
npub1addhlykpfsjyyk0z8urepy5zww9meyfpmv7dpyn8twq0pam5fcsqq750k9