Skip to content

Commit

Permalink
Move the sidebar to be stuck to left of the content
Browse files Browse the repository at this point in the history
  • Loading branch information
EmileTrotignon committed Sep 15, 2023
1 parent b9ee75a commit 2166c29
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 19 deletions.
38 changes: 30 additions & 8 deletions src/html_support_files/odoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -253,17 +253,36 @@ body {
}

body.odoc {
max-width: 100ex;
max-width: 122ex;
display: grid;
grid-template-columns: 28ex 90ex;
column-gap: 4ex;
}

body.odoc-src {
margin-right: calc(10vw + 20ex);
}

.odoc-content {
grid-row: 2;
}

.odoc-content > *:first-child {
/* This make the first thing in the content align with the sidebar */
padding-top: 0;
margin-top: 0;
}

header {
margin-bottom: 30px;
}

header.odoc-preamble {
grid-column-start: 1;
grid-column-end: 3;
grid-row: 1;
}

nav {
font-family: "Fira Sans", Helvetica, Arial, sans-serif;
}
Expand Down Expand Up @@ -740,18 +759,16 @@ td.def-doc *:first-child {
}

.odoc-toc {
position: fixed;
top: 0px;
bottom: 0px;
left: 0px;
max-width: 30ex;
min-width: 26ex;
width: 20%;
width: 28ex;
background: var(--toc-background);
overflow: auto;
color: var(--toc-color);
padding-left: 2ex;
padding-right: 2ex;
grid-row: 2;
height: fit-content;
border: solid 1px var(--border);
border-radius: 5px;
}

.odoc-toc ul li a {
Expand Down Expand Up @@ -817,6 +834,11 @@ td.def-doc *:first-child {
body {
margin: 2em;
}

body.odoc {
display: block;
}

.odoc-toc {
position: static;
width: auto;
Expand Down
Loading

0 comments on commit 2166c29

Please sign in to comment.