Skip to content

Commit fe6cfb0

Browse files
Merge pull request #15 from ucphhpc/fix/basic-responsiveness
Apply minimal changes/tweaks to restore a responsive narrow view.
2 parents 2dd7518 + e57f2b6 commit fe6cfb0

File tree

1 file changed

+53
-13
lines changed

1 file changed

+53
-13
lines changed

docs/_static/custom.css

Lines changed: 53 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,64 @@
22
a {
33
color: #679c5b;
44
}
5+
56
body {
67
font-family: "Open Sans",Helvetica,Arial,sans-serif
78
}
8-
/* Custom theming for screens width 1100px and up */
9+
10+
@media screen and (max-width: 1100px) {
11+
.wy-nav-content-wrap {
12+
margin-left: 0;
13+
}
14+
15+
.wy-nav-side {
16+
left: -300px;
17+
}
18+
19+
.wy-nav-side.shift {
20+
left: 0px;
21+
width: 300px;
22+
background: unset;
23+
}
24+
25+
.wy-nav-content-wrap.shift {
26+
position: fixed;
27+
min-width: 100%;
28+
left: 300px;
29+
top: 0;
30+
height: 100%;
31+
overflow: hidden;
32+
}
33+
34+
.wy-menu.wy-menu-vertical, .wy-side-nav-search, .wy-side-scroll {
35+
width: 300px;
36+
}
37+
38+
.wy-nav-top {
39+
display: block;
40+
background: #c9c9c9;
41+
}
42+
43+
[data-toggle="wy-nav-top"] {
44+
color: #404040;
45+
}
46+
47+
nav.wy-nav-top a {
48+
color: #404040;
49+
font-family: Roboto Slab,ff-tisa-web-pro,Georgia,Arial,sans-serif;
50+
font-size: 200%;
51+
}
52+
}
953

1054
@media screen and (min-width: 1100px) {
55+
.wy-grid-for-nav nav {
56+
background: white;
57+
}
58+
}
59+
1160
/* Distinguishing images from text content */
12-
.rst-content img.with-border {
13-
border-color: lightgrey;
61+
.rst-content img.with-border {
62+
border-color: lightgrey;
1463
border-width: 2px;
1564
border-style: solid;
1665
}
@@ -126,19 +175,11 @@ details {
126175
}
127176

128177
/* Left section and menu */
129-
.wy-nav-side, .wy-grid-for-nav {
130-
margin-left: calc(((100vw - 1100px) / 2));
131-
}
132-
133178
.wy-menu-vertical header, .wy-menu-vertical p.caption {
134179
color: #000;
135180
font-size: 95%;
136181
}
137-
138-
.wy-grid-for-nav nav {
139-
background: white
140-
}
141-
182+
142183
.wy-nav-content-wrap {
143184
background: none;
144185
}
@@ -180,4 +221,3 @@ details {
180221
{
181222
margin-bottom: 4px;
182223
}
183-
}

0 commit comments

Comments
 (0)