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: remove unused classes from sidebar links #102924

Merged
merged 2 commits into from
Oct 12, 2022

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Oct 11, 2022

Since 98f05a0 removed separate colors from the currently-selected item, there's no need to have item classes on sidebar links.

Preview: https://notriddle.com/notriddle-rustdoc-demos/sidebar-link-class/std/vec/struct.Vec.html

While cleaning up the CSS to remove unneeded .content selectors, this PR changes the h1.fqn a CSS selector to just be h1 a, so that the header link color selector is less specific than the typed link at the end. Since #89506 made docblocks start at h2, the main page link header should be the only h1 in the page now.

Since 98f05a0 removed separate colors
from the currently-selected item, there's no need to have item classes on
sidebar links.
Since 98f05a0 and
b5963f0 removed color classes from sidebar
items, there's no need for the selectors to be so specific any more.

This commit does have to change `h1.fqn a` to just be `h1 a`, so that the
header link color selector is less specific than the typed link at the end.
Since rust-lang#89506 made docblocks start at `h2`, the main page link header should
be the only h1 in the page now.
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 11, 2022
@rustbot
Copy link
Collaborator

rustbot commented Oct 11, 2022

Some changes occurred in HTML/CSS themes.

cc @GuillaumeGomez

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

A change occurred in the Ayu theme.

cc @Cldfire

@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 @jsha (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 11, 2022
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  IMAGE: x86_64-gnu-tools
##[endgroup]
From https://github.com/rust-lang/rust
 * branch              master     -> FETCH_HEAD
Searching for toolstate changes between bb93450ec4af83c20e9ba6c8e575aca55423001a and 4a73ea9eb1a5f4f92c95ef179c68682be16ae54c
src/ci/scripts/should-skip-this.sh: line 23: library/std/src/sys: Is a directory
Tool subtrees were updated
##[group]Run src/ci/scripts/verify-channel.sh
src/ci/scripts/verify-channel.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
---
.......... (70/78)
........   (78/78)


/checkout/src/test/rustdoc-gui/basic-code.goml basic-code... FAILED
[ERROR] (line 3) expected 1 elements, found 0: for command `assert-count: (".src-line-numbers", 1)`
Build completed unsuccessfully in 0:02:18

@GuillaumeGomez
Copy link
Member

We had the spurious failure again. I really need to check what's going on in there.

As for for these changes, took me a while to check it but looks all good, nicely done! r=me once CI pass

@notriddle
Copy link
Contributor Author

@bors r=GuillaumeGomez rollup

@bors
Copy link
Contributor

bors commented Oct 11, 2022

📌 Commit 062284a has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 Oct 11, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 11, 2022
…lass, r=GuillaumeGomez

rustdoc: remove unused classes from sidebar links

Since rust-lang@98f05a0 removed separate colors from the currently-selected item, there's no need to have item classes on sidebar links.

Preview: https://notriddle.com/notriddle-rustdoc-demos/sidebar-link-class/std/vec/struct.Vec.html

While cleaning up the CSS to remove unneeded `.content` selectors, this PR changes the `h1.fqn a` CSS selector to just be `h1 a`, so that the header link color selector is less specific than the typed link at the end. Since rust-lang#89506 made docblocks start at `h2`, the main page link header should be the only h1 in the page now.
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 12, 2022
Rollup of 8 pull requests

Successful merges:

 - rust-lang#102110 (Migrate rustc_passes diagnostics)
 - rust-lang#102187 (Use correct location for type tests in promoted constants)
 - rust-lang#102239 (Move style guide to rust-lang/rust)
 - rust-lang#102578 (Panic for invalid arguments of `{integer primitive}::ilog{,2,10}` in all modes)
 - rust-lang#102811 (Use memset to initialize readbuf)
 - rust-lang#102890 (Check representability in adt_sized_constraint)
 - rust-lang#102913 (unify `IsPattern` and `IsImport` enum in `show_candidates`)
 - rust-lang#102924 (rustdoc: remove unused classes from sidebar links)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 96bcced into rust-lang:master Oct 12, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 12, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 20, 2022
…ing, r=notriddle

Fix item declaration highlighting

Fixes rust-lang#103050.

As mentioned in the issue, rust-lang#102924 introduced this regression. This PR partially reverts it and adds a regression test.

r? `@notriddle`
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.

7 participants