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 redundant .location a { font-weight: 500 } #101954

Merged
merged 1 commit into from
Sep 18, 2022

Conversation

notriddle
Copy link
Contributor

The class="location" element is an h2, either in the sidebar or in the mobile header. Either way, it already has font-weight: 500, which the link inside will inherit.

The original version of this rule was added in 9e82fc7. At that time, the location header was rendered as a paragraph with the full path:

try!(write!(fmt, "<p class='location'>"));

Nowadays, it's rendered as a true header, with only the name of the item, and the full path is included in a separate fqn header:

"<h2 class=\"location\"><a href=\"#\">{}{}</a></h2>",

The `class="location"` element is an h2, either in the sidebar or in the
mobile header. Either way, it already has `font-weight: 500`, which the link
inside will inherit.

The original version of this rule was added in
9e82fc7. At that time, the location header
was rendered as a paragraph with the full path:

https://github.com/rust-lang/rust/blob/9e82fc7ef9b6c8a344dd27583990b02a661af78c/src/librustdoc/html/render.rs#L2080

Nowadays, it's rendered as a true header, with only the name of the item,
and the full path is included in a separate `fqn` header:

https://github.com/rust-lang/rust/blob/98ad6a5519651af36e246c0335c964dd52c554ba/src/librustdoc/html/render/mod.rs#L1797
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Sep 17, 2022
@rustbot
Copy link
Collaborator

rustbot commented Sep 17, 2022

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@rust-highfive
Copy link
Collaborator

r? @jsha

(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 Sep 17, 2022
@GuillaumeGomez
Copy link
Member

Thanks! r=me once CI pass

@notriddle
Copy link
Contributor Author

@bors r=GuillaumeGomez rollup

@bors
Copy link
Contributor

bors commented Sep 17, 2022

📌 Commit b693d2c 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 Sep 17, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 18, 2022
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#101151 (Document x86_64-fortanix-unknown-sgx platform)
 - rust-lang#101912 (Update `unicode-rs` crates to Unicode 15)
 - rust-lang#101923 (Don't add rustdoc's CSS to other doc pages)
 - rust-lang#101953 (Fix tooltip display for error codes)
 - rust-lang#101954 (rustdoc: remove redundant `.location a { font-weight: 500 }`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c0e8d46 into rust-lang:master Sep 18, 2022
@rustbot rustbot added this to the 1.66.0 milestone Sep 18, 2022
@notriddle notriddle deleted the notriddle/location-a-first-of-type branch September 18, 2022 06:40
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.

6 participants