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

Add links for impls #43979

Merged
merged 2 commits into from
Aug 26, 2017
Merged

Add links for impls #43979

merged 2 commits into from
Aug 26, 2017

Conversation

Jouan
Copy link
Contributor

@Jouan Jouan commented Aug 18, 2017

Implements a solution for issue #23552
r? @QuietMisdreavus

Implements a solution for issue rust-lang#23552
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @QuietMisdreavus (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@QuietMisdreavus
Copy link
Member

Can you post a screenshot of how the section anchor looks?

@@ -26,9 +26,6 @@ h1.fqn {
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
border-bottom-color: #DDDDDD;
}
.in-band {
background-color: white;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this style get taken out? Was it interfering with the anchor tag?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the :target style is attempting to change the background to yellow, but the .in-band style is setting it back to white, creating a weird color layout.
Since the background for .in-band is typically white anyway, I thought it was reasonably safe to remove.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, that makes sense, but i'm still gonna call in @GuillaumeGomez for a second opinion. (Usually he's supposed to get pinged on CSS changes but it looks like that one didn't happen this time >_>)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a reason for this behavior. When the text of a function overlaps a version number, the version number isn't visible anymore to avoid weird text overlap. Normally, you could just put your own background-color after this one without issues.

Copy link
Contributor Author

@Jouan Jouan Aug 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just reverted my changes to main.css and I made the :target style look like this:
:target { background: #FDFFD3; background-color: #FDFFD3; }

Unfortunately, it doesn't solve the issue. Is this the change that you had in mind?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange to have background and background-color and that your CSS change doesn't work...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made a change that conserves the .in-band style here: 4729f22

@Jouan
Copy link
Contributor Author

Jouan commented Aug 18, 2017

Normal state:
normal
Hover state:
hover
Target state (for this one, the URL is doc/std/vec/struct.Vec.html#impl-4):
target

@QuietMisdreavus
Copy link
Member

Thanks! I'm gonna wait to see what imperio thinks, but otherwise I like this! Thanks so much!

:target will specifically override .in-band background
@GuillaumeGomez
Copy link
Member

So were you able to find out what was wrong with background color? :)

@arielb1 arielb1 added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 22, 2017
@Jouan
Copy link
Contributor Author

Jouan commented Aug 23, 2017

I'm not really an expert on CSS, but my understanding was that the .in-band style was overriding its parent's style. The :target here was the h3 and the .in-band was a child of that h3.
What I ended up doing is reapplying the background of :target to .in-band when .in-band is a child of :target.
Feels a bit hacky to me but I couldn't think of a better way.
What do you think?

@GuillaumeGomez
Copy link
Member

I think that's good. The CSS isn't ugly so it's fine for. Thanks a lot for the PR!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Aug 23, 2017

📌 Commit 4729f22 has been approved by GuillaumeGomez

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Aug 26, 2017
…umeGomez

Add links for impls

Implements a solution for issue rust-lang#23552
r? @QuietMisdreavus
bors added a commit that referenced this pull request Aug 26, 2017
Rollup of 7 pull requests

- Successful merges: #43776, #43966, #43979, #44072, #44086, #44090, #44091
- Failed merges:
@bors bors merged commit 4729f22 into rust-lang:master Aug 26, 2017
@Jouan Jouan deleted the Add-links-for-impls branch August 29, 2017 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants