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: Fix gap on section anchor symbol when hovering. #53706

Merged
merged 1 commit into from
Aug 26, 2018

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Aug 25, 2018

Fixes #49485 for section headings.

@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS.

cc @GuillaumeGomez

@rust-highfive
Copy link
Collaborator

r? @steveklabnik

(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 Aug 25, 2018
@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Aug 25, 2018

Do you have an example where this is a problem please? I can't find any having this issue...

@ehuss
Copy link
Contributor Author

ehuss commented Aug 25, 2018

Pretty much any section:

section-hover

Here you can see there's a gap between the elements:
image

It doesn't seem to happen on Chrome, but Firefox and Safari seem to suffer from it. Different engines seem to treat the en-space differently. I'm not sure what the en-space is trying to accomplish, actually. If it is trying to extend the hover region, I think using padding would be more reliable.

@GuillaumeGomez
Copy link
Member

Ok tested and with your changes, smaller titles work but h1 don't work anymore (this is the opposite of the current situation). While we're at it, it seems like titles in methods' doc have this issue as well (tested on firefox).

@ehuss
Copy link
Contributor Author

ehuss commented Aug 25, 2018

Hm, that's strange. h1 seems ok to me. For example on the front page:

image

The purple region is the padding, which should count for hovering. I made it a little extra wide so that it is sure to overlap.

I'm not sure what you mean by "titles". Is that like headers like "Examples"? Those also seem ok:

image

@GuillaumeGomez
Copy link
Member

Now it's good, might have failed to update the CSS... Thanks a lot!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Aug 26, 2018

📌 Commit 1c888d5 has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 26, 2018
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Aug 26, 2018
…llaumeGomez

rustdoc: Fix gap on section anchor symbol when hovering.

Fixes rust-lang#49485 for section headings.
bors added a commit that referenced this pull request Aug 26, 2018
Rollup of 5 pull requests

Successful merges:

 - #53043 (Improve unstable message display)
 - #53428 (libtest terse format: show how far in we are)
 - #53626 (Automatically expand a section even after page load)
 - #53651 (Add struct keyword doc)
 - #53706 (rustdoc: Fix gap on section anchor symbol when hovering.)

Failed merges:

 - #53472 (Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.)

r? @ghost
bors added a commit that referenced this pull request Aug 26, 2018
Rollup of 5 pull requests

Successful merges:

 - #53043 (Improve unstable message display)
 - #53428 (libtest terse format: show how far in we are)
 - #53626 (Automatically expand a section even after page load)
 - #53651 (Add struct keyword doc)
 - #53706 (rustdoc: Fix gap on section anchor symbol when hovering.)

Failed merges:

 - #53472 (Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.)

r? @ghost
@bors bors merged commit 1c888d5 into rust-lang:master Aug 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants