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

request: Option for custom CSS #1848

Open
mdlaat opened this issue Aug 22, 2024 · 4 comments
Open

request: Option for custom CSS #1848

mdlaat opened this issue Aug 22, 2024 · 4 comments
Labels
discussion extension Features or enhancements that have Fava extensions or could be implemented as one. feature

Comments

@mdlaat
Copy link

mdlaat commented Aug 22, 2024

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
Copy link
Member

yagebu commented Sep 15, 2024

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
Copy link
Author

mdlaat commented Sep 15, 2024

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
Copy link
Member

yagebu commented Sep 15, 2024

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.

@yagebu yagebu added the extension Features or enhancements that have Fava extensions or could be implemented as one. label Sep 15, 2024
@mdlaat
Copy link
Author

mdlaat commented Sep 15, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion extension Features or enhancements that have Fava extensions or could be implemented as one. feature
Projects
None yet
Development

No branches or pull requests

2 participants