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
CSS variables and class names from base to re-use #411
Comments
Hello! Thanks for trying notebooks! Can you share the notebook with the output? I only need one cell with output, just to figure out what format and MIME type it has because by now it's not clear to me what ANSI-colored text is. Is it just HTML or not? And if it is, what CSS are you using now to render it? |
Attached notebook. Thank you for the quick response! |
Also, here are CSSs with more variables (intellij for light, darcula for dark) |
I saw the variables you mention in Is there a chance to expose variables with colors that Kotlin Notebook itself uses to render output of
Or is my best option to use Kotlin integration to attach custom CSS and define colors myself? |
I spoke to soon, I see more colors than kernel.css. Let me try a few things. Thanks a lot! |
Using |
If you have a set of CSS variables that should be defined in light and dark themes, just send me them, and I'll do it. This part of the code is unfortunately closed, so I can't suggest you file a PR |
Oh wow, that would be awesome! Something like Python Jupyter notebook In most ideal case, those variable values should match the one Kotlin Notebook is using to print colored I don't have a preference on how the variable names. Slightly related question. If I submit PR with my library json integration file, can I point to a SNAPSHOT dependency (Maven Central) or do I need a full release one? |
Ok, will plan it for the next plugin release then: https://youtrack.jetbrains.com/issue/KTNB-227/Add-CSS-variables-to-use-for-ANSI-colored-text
Yes, it's ok. Just make sure it's actually resolved in the notebook |
Hello,
I am adding integration to my library to pretty print types in Kotlin Notebook. I was hoping to leverage existing colors through variable names or classes so I don't have to deal with theme switching.
Specifically I am interested in ansi colors. I noticed that Kotlin Notebook already prints ansi colors when my library outputs colorful text. And that is awesome! I couldn't figure out how to debug what colors your kernel uses for that. So I went to Jupyter Labs desktop app to see what colors python kernel prints. Python kernel uses
ansi-<color>-fg
class names to change colors of the output.I tried to apply the same class names but wasn't able to change colors. There is a high chance I am missing something as I have little experience with extending Notebooks.
Are there ways to use the same colors Kotlin Notebook is using to display ansi colored outputs?
The text was updated successfully, but these errors were encountered: