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

adapt doc style. prefer no color change on mouseover on table #3658

Open
mattijn opened this issue Oct 25, 2024 · 5 comments
Open

adapt doc style. prefer no color change on mouseover on table #3658

mattijn opened this issue Oct 25, 2024 · 5 comments

Comments

@mattijn
Copy link
Contributor

mattijn commented Oct 25, 2024

What is your suggestion?

See animated gif:

Image

I prefer there is no color change of table background when a reader hovers with his mouse over the table.

Have you considered any alternative solutions?

No response

@joelostblom
Copy link
Contributor

I would be in favor of that too if it is an easy fix

@dangotbanned
Copy link
Member

@mattijn I found the theme variable that controls this.

This diff just shows what the current color is

diff --git a/doc/_static/custom.css b/doc/_static/custom.css
index 5dac492e..687ba8c6 100644
--- a/doc/_static/custom.css
+++ b/doc/_static/custom.css
@@ -2,12 +2,14 @@ html[data-theme="light"] {
   --pst-color-primary: rgb(93, 154, 181);
   --pst-color-secondary: rgb(93, 154, 181);
   --pst-color-secondary-bg: rgb(223, 235, 240);
+  --pst-color-table-row-hover-bg: #b780ff;
 }
 
 html[data-theme="dark"] {
   --pst-color-primary: rgb(93, 155, 182);
   --pst-color-secondary: rgb(93, 155, 182);
   --pst-color-secondary-bg: rgb(33, 45, 51);
+  --pst-color-table-row-hover-bg: #b780ff;
 }

https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/styling.html

@dangotbanned
Copy link
Member

@mattijn I wanted to follow up on this issue as it seems quite a simple one to solve (just picking a color to use for #3658 (comment))

My suggestion would be - instead of removing the color change entirely - to use a lighter/more subtle shade of the current color.

I find the current one quite jarring, but I think that's due to a sudden contrast change of large element.
Having some level of highlighting seems helpful to me, since there is a lot of variation in row length.

If we went with no color, I think there'd need to be some other indicator of what row is in focus

@mattijn
Copy link
Contributor Author

mattijn commented Jan 26, 2025

Awesome! A lighter shade seems a perfect choice

@dangotbanned
Copy link
Member

Awesome! A lighter shade seems a perfect choice

Great @mattijn!

Just playing around with the opacity (#b780ff??) of --pst-color-table-row-hover-bg on transform/window.

Seems we can go pretty low before it stops being useful

2025-01-26.19-32-44.mp4

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

No branches or pull requests

3 participants