Skip to content

Commit ac6f8ac

Browse files
Merge pull request #1148 from ruby/adjust-darkfish-responsiveness
Fix darkfish responsiveness issue on screens between 1024px and ~1650px
2 parents 40a6690 + 9a8ae3e commit ac6f8ac

File tree

1 file changed

+12
-11
lines changed
  • lib/rdoc/generator/template/darkfish/css

1 file changed

+12
-11
lines changed

lib/rdoc/generator/template/darkfish/css/rdoc.css

+12-11
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
/* vim: ft=css et sw=2 ts=2 sts=2 */
1010
/* Base Green is: #6C8C22 */
1111

12+
:root {
13+
--sidebar-width: 300px;
14+
}
15+
1216
.hide { display: none !important; }
1317

1418
* { padding: 0; margin: 0; }
@@ -209,21 +213,15 @@ nav {
209213
z-index: 10;
210214

211215
/* Layout */
212-
width: 300px;
216+
width: var(--sidebar-width);
213217
min-height: 100vh;
214218
background: white;
215219
}
216220

217-
@media (min-width: 1024px) {
218-
nav {
219-
min-height: unset;
220-
height: calc(100vh - 100px); /* reduce the footer height */
221-
}
222-
}
223-
224221
main {
225222
display: block;
226-
margin: 3em 1em 1em;
223+
margin: 3em auto 1em;
224+
padding: 0 1em; /* Add padding to keep space between main content and sidebar/right side of the screen */
227225
min-width: 340px;
228226
font-size: 16px;
229227
width: 100%;
@@ -232,8 +230,7 @@ main {
232230

233231
@media (min-width: 1024px) {
234232
main {
235-
margin-left: auto;
236-
margin-right: auto;
233+
margin-left: var(--sidebar-width);
237234
}
238235
}
239236

@@ -731,4 +728,8 @@ pre {
731728
font-family: "Source Code Pro", Monaco, monospace;
732729
}
733730

731+
footer {
732+
z-index: 20;
733+
}
734+
734735
/* @end */

0 commit comments

Comments
 (0)