Skip to content
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

colored HTML text black in light theme #15683

Closed
jgunstone opened this issue Jan 23, 2024 · 3 comments
Closed

colored HTML text black in light theme #15683

jgunstone opened this issue Jan 23, 2024 · 3 comments
Labels
bug status:Needs Info status:Needs Triage Applied to new issues that need triage

Comments

@jgunstone
Copy link

jgunstone commented Jan 23, 2024

... but correctly colored in dark theme

Description

colored HTML text black in light theme but correctly colored in dark theme

light
image

dark
image

Reproduce

run

from IPython.display import HTML
import ipywidgets as w
html = '<b>LT-1E</b> - <i><FONT COLOR="#00054A">[abbreviation]<FONT COLOR="</FONT>">-<FONT COLOR="#143277">[type_reference]<FONT COLOR="</FONT>"><FONT COLOR="#2F5A96">[function_reference]<FONT COLOR="</FONT>"></i>'
display(HTML(html))
display(w.HTML(html))

Expected behavior

html text correctly colored in both themes

Context

  • Linux Ubuntu 22.04
  • Browser and version: Version 120.0.6099.225 (Official Build) (64-bit)
  • JupyterLab version: 4.0.11
@jgunstone jgunstone added the bug label Jan 23, 2024
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Jan 23, 2024
@jgunstone jgunstone changed the title colored HTML text black in light theme but correctly colored in dark theme colored HTML text black in light theme Jan 23, 2024
@krassowski
Copy link
Member

It looks correctly coloured in both light and dark theme to me. <FONT COLOR="</FONT>"> is invalid syntax, so this may not be the best example, but it would not matter. Maybe you need to change colours for more contrastive?

@JasonWeill
Copy link
Contributor

Do you still see this behavior when using modern HTML5 syntax, such as <span style="color: #abc123">foo</span>?

@jgunstone
Copy link
Author

hi both,

the HTML5 syntax does work, and testing on a different screen the colors are clearer in light mode.
thanks for your help
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status:Needs Info status:Needs Triage Applied to new issues that need triage
Projects
None yet
Development

No branches or pull requests

3 participants