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

Update CSS for future rustdoc merge #33431

Merged
merged 3 commits into from
May 10, 2016
Merged

Conversation

GuillaumeGomez
Copy link
Member

@birkenfeld
Copy link
Contributor

Thanks! One more issue I've noticed is that the "in-band"/"out-of-band" split is 60%/40%, which wastes a lot of space for long "impl X for Y where Z" headers, whereas "[src]" takes only a small, and constant, amount of space.

@GuillaumeGomez
Copy link
Member Author

I'm not sure to understand what you're talking about. Do you have a screenshot please?

@birkenfeld
Copy link
Contributor

Sure! You can see that the impl lines would fit in one line easily, but the out-of-band span has width: 40% set, and in-band has width: 60%, so there is a lot of space wasted in the 40%.

2016-05-06-080647_3200x1080_scrot

Since these impls can be scattered around quite a bit, it is nice
to be able to jump to the location where individual methods and
trait impls are defined.

Fixes: rust-lang#30416
@GuillaumeGomez
Copy link
Member Author

Oh I see! I'll do something about it as well then.

@GuillaumeGomez GuillaumeGomez force-pushed the issue-30416 branch 2 times, most recently from b12ef97 to ca5411a Compare May 6, 2016 16:51
@GuillaumeGomez
Copy link
Member Author

@birkenfeld: So with the last commit I did:

  • When "since" and "src" are on same item, "since" is left aligned to "src".
  • Now, elements aren't 60% and 40% anymore, no wasted space.
  • When you reduce browser's size, "since" and "src" goes under elements, avoiding ugly issues.

Do you mind testing it and giving me your feedback please? :)

@birkenfeld
Copy link
Contributor

birkenfeld commented May 6, 2016

@GuillaumeGomez the style and positioning looks good to me now! I found three issues (Firefox 45 and Chromium 50, on Linux):

  • there is a "1.0.0" in the upper right corner which I think wasn't there before (see 1st screenshot)
  • in a very small range of window width, text is overlapping (this can probably be ignored, see 2nd screenshot)
  • the more serious issue is that I can't click the links anymore 😄 when removing the position: absolute they are clickable again (but of course not at the correct position)

2016-05-06-195527_3200x1080_scrot

2016-05-06-195440_3200x1080_scrot

@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented May 6, 2016

in a very small range of window width, text is overlapping (this can probably be ignored, see 2nd screenshot)

That's the goal. Look at my comment:

When you reduce browser's size, "since" and "src" goes under elements, avoiding ugly issues.

.

  • there is a "1.0.0" in the upper right corner which I think wasn't there before (see 1st screenshot)
  • the more serious issue is that I can't click the links anymore :) when removing the position: absolute they are clickable again (but of course not at the correct position)

I'm on it!

@birkenfeld
Copy link
Contributor

That's the goal. Look at my comment:

When you reduce browser's size, "since" and "src" goes under elements, avoiding ugly issues.

Ah. I was reading "under" as "vertically below". Makes sense.

@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented May 6, 2016

Try to reduce the browser's window without my change, you'll understand better why I did this change. 😉

@GuillaumeGomez
Copy link
Member Author

GuillaumeGomez commented May 6, 2016

Updated. Errors have been removed (damn z-index). So that's what it looks like now:

screenshot from 2016-05-05 17 17 08

@birkenfeld: I checked and remove some bugs I found but could you take another look please?

@birkenfeld
Copy link
Contributor

Looks good! A very minor thing I noticed is that the "stable since" versions are styled differently, e.g. the "1.0.0" and the "1.9.0" in the first of my previous screenshots.

@GuillaumeGomez
Copy link
Member Author

Didn't pay attention to it. I update it. Thanks for the feedback!

@GuillaumeGomez
Copy link
Member Author

It was a font issue. Do you see anything else @birkenfeld?

@birkenfeld
Copy link
Contributor

Nope, I'm happy 👍

@GuillaumeGomez
Copy link
Member Author

Great! 😄

cc @steveklabnik
cc @Manishearth

@steveklabnik
Copy link
Member

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented May 9, 2016

📌 Commit cdca084 has been approved by steveklabnik

Manishearth added a commit to Manishearth/rust that referenced this pull request May 9, 2016
Manishearth added a commit to Manishearth/rust that referenced this pull request May 9, 2016
bors added a commit that referenced this pull request May 9, 2016
Rollup of 10 pull requests

- Successful merges: #33129, #33224, #33370, #33383, #33431, #33474, #33480, #33496, #33509, #33514
- Failed merges:
Manishearth added a commit to Manishearth/rust that referenced this pull request May 9, 2016
bors added a commit that referenced this pull request May 9, 2016
Rollup of 10 pull requests

- Successful merges: #33129, #33224, #33370, #33383, #33431, #33474, #33480, #33496, #33509, #33514
- Failed merges:
@bors bors merged commit cdca084 into rust-lang:master May 10, 2016
@GuillaumeGomez GuillaumeGomez deleted the issue-30416 branch May 10, 2016 07:27
@mitaa
Copy link
Contributor

mitaa commented May 10, 2016

If the first-line of the top level doc-block is long enough it overlaps with the "stable since" annotation.

http://doc.rust-lang.org/nightly/std/fmt/fn.write.html
stability_overlap

@GuillaumeGomez

  • When you reduce browser's size, "since" and "src" goes under elements, avoiding ugly issues.

Was this intended?

@GuillaumeGomez
Copy link
Member Author

Was this intended?

It is. But not in this precise case (I mean, it's not supposed to be removed if you don't reduce browser's size).

@GuillaumeGomez
Copy link
Member Author

To avoid this issue, I propose, for the "first" since which appears normally in the paragraph describing the type/function/whatever to be put at the top. Like the following:

screen

This way, we avoid the overlap if the description is too long.

@birkenfeld
Copy link
Contributor

I like it, this is more consistent with the other "since"s as well.

@steveklabnik
Copy link
Member

I like it too!

steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 10, 2016
steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 10, 2016
steveklabnik added a commit to steveklabnik/rust that referenced this pull request May 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants