-
Notifications
You must be signed in to change notification settings - Fork 334
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
Update button and link colors for themes #2026
Conversation
📦 Docs artifacts are ready: https://github.com/elixir-lang/ex_doc/actions/runs/12844387738/artifacts/2450971787 |
Thank you @hichemfantar. One issue with this change is that we also use ExDoc to generate docs for Erlang, and now links in Erlang and Elixir would look different. Plus links in Erlang would look in red, which was too distracting. I am afraid we may not go ahead with this one. :( |
Let me see what it looks like in erlang and I’ll get back to you |
I believe you can do |
light mode already looks good but i changed to a lighter shade in dark mode and it looks good passes wcag |
Yes, I think the red links are too jarring, sorry. :( If the current ones do not offer enough contrast, then we can address that, but it would be best if the link colors are not theme dependent. Thanks! |
also there needs to sufficient contrast between link text colors and non link text colors. it's why browsers by default use blue for links |
I actually think using blue, the browser default, would be a great idea. It is not theme specific and addresses all issues. WDYT? |
sounds good, i'll give it a shot |
should be good now, using the default chrome link colors |
… for dark and light themes
i believe we have reached the ending of this story. |
perhaps get rid the of the noUnderline variables and just name them links? |
renamed the variables to be clearer and got rid of duplicates |
please tell me everything looks good on your end so we could put this saga to an end |
Web Content Accessibility criteria here we come |
--linksNoUnderline: var(--mainLightest); | ||
--linksNoUnderlineVisited: var(--mainLight); | ||
--link-color: var(--mainLightest); | ||
--link-visited-color: var(--mainLight); |
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.
Sorry, to be clear, I was thinking we should move these out of the language custom props and use the same for both languages (so they would go to the general prop definitions). I think having both languages use the same colors for links would be a huge plus for overall ecosystem consistency. Thoughts?
I think they should remain clear as links, i actually didn't even know they were clickable until i enabled link coloring. |
Done
i agree to move the discussion
i agree with @DavidOliver and think we should keep it |
It seems I have been overruled. :D Sounds good to me! 💚 💙 💜 💛 ❤️ |
Here's to better docs 🚀 |
Okay, great - thanks. I'll leave the current colour updates, etc., to you and José. Looking forward to trying out all the recent changes soon. |
feel free to chime in at anytime |
I was revewing the changes with ex_doc 0.37.0-rc.0 and found that links have changed color in Erlang, but only text links. That is the sidebar and buttons are still red, but the text is blue. Is this intended? For example: I don't mind the blue links (though red is Erlang "color", so we should use that when we can), but it feels a bit inconsistent, especially the buttons being red. Thoughts? |
I was mainly making sure that it was an active decision for both the sidepanel and buttons to remain using red. The place that stuck out a bit for me is the bottom of extra pages: The |
I see. Let's see what @hichemfantar has to say about it but, when looking at the Docusaurus, as an example, they keep it in the theme color, and not as a link. |
I suppose i agree with that we should also use the link color in the pagination buttons. @garazdawi any other places you wish to see this change? |
or we can use the link theme colors i created here #2026 (comment) they pass wcag checks |
@hichemfantar do you mean having the links in red? We had this before and we received several complaints about the color as a whole, so I would not go down this path. :) |
I can think of three options:
|
alright i'll push a fix with 2 and 3 |
Were the complaints due to the the hue (red) outright, or to them lacking contrast against the background? I wonder if we could lighten/darken the red link colour as necessary? I haven't looked yet (just about to), but I imagine a mixture of red and blue links may look a little strange? |
It was with the red outright. |
i did some more testing and red is def bad for test so let's avoid it |
None that I have found yet. |
💔 |
should we also get rid of |
Re. link-visited-color, I think accessibility buffs will say it's important, for some users more than others. I'm in two minds about it. |
btw the erlang main color has bad contrast in dark mode while elixir main color had bad contrast in light mode it's best to use tokens like these https://ui.shadcn.com/themes that operate much better in light dark situations although this would be a large change
|
use this tool for contrast checks |
@hichemfantar I think we are using the wrong color there. We already have a color we use in the sidebar for dark mode with better accessibility, but it was not reflected in the cheatsheets. Are you going to send a PR or should I look into it? |
Actually, we should just get rid of the colors. I will push a fix to main. |
@hichemfantar, apologies if I'm missing something, but is there something that that structure provides for that our |
Adjust button title color and link colors to improve visibility in both dark and light themes.