ansys / ansys-sphinx-theme

PyData-based Sphinx theme from the PyAnsys community
https://sphinxdocs.ansys.com
MIT License
22 stars 5 forks source link

#281 - Fix dataframe rendering in dark mode #282

Closed Andy-Grigg closed 11 months ago

Andy-Grigg commented 11 months ago

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:

image

After (Edge):

image

After (Firefox):

image

Andy-Grigg commented 11 months ago

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.

Andy-Grigg commented 11 months ago

Build failure doesn't seem to be caused by these changes. It looks like it's failing because a url cannot be resolved.

RobPasMue commented 11 months ago

@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

RobPasMue commented 11 months ago

Issue has been solved @Andy-Grigg - @Revathyvenugopal162 please review since you are more experienced with the style

Revathyvenugopal162 commented 11 months ago

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