jazl
April 25, 2024, 3:07pm
1
When using MaterialTemplate dark theme, the options for a Select widget are shown with a white background. This makes the options invisible until the user hovers over them.
Here is the code:
import panel as pn
pn.extension()
template = pn.template.MaterialTemplate(title="Select Test", theme='dark')
states = pn.widgets.Select(name='States', options=['Arizona', 'California', 'Connecticut', 'Kansas', 'Texas'], value='California')
template.main.append(states)
template.show()
Is there a solution for this?
I can’t reproduce; what version of Panel do you have?
jazl
April 25, 2024, 3:49pm
3
Thanks for looking into it! I am using Panel 1.3.8.
Sorry, but I neglected to mention the first time that I do not see this issue on MacOS Chrome.
I can reproduce in Windows using Chrome, Edge, and Firefox (Firefox renders a light grey background)
Thanks! I think this can be filed as a GitHub issue.
If you’d like to help, you can inspect the element on the Chrome browser and see what CSS class needs to be updated.
jazl
April 25, 2024, 5:01pm
5
Looks like the var --design-secondary-color affects this?
Thanks for investigating! Can you report this on Panel’s GitHub?
jazl:
import panel as pn
pn.extension()
template = pn.template.MaterialTemplate(title="Select Test", theme='dark')
states = pn.widgets.Select(name='States', options=['Arizona', 'California', 'Connecticut', 'Kansas', 'Texas'], value='California')
template.main.append(states)
template.show()
Latest Panel 1.4.1
Tested on MacOS Chrome, Brave and Safari.
jazl
April 26, 2024, 3:14pm
8
I’ve submitted an issue:
opened 03:12PM - 26 Apr 24 UTC
#### ALL software version info
Windows 10 Pro
Chrome 124.0.6367.78
Python 3.… 10.2
panel==1.4.2
panel-modal==0.4.0
(requirements.txt below)
#### Description of expected behavior and the observed behavior
Observed: Select widgets render options with white text and white background, making text unreadable.
Expected: Select options should render with dark background
#### Complete, minimal, self-contained example code that reproduces the issue
```
import panel as pn
pn.extension()
template = pn.template.MaterialTemplate(title="Select Test", theme='dark')
states = pn.widgets.Select(name='States', options=['Arizona', 'California', 'Connecticut', 'Kansas', 'Texas'], value='California')
template.main.append(states)
template.show()
```
#### Screenshots or screencasts of the bug in action
![panel-theme](https://github.com/holoviz/panel/assets/2700780/ec0c39eb-7520-465e-92e2-74e49ad5d308)
#### requirements.txt
anyio==3.7.1
appnope==0.1.3
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
arrow==1.2.3
asttokens==2.2.1
async-lru==2.0.4
attrs==23.1.0
Babel==2.12.1
backcall==0.2.0
beautifulsoup4==4.12.2
bleach==6.0.0
bokeh==3.4.0
boto3==1.34.81
botocore==1.34.81
cachetools==5.3.1
certifi==2023.5.7
cffi==1.15.1
chardet==5.2.0
charset-normalizer==3.1.0
click==8.1.6
colorama==0.4.6
colorcet==3.0.1
comm==0.1.3
contourpy==1.2.0
debugpy==1.6.7
decorator==5.1.1
defusedxml==0.7.1
embeddify==0.3.1
et-xmlfile==1.1.0
exceptiongroup==1.1.2
executing==1.2.0
fastjsonschema==2.17.1
filelock==3.12.2
fqdn==1.5.1
greenlet==3.0.3
h11==0.14.0
holoviews==1.18.1
humanize==4.7.0
hvplot==0.9.2
idna==3.4
ijson==3.2.3
iniconfig==2.0.0
ipycytoscape==1.3.3
ipyiframe==0.1.0
ipykernel==6.23.2
ipysheet==0.7.0
ipython==8.14.0
ipython-genutils==0.2.0
ipyvue==1.9.2
ipyvuetify==1.8.10
ipywidgets==8.0.6
ipywidgets-bokeh==1.5.0
isoduration==20.11.0
jedi==0.18.2
Jinja2==3.1.2
jmespath==1.0.1
json5==0.9.14
jsonlines==4.0.0
jsonpointer==2.4
jsonschema==4.18.6
jsonschema-specifications==2023.7.1
jupyter==1.0.0
jupyter-console==6.6.3
jupyter-events==0.7.0
jupyter-lsp==2.2.0
jupyter_client==8.2.0
jupyter_core==5.3.1
jupyter_server==2.7.0
jupyter_server_terminals==0.4.4
jupyterlab==4.0.4
jupyterlab-pygments==0.2.2
jupyterlab-widgets==3.0.7
jupyterlab_server==2.24.0
-e git+ssh://git@github.com/jazl/lexo-jupyter.git@1793a20f6dff11863de62970fe66e4b08d0b4d07#egg=lexo
linear-tsv==1.1.0
linkify-it-py==2.0.2
Markdown==3.4.4
markdown-it-py==3.0.0
MarkupSafe==2.1.3
matplotlib-inline==0.1.6
mdit-py-plugins==0.4.0
mdurl==0.1.2
mistune==2.0.5
nbclient==0.8.0
nbconvert==7.5.0
nbformat==5.9.0
nest-asyncio==1.5.6
notebook==7.0.2
notebook_shim==0.2.3
numpy==1.25.0
openpyxl==3.1.2
overrides==7.3.1
packaging==23.1
pandas==2.0.2
pandocfilters==1.5.0
panel==1.4.2
panel-modal==0.4.0
param==2.0.0
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.5.0
platformdirs==3.5.3
pluggy==1.2.0
prometheus-client==0.17.1
prompt-toolkit==3.0.38
psutil==5.9.5
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
pyct==0.5.0
Pygments==2.15.1
pymdown-extensions==10.1
pyrsistent==0.19.3
pytest==7.4.0
python-dateutil==2.8.2
python-dotenv==1.0.1
python-json-logger==2.0.7
pytz==2023.3
pyviz_comms==3.0.0
pywin32==306
pywinpty==2.0.11
PyYAML==6.0.1
pyzmq==25.1.0
qtconsole==5.4.3
QtPy==2.3.1
reacton==1.7.1
referencing==0.30.1
requests==2.31.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rich==13.5.2
rich-click==1.6.1
rpds-py==0.9.2
s3transfer==0.10.1
Send2Trash==1.8.2
six==1.16.0
sniffio==1.3.0
solara==1.19.0
soupsieve==2.4.1
spectate==1.0.1
SQLAlchemy==2.0.29
stack-data==0.6.2
starlette==0.31.0
tabulator==1.53.5
terminado==0.17.1
tinycss2==1.2.1
tomli==2.0.1
tornado==6.3.2
tqdm==4.66.1
traitlets==5.9.0
typing_extensions==4.7.1
tzdata==2023.3
uc-micro-py==1.0.2
unicodecsv==0.14.1
uri-template==1.3.0
urllib3==2.0.3
uvicorn==0.23.2
watchdog==3.0.0
wcwidth==0.2.6
webcolors==1.13
webencodings==0.5.1
websocket-client==1.6.1
websockets==11.0.3
widgetsnbextension==4.0.7
xlrd==2.0.1
xyzservices==2023.10.1
BTW, I upgraded to 1.4.2 but issue still remains.
Thanks!