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

Lack of color contrast in the license selected in Help > Licenses #16542

Closed
joaopalmeiro opened this issue Jul 2, 2024 · 2 comments · Fixed by #16547
Closed

Lack of color contrast in the license selected in Help > Licenses #16542

joaopalmeiro opened this issue Jul 2, 2024 · 2 comments · Fixed by #16547
Labels

Comments

@joaopalmeiro
Copy link
Contributor

joaopalmeiro commented Jul 2, 2024

Hi! 👋

Description

In the table on the Licenses page in Help > Licenses, the font color of the selected package lacks color contrast with the background:

License table Hovered license table

Reproduce

  1. Go to Help > Licenses in the top menu.
  2. Select a package from the license table.

Expected behavior

The font color contrasts with the background, and the background color is blue, similar to what happens in the file browser:

image

Additionally, the background color should not change when hovering over the selected row, similar to what happens in the file browser.

Possible solutions

To achieve this behavior, I think the table styles (e.g., .jp-RenderedHTMLCommon tbody tr:nth-child(odd)) should be applied taking into account whether the .jp-mod-selected class is present or not (in the <tr> element), similar to what happens in the file browser:

.jp-DirListing-item:hover:not(.jp-mod-selected) {

An alternative is to update the license table styles to make them more specific:

.jp-Licenses-Grid tr.jp-mod-selected {

Current workaround for a custom theme

.jp-RenderedHTMLCommon tbody tr.jp-mod-selected:hover,
.jp-RenderedHTMLCommon tbody tr.jp-mod-selected:nth-child(even),
.jp-RenderedHTMLCommon tbody tr.jp-mod-selected:nth-child(odd) {
  background: var(--jp-brand-color1);
}

Context

  • Operating System and version: macOS Sonoma 14.5
  • Browser and version: Chrome 126.0.6478.127
  • JupyterLab version: 4.2.3
  • Python version: 3.10.13

Let me know what you think and if I can open a PR. Thanks!

@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Jul 2, 2024
@JasonWeill JasonWeill removed the status:Needs Triage Applied to new issues that need triage label Jul 2, 2024
@JasonWeill
Copy link
Contributor

@joaopalmeiro Thank you for your contribution! Please open a PR if you have a fix for this issue.

@joaopalmeiro
Copy link
Contributor Author

Thanks! I will work on it.

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