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

docs: Change colors of links #1295

Merged
merged 5 commits into from
Feb 10, 2025
Merged

docs: Change colors of links #1295

merged 5 commits into from
Feb 10, 2025

Conversation

MarieSacksick
Copy link
Contributor

Closes #1008

@MarieSacksick MarieSacksick marked this pull request as draft February 7, 2025 15:24
Copy link
Contributor

github-actions bot commented Feb 7, 2025

Documentation preview @ d1edd3f

Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking a bit more about the problem, I think that we should instead overload the color define in the theme: https://github.com/pydata/pydata-sphinx-theme/blob/3d03aee9088e03ccacff320a836889cb8396d801/src/pydata_sphinx_theme/assets/styles/variables/_color.scss#L285-L286

As far I see, we should have to redefine:

--pst-color-link
--pst-color-link-hover
--pst-color-inline-code-links

So it means that any CSS rule using those colors will then be consistent.

sphinx/_static/css/custom.css Outdated Show resolved Hide resolved
sphinx/_static/css/custom.css Outdated Show resolved Hide resolved
sphinx/_static/css/custom.css Outdated Show resolved Hide resolved
@sylvaincom
Copy link
Contributor

sylvaincom commented Feb 10, 2025

I think there are too many different colors, especially Project is underlined in orange

Capture d’écran 2025-02-10 à 13 03 43

@glemaitre
Copy link
Member

That's why you better redefined the color rather than modify the HTML objects.

@MarieSacksick
Copy link
Contributor Author

MarieSacksick commented Feb 10, 2025

Yes, it's a draft, it's not working the way I want for now. I think I'll spend another hour trying, and then stop, because I don't think it's worth it.

@glemaitre, when you say "That's why you better redefined the color rather than modify the HTML objects.", do you mean that these colors are instantiated somewhere and I can modify them? That would make things much easier!

Edit: ok, I found it. And after I read that you had the solution Guillaume 😅

@MarieSacksick MarieSacksick marked this pull request as ready for review February 10, 2025 14:21
Copy link
Contributor

@auguste-probabl auguste-probabl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Indeed CSS is the right way to do this IMO.

@auguste-probabl auguste-probabl merged commit c5d87b3 into main Feb 10, 2025
7 checks passed
@auguste-probabl auguste-probabl deleted the link_color branch February 10, 2025 15:34
@glemaitre
Copy link
Member

Indeed, it is what I have in mind. You need to check the rendering but it was the idea.

@MarieSacksick
Copy link
Contributor Author

yes, the colors for light mode are not exactly those of the logo because the contrast was not nearly high enough, but it's the same idea, orange and blue, only darker.

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

Successfully merging this pull request may close these issues.

docs: Modify the doc following the v0.5 release, part 2
4 participants