Skip to content

Commit

Permalink
Rollup merge of rust-lang#101954 - notriddle:notriddle/location-a-fir…
Browse files Browse the repository at this point in the history
…st-of-type, r=GuillaumeGomez

rustdoc: remove redundant `.location a { font-weight: 500 }`

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
  • Loading branch information
matthiaskrgr authored Sep 18, 2022
2 parents fb20485 + b693d2c commit c0e8d46
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -533,10 +533,6 @@ img {
border: none;
}

.location a:first-of-type {
font-weight: 500;
}

.block ul, .block li {
padding: 0;
margin: 0;
Expand Down

0 comments on commit c0e8d46

Please sign in to comment.