Fix #83, spacing is reduced between two consecutive headings

This commit is contained in:
Mathieu David 2015-12-30 15:41:49 +01:00
parent 8a4d744dc1
commit 5b9d8ee6ac
3 changed files with 13 additions and 1 deletions

View File

@ -16,6 +16,15 @@ h2,
h3 {
margin-top: 2.5em;
}
h4,
h5 {
margin-top: 2em;
}
.header + .header h3,
.header + .header h4,
.header + .header h5 {
margin-top: 1em;
}
.sidebar {
position: absolute;
left: 0;

View File

@ -33,7 +33,7 @@ $( document ).ready(function() {
// Add anchors for all content headers
content.find("h1, h2, h3, h4, h5").wrap(function(){
var wrapper = $("<a>");
var wrapper = $("<a class=\"header\">");
wrapper.attr("name", $(this).text());
return wrapper;
});

View File

@ -16,3 +16,6 @@ html, body {
}
h2, h3 { margin-top: 2.5em }
h4, h5 { margin-top: 2em }
.header + .header h3, .header + .header h4, .header + .header h5 { margin-top: 1em }