-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix: disable special colors when in vscode dark mode #152
Conversation
@@ -0,0 +1,13 @@ | |||
:root { | |||
--sca-font-color0: var(--jp-content-font-color0); |
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.
Can you change the prefix to cean
? I used that for the HTML classes.
9da6749
to
88908e2
Compare
88908e2
to
c8f21f2
Compare
@lru_cache(maxsize=1) | ||
def dataset_style() -> str: | ||
sheet = _preprocess_style(_read_text("dataset.css", "styles")) | ||
return f"<style>{sheet}</style>" | ||
return f"{common_style()}<style>{sheet}</style>" |
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.
Can you just merge them into a single <style>
tag?
--cean-font-color3: var(--jp-content-font-color3); | ||
} | ||
|
||
body.vscode-dark { |
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.
What about light mode?
Can you add a release note? |
c8f21f2
to
fc1763c
Compare
This change doesn't do anything about the light background in the sphinx output. Haven't implemented any special case for pycharm either. |
fc1763c
to
7842201
Compare
I've checked the different platforms (Jupyter, Vscode, Pycharm, Sphinx docs) and they are readable in dark and light mode. Pycharm and sphinx don't use custom font colors (e.g. for missing values etc). I think this can be merged now. |
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.
Almost there 👍
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.
Can you place comments that explain the different selectors? In particular the distinction between data-theme
and data-jp-theme-light
.
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.
Good question 🤔
data-theme
is commonly used to toggle between dark and light mode, in particular it is used to toggle dark/light mode in the Sphinx docs.
However, since the pydata sphinx theme disables dark mode for notebook output it is not used. So perhaps better to remove it?
data-jp-theme-light
is used by Jupyter to toggle between dark and light mode.
0e42c26
to
b0b8145
Compare
b0b8145
to
773b4e4
Compare
Part of #87
Currently all this does is
--jp-content-font-color
variable with a custom--sca-font-color
variableTo fix this we should figure out: