Skip to content

Commit 5b9d8ee

Browse files
committed
Fix #83, spacing is reduced between two consecutive headings
1 parent 8a4d744 commit 5b9d8ee

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/theme/book.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ h2,
1616
h3 {
1717
margin-top: 2.5em;
1818
}
19+
h4,
20+
h5 {
21+
margin-top: 2em;
22+
}
23+
.header + .header h3,
24+
.header + .header h4,
25+
.header + .header h5 {
26+
margin-top: 1em;
27+
}
1928
.sidebar {
2029
position: absolute;
2130
left: 0;

src/theme/book.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ $( document ).ready(function() {
3333

3434
// Add anchors for all content headers
3535
content.find("h1, h2, h3, h4, h5").wrap(function(){
36-
var wrapper = $("<a>");
36+
var wrapper = $("<a class=\"header\">");
3737
wrapper.attr("name", $(this).text());
3838
return wrapper;
3939
});

src/theme/stylus/general.styl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ html, body {
1616
}
1717

1818
h2, h3 { margin-top: 2.5em }
19+
h4, h5 { margin-top: 2em }
20+
21+
.header + .header h3, .header + .header h4, .header + .header h5 { margin-top: 1em }

0 commit comments

Comments
 (0)