Skip to content

#281 - Fix dataframe rendering in dark mode #282

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

Merged
merged 6 commits into from
Aug 28, 2023
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ tr:nth-child(even) {
background-color: var(--pst-color-table-hover);
}

td {
Copy link
Contributor Author

@Andy-Grigg Andy-Grigg Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did just have a thought. I should maybe make this more specific, something like:

div.rendered_html table.dataframe td

To try and make it only match a data cell in a dataframe, which appears in a 'rendered_html' div. Otherwise there's a risk it could change the color of other table cells.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed this improvement.

color: var(--pst-color-text-base);
}

/*
###############
Table-centered
Expand Down Expand Up @@ -1018,6 +1022,12 @@ div.admonition {
background-color: var(--pst-color-on-surface);
}

/* Select only divisions that contain a dataframe, with enough specificity to override pydata css */
div.nboutput
div.output_area.rendered_html.docutils.container:has(table.dataframe) {
background-color: transparent;
}

/*
############
Border lines
Expand Down