-
Notifications
You must be signed in to change notification settings - Fork 198
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
firefox docs.rs not displaying correctly #1669
Comments
Which URL are you using? Looking at https://docs.rs/actix-web/latest/actix_web/ it looks good to me ( Also firefox 97 on Mac OS): |
The link you provided to me yields the same issue. Note that this behavior repeats for most other docs.rs pages except standard library! No issues at all with the standard library docs. |
Seems like rust-lang/rust#93171 which should have been fixed by #1614. |
So it could be related to the minimum font-size set? @Dowwie what did you set? Perhaps it's the browser cache? ( even though the file has a hashed filename) |
@syphar A-ha! It was my browser's default font size setting: 16. The older I get, the larger my font size. Eventually, my fonts will be dragging on the floor. The moment I reduced the font size, the issue went away. Thanks, everyone. |
now it gets interesting: when I just change default font size, I cannot reproduce the issue. When I increase minimum font size to something >= 16, I can reproduce this issue. @jsha @GuillaumeGomez is this something that we want/can handle? |
I'd say no but for accessibility things, I don't know much so let's see what @jsha thinks. |
I think this should be fixable by setting overflow-y: hidden on the topbar
element. I avoided it before because I wanted to actually make the text
elements the right size, but it seems there are some settings that make
that hard, and overflow-y would be the reliable solution.
It would also be interesting to see why only some of the topbar items
overflow, and others (like the docs.rs title) don't.
|
@mitsuhiko The fix was just merged: #1619. Needs to be deployed now. |
I just deployed the fix |
The fix resolved the issue that I raised. Not sure whether to close this just yet. @mitsuhiko Looks good on your side? |
It seems to be broken again. Looks the same as on initial screenshot. All the text is squished before "Release" tab. |
@aslpavel it looks good on my computer, which crate & release are you looking at? Also axum/latest? |
I can't reproduce the bug on ubuntu 21.04 (firefox 98, chrome 98). |
If there is an additional information that I can provide to debug this, I'm happy to help |
Still looks good to me... Maybe the screen size is what's triggering the issue? In any case, cc @jsha |
That's quite strange indeed. I also can't reproduce on Ubuntu 21, with Firefox or Chrome (latest of both). The thing that sticks out to me in these screenshots is that the "Releases" (and similar) menu items are missing a lower bar, as if they are just slightly too big - the same symptoms we saw previously, which we fixed by making the menu bar font sizes not responsive to the user's font size. I wonder if it's possible this is an Arch vs Ubuntu thing? Like, could the fonts be slightly different on Arch? That would be surprising, since docs.rs brings all its own fonts. Could you get the computed styles for the "Releases" menu heading? Here's what mine look like: Also, could you attach a screenshot of your font settings in FF? |
I've tested everything now on my fedora machine with clean firefox profile: But I did find something that effects the results
|
That is very surprising indeed... |
Ah, excellent, now we have a lead! What package did you get fira-sans.ttf from? Presumably if we install it locally we'll be able to reproduce.
The issue is that in some situations parts of the top bar are exceeding their bounds, which is affecting the layout below in surprising ways. I thought we had this additionally handled with an overflow property on the navbar, but I can't find it now. At any rate, once I have the font and can reproduce I suspect it will be quick to find the right fix. |
|
Reminds me a little of rust-lang/rust#38164, but I'd really prefer not to force webfont usage if the font is already available locally. |
Well it would be ok if I had some missing/badly rendered symbols. But this font breaks layout of the whole page. |
Like @jsha already wrote, we suspect a missing |
Copying some additional data from my comment here: rust-lang/rust#93171 (comment)
So it seems like screen size and orientation definitely plays a factor. Also since this issue won't magically go away due to older crates/versions not getting CSS updates, here's some hacky client-side fixes for those who need them: UBlock Origin Filter Add under UBlock -> dashboard (the gears icon) -> "My Filters" tab docs.rs###rustdoc_body_wrapper:style(width: 100% !important;) Built-in Firefox Userstyles (Untested, @ me if it works and I'll edit this) @-moz-document domain(docs.rs) {
#rustdoc_body_wrapper {
width: 100% !important;
}
} |
Just wanted to say thanks to all reporting and helping reproduce. Having
the old font file really helped. The fix is merged; once it's deployed it
about retroactively affect old docs (because it's docs.rs css, not rustdoc
css).
|
I'm using a macbook pro and noticed that Firefox isn't displaying docs.rs correctly:
page in Firefox v97.0:
![image](https://user-images.githubusercontent.com/2601236/153249684-b645d9aa-de35-4449-b4fb-6e79a6fe6c08.png)
page in Chrome:
![Screen Shot 2022-02-09 at 11 46 05 AM](https://user-images.githubusercontent.com/2601236/153249989-ef3b558b-ef83-4c4d-8e75-fac61b4a4dba.png)
The text was updated successfully, but these errors were encountered: