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

Rustdoc: Use the default size of the Rust logo svg. #96190

Closed
wants to merge 1 commit into from

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Apr 18, 2022

Rustdoc started using the new logo svg in #92854, but kept the size in the css at 100 by 100 pixels.

The new svg has natural size of 106px, and is designed to align the straight edges exactly with the pixels at that size. This PR changes the size to match that 106px.

Before:

image

After:

image

@m-ou-se m-ou-se added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Apr 18, 2022
@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez,@Folyd,@jsha

@rust-highfive
Copy link
Collaborator

r? @jsha

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 18, 2022
@GuillaumeGomez
Copy link
Member

The "problem" is that you can use your own image as logo. 100px is a much simpler requirement than 106px...

@m-ou-se
Copy link
Member Author

m-ou-se commented Apr 18, 2022

Oh! Right. Didn't think of that.

@m-ou-se m-ou-se closed this Apr 18, 2022
@jsha
Copy link
Contributor

jsha commented Apr 18, 2022

We already have a little bit of logic that treats the Rust logo differently: in dark themes, we add a tracing around the logo so it shows up against the background. We could use the same class to give a slightly different size when using the Rust logo. I believe there's enough wiggle room in the UI - though it might make testing a bit more complex.

One way to mitigate the complexity of different configurations (default logo vs custom logo) would be to always put the logo inside a 106x106px div, and if it's the Rust logo use the full space; otherwise use just the center 100x100.

@GuillaumeGomez
Copy link
Member

I'm not sure that adding more specific things to the rust logo is a good idea but if someone is motivated to add what you suggested, I'm fine with it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants