-
Notifications
You must be signed in to change notification settings - Fork 72
Light mode button fix #553
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
base: main
Are you sure you want to change the base?
Conversation
…with hoverlabel_bgcolor keyword argument
Removed extra white space. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Used CSS variable instead of hardcoded "white" value. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the primary theme color for better readability in light mode and adjusts the hover label styling in the translation graph.
- Lightens the
--pyos-color-primary
CSS variable for improved button contrast. - Sets hover label background to the page’s body background and fixes hover label font color.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
_static/pyos.css | Updated --pyos-color-primary to a lighter shade |
_ext/translation_graph.py | Added hoverlabel_bgcolor and hoverlabel_font_color settings |
@@ -146,6 +146,8 @@ def run(self): | |||
fig.update_layout( | |||
paper_bgcolor="rgba(0,0,0,0)", | |||
plot_bgcolor="rgba(0,0,0,0)", | |||
hoverlabel_bgcolor="var(--bs-body-bg)", | |||
hoverlabel_font_color="rgba(255, 255, 255, 1)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoding the hover label font color to white can lead to poor contrast on a light background. Consider using the body text color variable (var(--bs-body-color)
) or another dynamic value to ensure readability across themes.
hoverlabel_font_color="rgba(255, 255, 255, 1)", | |
hoverlabel_font_color="var(--bs-body-color)", |
Copilot uses AI. Check for mistakes.
I updated the CSS file so that the button is more readable. Here's the issue number for reference. #533