Skip to content

Commit b2f45c4

Browse files
committed
Fix gaps (#1111)
Since the introduction of the grid system, margin collapse did not work between the preamble and content as they are not in the same element. It makes sense to have them in the same element, as they are to be displayed in a single flow. Signed-off-by: Paul-Elliot <[email protected]>
1 parent 1ced6f2 commit b2f45c4

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/html/html_page.ml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,15 @@ let search_urls = %s;
210210

211211
let body =
212212
html_of_breadcrumbs breadcrumbs
213-
@ search_bar
214-
@ [ Html.header ~a:[ Html.a_class [ "odoc-preamble" ] ] header ]
215-
@ sidebar toc
216-
@ [ Html.div ~a:[ Html.a_class [ "odoc-content" ] ] content ]
213+
@ search_bar @ sidebar toc
214+
@ [
215+
Html.div
216+
~a:[ Html.a_class [ "odoc-main" ] ]
217+
[
218+
Html.header ~a:[ Html.a_class [ "odoc-preamble" ] ] header;
219+
Html.div ~a:[ Html.a_class [ "odoc-content" ] ] content;
220+
];
221+
]
217222
in
218223

219224
let htmlpp = Html.pp ~indent:(Config.indent config) () in

src/html_support_files/odoc.css

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,8 @@ body.odoc-src {
307307
margin-right: calc(10vw + 20ex);
308308
}
309309

310-
.odoc-content {
311-
grid-row: 4;
310+
.odoc-main {
311+
grid-row: 3;
312312
grid-column: 2;
313313
}
314314

@@ -322,11 +322,6 @@ header {
322322
margin-bottom: 30px;
323323
}
324324

325-
header.odoc-preamble {
326-
grid-column: 2;
327-
grid-row: 3;
328-
}
329-
330325
nav {
331326
font-family: "Fira Sans", sans-serif;
332327
}

0 commit comments

Comments
 (0)