beancount / fava

Fava - web interface for Beancount
https://beancount.github.io/fava/
MIT License
1.93k stars 282 forks source link

request: Option for custom CSS #1848

Open mdlaat opened 4 weeks ago

mdlaat commented 4 weeks ago

I don´t believe there currently is an option for adding custom css to fava.

Would it be possible to make available an option like: 1998-01-01 custom "fava-option" "customcss" "/path/to/custom.css"

which would inject <link rel="stylesheet" href="/path/to/custom.css" /> into the html that fava produces?

yagebu commented 4 days ago

I'm not too keen to add an option for this. The exact CSS of Fava is an implementation detail and may change at any point, I don't want to encourage tweaking that heavily.

What's the exact use case here? Aren't there browser extensions that allow one to do this?

mdlaat commented 4 days ago

Thank you for your reply. For now, I would like to hide the buttons 'at costs', 'monthly' and the arrow to hide/show the graphs, which would (I guess) easily been done with custom css. I thought a custom css might also be useful to others. I rather not have tweaks at the client side, because it could lead to different interfaces at different clients.

yagebu commented 4 days ago

As written above, I don't want to make this sort of tweaking too easy (as it would be either quite fragile or would totally impede CSS changes). It shouldn't be too hard to do this with a Fava extension. You could provide a Javascript file that adds the custom CSS in the init function.

mdlaat commented 4 days ago

That's ok. Thank you for you pointing to fava extensions, which is all new to me. Will have to dive into that, but am struggling to find a really simple (like hello world) example.