Skip to content

Commit d90658d

Browse files
authored
Rollup merge of #105913 - notriddle:notriddle/width-limiter, r=GuillaumeGomez
rustdoc: remove width-limiter from source pages, stop overriding CSS
2 parents 6c20a39 + 581cbe4 commit d90658d

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/librustdoc/html/static/css/rustdoc.css

-4
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,6 @@ main {
322322
margin-right: auto;
323323
}
324324

325-
.source .width-limiter {
326-
max-width: unset;
327-
}
328-
329325
details:not(.rustdoc-toggle) summary {
330326
margin-bottom: .6em;
331327
}

src/librustdoc/html/templates/page.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h2></h2> {#- -#}
9999
{{- sidebar|safe -}}
100100
</nav> {#- -#}
101101
<main> {#- -#}
102-
<div class="width-limiter"> {#- -#}
102+
{%- if page.css_class != "source" -%}<div class="width-limiter">{%- endif -%}
103103
<nav class="sub"> {#- -#}
104104
{%- if page.css_class == "source" -%}
105105
<a class="sub-logo-container" href="{{page.root_path|safe}}{{krate_with_trailing_slash|safe}}index.html"> {#- -#}
@@ -132,7 +132,7 @@ <h2></h2> {#- -#}
132132
</form> {#- -#}
133133
</nav> {#- -#}
134134
<section id="main-content" class="content">{{- content|safe -}}</section> {#- -#}
135-
</div> {#- -#}
135+
{%- if page.css_class != "source" -%}</div>{%- endif -%}
136136
</main> {#- -#}
137137
{{- layout.external_html.after_content|safe -}}
138138
<div id="rustdoc-vars" {# -#}

0 commit comments

Comments
 (0)