-
Notifications
You must be signed in to change notification settings - Fork 8
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
#281 - Fix dataframe rendering in dark mode #282
Conversation
If this is merged, could a patch release be issued relatively quickly? We'd like to be able to release a new version of PyGranta BoM Analytics with this improvement without having to include this fix as custom CSS. |
Build failure doesn't seem to be caused by these changes. It looks like it's failing because a url cannot be resolved. |
@Revathyvenugopal162 - please look into the broken link issue and perform a patch release whenever you can https://stunning-adventure-k6g9rqj.pages.github.io/active_indices.html |
Issue has been solved @Andy-Grigg - @Revathyvenugopal162 please review since you are more experienced with the style |
@@ -290,6 +290,10 @@ tr:nth-child(even) { | |||
background-color: var(--pst-color-table-hover); | |||
} | |||
|
|||
td { |
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.
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.
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.
Pushed this improvement.
…sys/pyansys-sphinx-theme into fix/281-dataframe-dark-mode
Thanks for solving the issue @Andy-Grigg , checked in edge and is working fine for me. feel free to merge it and i will do the patch release after that |
Fix #281
Explicitly specifies the font color in tabular cells, so that it changes correctly between light and dark themes. Also overrides the output div background color for cells that contain dataframes to transparent. Use of the
:has()
selector is currently not supported in Firefox - https://caniuse.com/css-has. I think we should still use it though, given that support will probably be added soon, and the use of:has()
stops the changed css impacting other rendered html in a cell which may not be dark mode-aware.Before:
After (Edge):
After (Firefox):