-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Should custom.css
equivalent be supported?
#6390
Comments
Thanks @krassowski for opening this. This is also slightly related to jupyterlab/jupyterlab-desktop#274 and jupyterlab/jupyterlab#3928. |
wheee custom style! you know i love it.
Seems like I'm pretty Also any extension authors that were shipping a To that end, it's a toss-up whether If I was doing it again, I'd imagine a
Again, as it's not a feature of <7, seems like looking for more features that are indeed already met by extensions... if anything, My concern with treating It's still quite easy, fun, portable, and relatively safe to write CSS in If there was an in-app editor, it would need LSP-level support, and not require nodejs. |
@krassowski For reference, there is an old (bit-rotted) |
@psychemedia were you able to try that extension with some version of JupyterLab or on Binder? Do you think this could address this issue? If so it can then be worth putting some efforts to update it, and maybe move it to https://github.com/jupyterlab-contrib. |
@jtpio I don't recall using that one (though I may have tested it when it first appeared and then forgot about it). I also played with https://github.com/educational-technology-collective/etc_jupyterlab_cell_properties that lets you set properties on a cell by cell basis. If there was a way to easily propagate cell tags to DOM class attributes for both markdown and code cells (and code cell outputs), at various levels of the cell HTML structure), and a simple custom css editor, it would make end use innovation around notebook content rendering so much easier. As to the extension rather than a simple file: I suddenly twigged onto a workaround of creating and building a complete extension that does nothing other than copy over a CSS file. This puts it beyond the reach of lots of folk but it seems to work. |
Yes, give me the foot gun please :) I want a CSS file relative to the project I am working on, so an "advanced setting" or whatnot in which you can input a filename or pathname. A textbox in which to paste CSS is not needed nor would it help if you're using different CSS for different projects. Styles in %%html have a sort of delayed rendering effect, result in an unwanted output block you have to ignore or hide, and aren't possible in markdown files. |
Probably it would be fine to add the For those who like to have a look at implementing this for 7.0, the classic notebook defines the handler on the server and links the extra stylesheet as follows: notebook/notebook/templates/page.html Line 17 in 64e7c06
I guess the approach for Notebook 7 would be similar. |
Just wanted to mention that I'm taking a look at this now! |
Thanks @RRosio! |
I began a draft PR for this issue, #6841, but I am running into an error as the styles are not being applied. I'm working to resolve this issue, but would appreciate any feedback thus far.. |
|
Problem
Notebook v6 allows users to customize CSS styles by including
custom.css
; this was requested for JupyterLab too: jupyterlab/jupyterlab#2102 but it seems that the issue got closed without a real solution for users who don't know TypeScript and just want to add a few tweaks. Some users seem to have expectation that it will just work in JupyterLab too jupyterlab/jupyterlab#12318 and others would like to customise their CSS programatically, the way https://github.com/deathbeds/jupyterlab-fonts allows them to do so.Proposed Solution
custom.css
should still be 1-1 supported in future Notebook 7?I really don't know the solution, but just wanted to bring it up so that it is not forgotten about and maybe stimulate some discussion.
The text was updated successfully, but these errors were encountered: