Skip to content

BUG: Style.set_sticky() doesn’t work with dark mode #46984

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

Open
3 tasks done
flying-sheep opened this issue May 10, 2022 · 3 comments · Fixed by #47082
Open
3 tasks done

BUG: Style.set_sticky() doesn’t work with dark mode #46984

flying-sheep opened this issue May 10, 2022 · 3 comments · Fixed by #47082
Labels
Enhancement IO HTML read_html, to_html, Styler.apply, Styler.applymap Styler conditional formatting using DataFrame.style

Comments

@flying-sheep
Copy link
Contributor

flying-sheep commented May 10, 2022

Pandas version checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of pandas.
  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

In Jupyterlab, with dark mode active:

import pandas as pd

display(pd.DataFrame(dict(a=[1])).style.set_sticky())

Issue Description

Calling this makes the row/column headers disappear (white text on white background)

Expected Behavior

Background color should adapt to theme or at least foreground color should also be set

Installed Versions

INSTALLED VERSIONS

commit : bb1f651
python : 3.8.12.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.181-99.354.amzn2.x86_64
Version : #1 SMP Wed Mar 2 18:50:46 UTC 2022
machine : x86_64
processor :
byteorder : little
LC_ALL : en_US.UTF-8
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8

pandas : 1.4.0
numpy : 1.21.5
pytz : 2021.3
dateutil : 2.8.2
pip : 22.0.3
setuptools : 59.8.0
Cython : None
pytest : 7.0.0
hypothesis : None
sphinx : 4.5.0
blosc : None
feather : None
xlsxwriter : 3.0.2
lxml.etree : 4.8.0
html5lib : None
pymysql : None
psycopg2 : 2.9.3
jinja2 : 3.0.3
IPython : 8.0.1
pandas_datareader: None
bs4 : 4.11.1
bottleneck : None
fastparquet : 0.8.1
fsspec : 2022.01.0
gcsfs : None
matplotlib : 3.5.1
numba : 0.55.1
numexpr : 2.7.3
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : None
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.8.0
sqlalchemy : 1.4.31
tables : 3.7.0
tabulate : 0.8.9
xarray : None
xlrd : 1.2.0
xlwt : None
zstandard : None

@flying-sheep flying-sheep added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels May 10, 2022
@attack68
Copy link
Contributor

suggestions how to make this compatible in a more general sense are welcome

@attack68 attack68 added Styler conditional formatting using DataFrame.style Enhancement IO HTML read_html, to_html, Styler.apply, Styler.applymap and removed Needs Triage Issue that has not been reviewed by a pandas team member Bug labels May 15, 2022
@attack68
Copy link
Contributor

The above PR generally works but causes the issue when scrolling if cells are transparent. This is visible in the new 1.5.0 dev docs..

Before this PR..
Screenshot 2022-06-22 at 10 23 03

After the PR..
Screenshot 2022-06-22 at 10 23 48

@attack68 attack68 reopened this Jun 22, 2022
@attack68 attack68 added this to the Contributions Welcome milestone Jun 22, 2022
@attack68
Copy link
Contributor

@ShawnZhong you proposed the original solution to this problem. Any ideas on the new problem here?

@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement IO HTML read_html, to_html, Styler.apply, Styler.applymap Styler conditional formatting using DataFrame.style
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants