Skip to content

Commit aad7f2d

Browse files
committed
Extract mobile topbar queries into their own section
1 parent 67cc395 commit aad7f2d

File tree

1 file changed

+24
-37
lines changed

1 file changed

+24
-37
lines changed

sigma9.css

Lines changed: 24 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ a.newpage {
9595
left: 1em;
9696
bottom: 0;
9797
z-index: 0;
98+
max-width: 90%;
9899
}
99100

100101
body {
@@ -327,10 +328,29 @@ sup {
327328
color: #a01;
328329
}
329330

330-
.top-bar ul li:last-of-type ul {
331+
/* The last dropdown in the topbar should point to the left to avoid potentially overflowing offscreen */
332+
.top-bar ul li:last-of-type ul,
333+
.mobile-top-bar ul li:last-of-type ul {
331334
right: 0;
332335
}
333336

337+
@media (max-width: 767px) {
338+
/* On mobile, show the mobile top bar instead of the regular one */
339+
.mobile-top-bar {
340+
display: block;
341+
}
342+
.top-bar {
343+
display: none;
344+
}
345+
}
346+
347+
@media (max-width: 385px) {
348+
/* At very small screen sizes, increase the width of the mobile top bar to avoid the links overflowing onto a new line */
349+
.mobile-top-bar {
350+
width: 100%;
351+
}
352+
}
353+
334354
/* IE7 HACK */
335355
#top-bar ul > li > ul {
336356
*margin-top: -4px;
@@ -1142,10 +1162,6 @@ img, embed, video, object, iframe, table {
11421162
float: left;
11431163
}
11441164

1145-
.mobile-top-bar ul li:last-of-type ul {
1146-
right: 0;
1147-
}
1148-
11491165
span, a {
11501166
word-break: break-all;
11511167
}
@@ -1169,19 +1185,10 @@ img, embed, video, object, iframe, table {
11691185
width: 100%;
11701186
}
11711187

1172-
#header, .mobile-top-bar {
1188+
#header {
11731189
max-width: 90%;
11741190
}
11751191

1176-
.top-bar {
1177-
display: none;
1178-
}
1179-
1180-
.mobile-top-bar {
1181-
display: block;
1182-
padding: 0;
1183-
}
1184-
11851192
.page-options-bottom a {
11861193
padding: 0 4px;
11871194
}
@@ -1251,10 +1258,6 @@ img, embed, video, object, iframe, table {
12511258
max-width: 100%;
12521259
}
12531260

1254-
.mobile-top-bar {
1255-
width: 100%;
1256-
}
1257-
12581261
#top-bar li a {
12591262
padding: 10px .5em;
12601263
}
@@ -1270,18 +1273,10 @@ img, embed, video, object, iframe, table {
12701273
margin: 0 2em 0 2em;
12711274
}
12721275

1273-
#header, .mobile-top-bar {
1276+
#header {
12741277
max-width: 90%;
12751278
}
12761279

1277-
.top-bar {
1278-
display: none;
1279-
}
1280-
1281-
.mobile-top-bar {
1282-
display: block;
1283-
}
1284-
12851280
.page-options-bottom a {
12861281
padding: 0 5px;
12871282
}
@@ -1335,18 +1330,10 @@ img, embed, video, object, iframe, table {
13351330
margin: 0 3em 0 2em;
13361331
}
13371332

1338-
#header, .mobile-top-bar {
1333+
#header {
13391334
max-width: 90%;
13401335
}
13411336

1342-
.top-bar {
1343-
display: none;
1344-
}
1345-
1346-
.mobile-top-bar {
1347-
display: block;
1348-
}
1349-
13501337
.page-options-bottom a {
13511338
padding: 0 6px;
13521339
}

0 commit comments

Comments
 (0)