Skip to content

Commit

Permalink
Fix gaps (ocaml#1111)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
panglesd committed Jun 10, 2024
1 parent 1ced6f2 commit b2f45c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
13 changes: 9 additions & 4 deletions src/html/html_page.ml
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,15 @@ let search_urls = %s;

let body =
html_of_breadcrumbs breadcrumbs
@ search_bar
@ [ Html.header ~a:[ Html.a_class [ "odoc-preamble" ] ] header ]
@ sidebar toc
@ [ Html.div ~a:[ Html.a_class [ "odoc-content" ] ] content ]
@ search_bar @ sidebar toc
@ [
Html.div
~a:[ Html.a_class [ "odoc-main" ] ]
[
Html.header ~a:[ Html.a_class [ "odoc-preamble" ] ] header;
Html.div ~a:[ Html.a_class [ "odoc-content" ] ] content;
];
]
in

let htmlpp = Html.pp ~indent:(Config.indent config) () in
Expand Down
9 changes: 2 additions & 7 deletions src/html_support_files/odoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,8 @@ body.odoc-src {
margin-right: calc(10vw + 20ex);
}

.odoc-content {
grid-row: 4;
.odoc-main {
grid-row: 3;
grid-column: 2;
}

Expand All @@ -322,11 +322,6 @@ header {
margin-bottom: 30px;
}

header.odoc-preamble {
grid-column: 2;
grid-row: 3;
}

nav {
font-family: "Fira Sans", sans-serif;
}
Expand Down

0 comments on commit b2f45c4

Please sign in to comment.