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

Fix hover effects in sidebar #93521

Merged
merged 1 commit into from
Feb 8, 2022
Merged

Fix hover effects in sidebar #93521

merged 1 commit into from
Feb 8, 2022

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Jan 31, 2022

The dark and ayu themes have a menu-like highlight on sidebar items. The light theme used to, but it was accidentally lost in the sidebar unification. The change brings back the hover effect in the light theme.

It also makes the hover effect apply consistently to all links in the sidebar, including headings.

It also simplifies the "In path" heading so it's one big link. The breadcrumbs are still readily available at the top of the page.

Note that a small number of headings are not linkified and so don't get the hover effect. That will be fixed with #92957.

Demo: https://rustdoc.crud.net/jsha/sidebar-hover/std/string/trait.ToString.html

r? @GuillaumeGomez

Fixes #93115

@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez,@Folyd

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jan 31, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 31, 2022
@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez
Copy link
Member

Looks good to me. I'm a bit worried about the GUI comparison error though. Maybe we should round it to the closest integer?

@bors
Copy link
Contributor

bors commented Feb 5, 2022

☔ The latest upstream changes (presumably #93655) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented Feb 5, 2022

☔ The latest upstream changes (presumably #93597) made this pull request unmergeable. Please resolve the merge conflicts.

@GuillaumeGomez
Copy link
Member

The location text is now weirdly aligned on mobile:

Screenshot from 2022-02-07 11-09-41

@GuillaumeGomez
Copy link
Member

Thanks!

r=me when CI pass.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented Feb 7, 2022

☔ The latest upstream changes (presumably #93738) made this pull request unmergeable. Please resolve the merge conflicts.

The dark and ayu themes have a menu-like highlight on sidebar items. The
light theme used to, but it was accidentally lost in the sidebar
unification. The change brings back the hover effect in the light theme.

It also makes the hover effect apply consistently to all links in the
sidebar, including headings.

It also simplifies the "In _path_" heading so it's one big link. The
breadcrumbs are still readily available at the top of the page.
@jsha
Copy link
Contributor Author

jsha commented Feb 8, 2022

@bors r=GuillaumeGomez

@bors
Copy link
Contributor

bors commented Feb 8, 2022

📌 Commit c20e2a9 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 Feb 8, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 8, 2022
…askrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#86497 (Add {floor,ceil}_char_boundary methods to str)
 - rust-lang#92695 (Add `#[no_coverage]` tests for nested functions)
 - rust-lang#93521 (Fix hover effects in sidebar)
 - rust-lang#93568 (Include all contents of first line of scraped item in Rustdoc)
 - rust-lang#93569 (rustdoc: correct unclosed HTML tags as generics)
 - rust-lang#93672 (update comment wrt const param defaults)
 - rust-lang#93715 (Fix horizontal trim for block doc comments)
 - rust-lang#93721 (rustdoc: Special-case macro lookups less)
 - rust-lang#93728 (Add in ValuePair::Term)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 267776a into rust-lang:master Feb 8, 2022
@rustbot rustbot added this to the 1.60.0 milestone Feb 8, 2022
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. 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.

Rustdoc light theme sidebar has no hover effect
6 participants