-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add background-color on clickable definitions in source code #88111
Add background-color on clickable definitions in source code #88111
Conversation
Some changes occurred in HTML/CSS/JS. |
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.
LGTM with this fix.
14d151a
to
7ce7fe7
Compare
Not sure of the exact choice of colors but overall I think this is a good idea. @jsha ? |
I like the idea, I think the middle theme looks okay, top and bottom themes should probably make the colors stand out a bit more, it's hard to tell which parts are the links at a glance. |
I actually found the middle standing out too much. 😆 |
That's fair I guess, I just worry that if they don't stand out enough they won't really help indicate which ones are links. My primary skills aren't in visual design though, I'll leave that decision to those who know more :P |
I've already discussed this with Guillaume on Zulip…be happy that there's something happening, because what I proposed was along the lines of the middle and he didn't care for it 😛 |
@Manishearth @jsha won't be back until October, since this is an improvement, even though maybe not perfect, I think it's fine to merge now. I'll add this to my "list of things to discuss when Jacob is back" haha. Thanks everyone for the comments! @bors: r=jhpratt |
📌 Commit 7ce7fe7 has been approved by |
I like the idea overall, though I also feel that the Ayu stands out too much. Would that one look different with #88111 (comment) applied? We could also consider styling it like Haskell's equivalent to Rustdoc, Haddock. They use a faint underline, and then add background color when the link is hovered: I like how it's very subtle in Haddock, so it doesn't affect the reading experience, but it's strong enough to think, "Hey, I bet I can click that link!" IIUC, nearly all of the identifiers should be clickable in the generated source view, so we just want to give a hint that the links are clickable without distracting from the reading view. |
No, I badly copied into the code, I modified using the web tools in the browser. As for your suggestion, I also like it. Hummm... Damn, don't know what to do... |
@GuillaumeGomez seems fair to me! |
Yeah, I'm not saying it couldn't be better, but imo something is better than nothing as a stopgap. Having it be non-intrusive is the issue. |
@camelid Do you mind opening an issue with your suggestion please? |
@GuillaumeGomez done: #88120. |
…laumeGomez Rollup of 10 pull requests Successful merges: - rust-lang#87818 (Fix anchors display in rustdoc) - rust-lang#87983 (Use more accurate spans when proposing adding lifetime to item) - rust-lang#88012 (Change WASI's `RawFd` from `u32` to `c_int` (`i32`).) - rust-lang#88031 (Make `BuildHasher` object safe) - rust-lang#88036 (Fix dead code warning when inline const is used in pattern) - rust-lang#88082 (Take into account jobs number for rustdoc GUI tests) - rust-lang#88109 (Fix environment variable getter docs) - rust-lang#88111 (Add background-color on clickable definitions in source code) - rust-lang#88129 (Fix dataflow graphviz bug, make dataflow graphviz modules public) - rust-lang#88136 (Move private_unused.rs test to impl-trait) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…und, r=camelid Fix jump def background Fixes rust-lang#88870. I somehow badly wrote the color in rust-lang#88111. r? `@camelid`
…und, r=camelid Fix jump def background Fixes rust-lang#88870. I somehow badly wrote the color in rust-lang#88111. r? ``@camelid``
…und, r=camelid Fix jump def background Fixes rust-lang#88870. I somehow badly wrote the color in rust-lang#88111. r? `@camelid`
…und, r=camelid Fix jump def background Fixes rust-lang#88870. I somehow badly wrote the color in rust-lang#88111. r? ``@camelid``
Someone suggested to add a decoration on clickable elements in the source code pages:
The idea is to not disturb the reading while telling the reader "you can click on this one", which is why it's not a text decoration.
What do you think @rust-lang/rustdoc ?
r? @Nemo157