Skip to content

Commit

Permalink
Rollup merge of #101911 - notriddle:notriddle/source-content, r=Guill…
Browse files Browse the repository at this point in the history
…aumeGomez

rustdoc: remove no-op CSS on `.source .content`

# `margin-left: 0`

This rule originated in 7669f04, to override the default, massive left margin that content used to accommodate the sidebar:

https://github.com/rust-lang/rust/blob/7669f04fb0ddc3d71a1fb44dc1c5c00a6564ae99/src/librustdoc/html/static/main.css#L307-L309

This massive left margin doesn't exist any more. It was replaced with a flexbox-based sidebar layout in 135281e.

# `max-width: none`

This rule originated in 7669f04, to override the default, limited line-width that makes sense for prose, but doesn't make sense for code (which typically uses hard-wrapped lines):

https://github.com/rust-lang/rust/blob/7669f04fb0ddc3d71a1fb44dc1c5c00a6564ae99/src/librustdoc/html/static/main.css#L153

This line width limiter isn't applied to the `<div class="content">` node any more. It's been moved to a separate wrapper `<div>` that used to be called `main-inner` (in 135281e) but is now called `width-limiter` (since d7528e2).
  • Loading branch information
notriddle authored Sep 17, 2022
2 parents 9c6ef4a + ac8628b commit b1178af
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,7 @@ img {
}

.source .content {
max-width: none;
overflow: visible;
margin-left: 0px;
}

.sub-container {
Expand Down

0 comments on commit b1178af

Please sign in to comment.