-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Use adaptive SVG favicon for rustdoc like other rust sites #75438
Use adaptive SVG favicon for rustdoc like other rust sites #75438
Conversation
Some changes occurred in HTML/CSS/JS. |
(rust_highfive has picked a reviewer for you, use r? to override) |
I am in a dark theme and yet the favicon are all visible. I'm not sure how reliable this is overall... |
Yeah, We could just stick a white outline around the favicon like what we did for the logo, but I think there's some value in doing things the same way other Rust web properties have chosen to do it. |
I'd prefer that if you don't mind. Let's try to keep only one strategy overall. |
Well, I tried the white outline approach: But it just doesn't look good for the favicon: There aren't enough pixels to work with for the outline to make sense. I also tried just using the fallback PNG favicons from the PR: But I really don't like the look of that either. It just feels... wrong. I would like to stick with the SVG favicon because:
Note that mdbook also uses this approach. |
Ping from triage, what's the current status on this? Also i saw there's a merge commit in this PR. @Cldfire needs to rebase the commits before it can be accepted. |
8403179
to
3943916
Compare
Waiting on approval / rejection from the rustdoc team.
Rebased 🙂 |
ping @GuillaumeGomez (@Manishearth might have opinions too since they were a big part of the decision for #75249) |
Just a nit/question but otherwise looks good to me. |
No opinions, as long as this is just for the Rust logo I'm fine with it |
3943916
to
085679c
Compare
Thanks! @bors: r+ rollup |
📌 Commit 085679c has been approved by |
…as-schievink Rollup of 15 pull requests Successful merges: - rust-lang#75438 (Use adaptive SVG favicon for rustdoc like other rust sites) - rust-lang#76304 (Make delegation methods of `std::net::IpAddr` unstably const) - rust-lang#76724 (Allow a unique name to be assigned to dataflow graphviz output) - rust-lang#76978 (Documented From impls in std/sync/mpsc/mod.rs) - rust-lang#77044 (Liballoc bench vec use mem take not replace) - rust-lang#77050 (Typo fix: "satsify" -> "satisfy") - rust-lang#77074 (add array::from_ref) - rust-lang#77078 (Don't use an if guard to check equality with a constant) - rust-lang#77079 (Use `Self` in docs when possible) - rust-lang#77081 (Merge two almost identical match arms) - rust-lang#77121 (Updated html_root_url for compiler crates) - rust-lang#77136 (Suggest `const_mut_refs`, not `const_fn` for mutable references in `const fn`) - rust-lang#77160 (Suggest `const_fn_transmute`, not `const_fn`) - rust-lang#77164 (Remove workaround for deref issue that no longer exists.) - rust-lang#77165 (Followup to rust-lang#76673) Failed merges: r? `@ghost`
…eGomez Updates favicon order of precedence as it matters to Chrome Hi, this updates rust-lang#75438 to fix an order of precedence issue for Chrome. Unfortunately, the last favicon defined wins when it comes to Chrome, hence the primary icon being placed last. I [brought it up](https://bugs.chromium.org/p/chromium/issues/detail?id=1104663) with the Chromium team last year, but so far it's a non-issue. I've created an example website that mimics the behaviour in Chrome. https://sl4m.github.io/chrome-favicon/ This is what I'm seeing at the moment when viewing https://doc.rust-lang.org/core/index.html in Chrome. It's falling back to the PNG. <img width="80" alt="Screenshot 2021-08-12 at 21 11 58" src="https://user-images.githubusercontent.com/47347/129304041-b598213e-fcd3-4df1-addb-e6feac6c35b1.png">
Use the theme-adaptive SVG favicon that was recently introduced for the Rust site (and others).
(This PR is simply copied from the PR linked above, so see that for rationale.)
Closes #72165.
Before, Firefox on Linux:
After, Firefox on Linux (
prefers-color-scheme
set todark
by settingui.systemUsesDarkTheme
to a number value of1
inabout:config
):