-
Notifications
You must be signed in to change notification settings - Fork 391
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
Add extra_css for custom css injection #1950
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me. Before merge, can we
- use if-clause in the HTML template
- document it for the Helm chart
@rgaiacs Thanks! Where should I document this for the helm chart? |
I believe that the traitlets are "magic" connected to the helm chart. But it is nice to add to binderhub/helm-chart/binderhub/values.yaml Lines 42 to 51 in c07d252
config:
# These c.BinderHub properties are referenced by the Helm chart
BinderHub:
...
# extra_css: |
# .p-3.bg-light.shadow-sm.text-center {
# color: red;
# } Also mention it in the documentation I would like to merge #1923 before this one. |
@rgaiacs I did think about documenting |
Hi @paololazzari, thanks again for the PR. I noticed that this PR will only work in some scenarios. To enable custom CSS as CSS was originally design for, we also need #1952. The scenario that the solution that you proposed will not work is when you try to change some style from https://github.com/jupyterhub/binderhub/blob/main/binderhub/static/js/index.scss. For example, I was trying to change the font used in the page but using your solution resulted in |
My proposal was to add CSS, not replace the existing one |
Fixes #1949.
I tested this locally by adding the following to
testing/local-binder-mocked-hub/binderhub_config.py
:the style was loaded and the headline color changed.