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

Icon classes (like jp-icon0) do not work in launcher tabs for kernels #16299

Closed
krassowski opened this issue May 7, 2024 · 2 comments · Fixed by #16301
Closed

Icon classes (like jp-icon0) do not work in launcher tabs for kernels #16299

krassowski opened this issue May 7, 2024 · 2 comments · Fixed by #16301
Labels

Comments

@krassowski
Copy link
Member

Description

@krassowski Your SVG does not work for me.

The jp-LauncherCard-icon is embedded as img and seems to prevent jp-icon0 from working.

Originally posted by @benz0li in betatim/vscode-binder#61 (comment)

Reproduce

<div className="jp-LauncherCard-icon">
{kernel ? (
item.kernelIconUrl ? (
<img
src={item.kernelIconUrl}
className="jp-Launcher-kernelIcon"
alt={title}
/>

Expected behavior

We should allow for theme-responsive icons in launcher

We could:

Context

  • JupyterLab version: 4.2.0
@krassowski krassowski added bug status:Needs Triage Applied to new issues that need triage labels May 7, 2024
@krassowski
Copy link
Member Author

Another solution would be having two different sets of icon URLs, one for dark theme and one for light theme.

@krassowski
Copy link
Member Author

After researching a few solutions, it looks like the best short-term solution is indeed setting the preferred-color like this:

<div style="color-scheme: dark">
  <img />
</div>

based on the current JupyterLab theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants