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

Documentation does not render correctly in dark mode #1078

Closed
kushalbakshi opened this issue Feb 13, 2023 · 4 comments · Fixed by #1080
Closed

Documentation does not render correctly in dark mode #1078

kushalbakshi opened this issue Feb 13, 2023 · 4 comments · Fixed by #1080
Labels

Comments

@kushalbakshi
Copy link
Contributor

Bug Report

Description

The DataJoint documentation at this link does not render correctly when using dark mode. The output of any DataJoint table results in light-colored font against a light background. This issue only applies to viewing the documentation in dark mode. Please see the attached images for reference.

Reproducibility

Occurs on the DataJoint documentation website when accessed through Firefox browser.

Expected Behavior

When switching to dark mode, the text within the DataJoint tables should not change to light-colored font if the background doesn't change with it.

Screenshots

image (5)

image (6)

@CBroz1
Copy link
Contributor

CBroz1 commented Feb 14, 2023

Colors of the tables are dictated by repr_html here

One solve might replace hard-coded values with substituted light-mode and dark-mode options based on a value in dj.config

@kushalbakshi
Copy link
Contributor Author

Hi @CBroz1, I tried to PR a fix for this today but I'm not able to change the background of the output of the Jupyter cells, no matter what I tried. I changed the hex values within repr_html but I'm not sure where/how to make this change in dj.config in a way that will carry over onto the site. I also looked into doing this through mkdocs. There seems to be a Jupyter wrapper for mkdocs but it's hard to find documentation on how to make changes to the config of this wrapper in extra.css. That said, I'm not very familiar with CSS.

@CBroz1
Copy link
Contributor

CBroz1 commented Feb 21, 2023

Did you try adding the following to extras.css? This worked in my local deployment for a different repo

[data-md-color-scheme="slate"] .Relation td{
    background: #0026ff; /* Example blue to make change obvious */
}

If that works for you, I think it would be a matter of adding similar lines for .Relation th and tr

@kushalbakshi
Copy link
Contributor Author

Thank you Chris! PR issued. That was very nearly it - this is what worked.

[data-md-color-scheme="slate"] .jupyter-wrapper .Table td {
    background: #0026ff; /* Example blue to make change obvious */
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants