Skip to content

Commit cacf83c

Browse files
committed
Make darkfish more responsive and readable on mobile devices
- Make the sidebar toggle fixed on all devices - Prevent default zooming on mobile devices - Improve sidebar opening on mobile devices
1 parent 95cc15b commit cacf83c

File tree

1 file changed

+35
-1
lines changed
  • lib/rdoc/generator/template/darkfish/css

1 file changed

+35
-1
lines changed

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

+35-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ nav a:hover {
219219
#navigation-toggle {
220220
z-index: 1000;
221221
font-size: 2em;
222-
position: absolute;
222+
display: block;
223+
position: fixed;
223224
}
224225

225226
#navigation-toggle[aria-expanded="true"] {
@@ -265,6 +266,7 @@ main {
265266
font-size: 16px;
266267
line-height: 1.6;
267268
color: var(--text-color);
269+
box-sizing: border-box;
268270
}
269271

270272
@media (min-width: 1024px) {
@@ -715,4 +717,36 @@ main .attribute-access-type {
715717
font-family: var(--font-code);
716718
}
717719

720+
@media (max-width: 480px) {
721+
nav {
722+
width: 100%;
723+
}
724+
725+
main {
726+
margin: 1em auto;
727+
padding: 0 1em;
728+
max-width: 100%;
729+
}
730+
731+
#navigation-toggle {
732+
top: 10px;
733+
right: 10px;
734+
z-index: 1001;
735+
}
736+
737+
#navigation-toggle[aria-expanded="true"] {
738+
left: auto;
739+
}
740+
741+
#navigation-toggle[aria-expanded="false"] {
742+
left: auto;
743+
}
744+
745+
table {
746+
display: block;
747+
overflow-x: auto;
748+
white-space: nowrap;
749+
}
750+
}
718751
/* @end */
752+

0 commit comments

Comments
 (0)