Skip to content

Commit 61ad6bf

Browse files
Merge pull request #2606 from dotty-staging/topic/fix-content-overflow
Fix overflow of sidebar in html templates
2 parents 4daa92d + 39c6a39 commit 61ad6bf

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

doc-tool/resources/_layouts/doc-page.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
{% include "sidebar" %}
1414

1515
<div id="content-body" class="doc-page-body">
16+
<h1 id="doc-page-title">{{ page.title }}</h1>
1617
<a id="edit-on-github" href="{{ site.projectUrl }}/edit/master/{{ site.root }}/{{ page.url }}">
1718
Edit this page on GitHub
1819
</a>
19-
<h1 id="doc-page-title">{{ page.title }}</h1>
2020
<hr/>
2121
<div id="doc-page-container">
2222
{{ content }}

doc-tool/resources/css/api-page.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,21 @@ div.entity-section > div.member > div.member-body > div.member-body-long.toggled
165165
div.entity-section.toggled {
166166
display: none;
167167
}
168+
169+
@media screen and (max-width: 576px) {
170+
a#edit-on-github {
171+
position: static !important;
172+
}
173+
}
174+
175+
@media screen and (min-width: 576px) and (max-width: 899px) {
176+
a#edit-on-github {
177+
right: 10px !important;
178+
}
179+
}
180+
181+
@media screen and (min-width: 899px) and (max-width: 1046px) {
182+
a#edit-on-github {
183+
position: static !important;
184+
}
185+
}

doc-tool/resources/css/sidebar.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ div#cover-block {
235235
}
236236

237237
/** Tablet (576px <= x < 768px) sidebar: Defaults closed with 250px wide sidebar */
238-
@media screen and (min-width: 576px) and (max-width: 899px) {
238+
@media screen and (max-width: 899px) {
239239
div#content-wrapper {}
240240
div#content-wrapper div#content-body {}
241241
div#content-wrapper div#content-body.doc-page-body { padding-right: 0; }

0 commit comments

Comments
 (0)