File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 6
6
margin-left : auto;
7
7
margin-right : auto;
8
8
max-width : 45rem ;
9
+ padding-left : .5rem ;
10
+ padding-right : .5rem ;
9
11
}
10
12
11
13
figure {
@@ -113,12 +115,14 @@ main > h2:first-child {
113
115
}
114
116
115
117
/* Side-bar navigation, if the viewport is wide enough. */
116
- /* HACK(strager): max-width in this query should equal body's max-width, but we
117
- need to add a little bit in case of a scroll bar. */
118
+ /* HACK(strager): max-width in this query should equal body's max-width (plus
119
+ padding-left and padding-right), but we need to add a little bit in case of a
120
+ scroll bar. 1em seems to be enough. */
118
121
@media only screen and (min-width : 51em ) {
119
122
body .side-bar-nav {
120
- max- width: 50 em ;
123
+ --page- width: 49 em ;
121
124
--side-bar-width : 7rem ;
125
+ max-width : var (--page-width );
122
126
}
123
127
124
128
/* Move the main content to the right to make room for the side bar. */
@@ -164,7 +168,7 @@ main > h2:first-child {
164
168
overflow-y : auto;
165
169
position : fixed;
166
170
top : 0 ;
167
- width : calc ((100% - 50 em ) / 2 + var (--side-bar-width ));
171
+ width : calc ((100% - var ( --page-width ) ) / 2 + var (--side-bar-width ));
168
172
}
169
173
170
174
.side-bar-nav header nav {
You can’t perform that action at this time.
0 commit comments