Skip to content

Commit d290581

Browse files
committed
Improve footer styles
Don't attempt to use fixed height footer, since content height can vary greatly, depending on the device. There's a way to muck around with table-* display properties for the entire page and sticky the variable-height footer to the bottom, but instead I chose to unsticky it. Related to #645
1 parent 3029914 commit d290581

File tree

4 files changed

+59
-78
lines changed

4 files changed

+59
-78
lines changed

assets/sass/style.scss

Lines changed: 31 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
html, body {
22
margin: 0;
3-
background: #EFEFEF;
4-
font-family: sans-serif !important; /*override font from perl.css stylesheet, until we can get rid of it*/
3+
background: #EFEFEF!important;
4+
font-family: sans-serif !important; /*override font from perl.css
5+
stylesheet, until we can get rid of it*/
56
}
67

78
html {
@@ -12,9 +13,9 @@ html {
1213
}
1314

1415
body {
15-
padding: 0 2em;
16+
padding: 1px 10px 0;
17+
margin: -1px 0 0;
1618
width: auto;
17-
margin-bottom: 5.5em; /* max footer height */
1819
}
1920

2021
.title {
@@ -127,21 +128,6 @@ td {
127128
margin-left: 1.5em;
128129
}
129130

130-
@media (max-width : 560px) {
131-
#header > a {
132-
font-size: 1.1em;
133-
display: block;
134-
padding: 5px 10px 0;
135-
margin: 0;
136-
text-align: center;
137-
}
138-
#home_logo {
139-
display: none;
140-
}
141-
142-
body { padding: 0; }
143-
}
144-
145131
#logo {
146132
display: inline-block;
147133
margin: -0.75em 0 -0.5em -0.5em;
@@ -289,8 +275,6 @@ td {
289275

290276
#formalities { font-style: italic; }
291277

292-
#content-wrapper { padding-bottom: 2em; }
293-
294278
#content {
295279
margin: 2em auto;
296280
overflow: hidden;
@@ -327,21 +311,6 @@ td {
327311
}
328312
}
329313

330-
#footer-wrapper {
331-
position: absolute;
332-
bottom: 0;
333-
width: 100%;
334-
margin: 0 -2em;
335-
padding-bottom: 2em;
336-
overflow: hidden;
337-
max-height: 5.5em; /* max footer height */
338-
}
339-
340-
#footer {
341-
margin: 0 2em;
342-
padding: 0 1em;
343-
}
344-
345314
.title-anchor {
346315
visibility: hidden;
347316
color: #333;
@@ -358,3 +327,29 @@ h1:hover, h2:hover, h3:hover, h4:hover, h5:hover, h6:hover {
358327
visibility: visible;
359328
}
360329
}
330+
331+
footer.pretty-box {
332+
// margin: 0;
333+
padding: 0 3px;
334+
text-align: center;
335+
font-size: 80%;
336+
}
337+
338+
@media (max-width : 560px) {
339+
#header > a {
340+
font-size: 1.1em;
341+
display: block;
342+
padding: 5px 10px 0;
343+
margin: 0;
344+
text-align: center;
345+
}
346+
#home_logo {
347+
display: none;
348+
}
349+
350+
body { padding: 0; }
351+
352+
.pretty-box {
353+
padding: 3px;
354+
}
355+
}

html/css/style.css

Lines changed: 25 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
html, body {
22
margin: 0;
3-
background: #EFEFEF;
3+
background: #EFEFEF !important;
44
font-family: sans-serif !important;
5-
/*override font from perl.css stylesheet, until we can get rid of it*/ }
5+
/*override font from perl.css
6+
stylesheet, until we can get rid of it*/ }
67

78
html {
89
padding: 0;
@@ -11,10 +12,9 @@ html {
1112
min-height: 100%; }
1213

1314
body {
14-
padding: 0 2em;
15-
width: auto;
16-
margin-bottom: 5.5em;
17-
/* max footer height */ }
15+
padding: 1px 10px 0;
16+
margin: -1px 0 0;
17+
width: auto; }
1818

1919
.title {
2020
margin-top: 0;
@@ -106,18 +106,6 @@ td {
106106
font-size: 2em;
107107
margin-left: 1.5em; }
108108

109-
@media (max-width: 560px) {
110-
#header > a {
111-
font-size: 1.1em;
112-
display: block;
113-
padding: 5px 10px 0;
114-
margin: 0;
115-
text-align: center; }
116-
#home_logo {
117-
display: none; }
118-
body {
119-
padding: 0; } }
120-
121109
#logo {
122110
display: inline-block;
123111
margin: -0.75em 0 -0.5em -0.5em;
@@ -245,9 +233,6 @@ td {
245233
#formalities {
246234
font-style: italic; }
247235

248-
#content-wrapper {
249-
padding-bottom: 2em; }
250-
251236
#content {
252237
margin: 2em auto;
253238
overflow: hidden;
@@ -275,20 +260,6 @@ td {
275260
margin-top: 0;
276261
padding-top: 0; }
277262

278-
#footer-wrapper {
279-
position: absolute;
280-
bottom: 0;
281-
width: 100%;
282-
margin: 0 -2em;
283-
padding-bottom: 2em;
284-
overflow: hidden;
285-
max-height: 5.5em;
286-
/* max footer height */ }
287-
288-
#footer {
289-
margin: 0 2em;
290-
padding: 0 1em; }
291-
292263
.title-anchor {
293264
visibility: hidden;
294265
color: #333;
@@ -301,3 +272,22 @@ td {
301272

302273
h1:hover .title-anchor, h2:hover .title-anchor, h3:hover .title-anchor, h4:hover .title-anchor, h5:hover .title-anchor, h6:hover .title-anchor {
303274
visibility: visible; }
275+
276+
footer.pretty-box {
277+
padding: 0 3px;
278+
text-align: center;
279+
font-size: 80%; }
280+
281+
@media (max-width: 560px) {
282+
#header > a {
283+
font-size: 1.1em;
284+
display: block;
285+
padding: 5px 10px 0;
286+
margin: 0;
287+
text-align: center; }
288+
#home_logo {
289+
display: none; }
290+
body {
291+
padding: 0; }
292+
.pretty-box {
293+
padding: 3px; } }

template/footer.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
</div>
2-
</div>
3-
<div id="footer-wrapper">
4-
<div id="footer" class="pretty-box yellow">
2+
<footer class="pretty-box yellow">
53
<p>
64
Generated on DATETIME from SOURCEURL, commit <a href="https://github.com/perl6/doc/commit/SOURCECOMMIT">SOURCECOMMIT</a>.
75
This is a work in progress to document Perl 6, and known to be
@@ -12,8 +10,7 @@
1210
<a href="https://raw.githubusercontent.com/perl6/doc/master/LICENSE">Artistic License 2.0</a>.
1311
The Camelia image is copyright © 2009 by Larry Wall.
1412
</p>
15-
</div> <!-- footer -->
16-
</div> <!-- footer-wrapper -->
13+
</footer>
1714

1815
<script type="text/javascript" src="/js/jquery-1.11.3.min.js"></script>
1916
<script type="text/javascript" src="/js/jquery-ui.min.js"></script>

template/header.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@
1616
MENU
1717
</div>
1818
</div>
19-
<div id="content-wrapper">
20-
<div id="content" class="pretty-box yellow">
19+
<div id="content" class="pretty-box yellow">

0 commit comments

Comments
 (0)