Skip to content

Commit

Permalink
add vertical toc
Browse files Browse the repository at this point in the history
  • Loading branch information
ShellTux committed May 6, 2024
1 parent c75d3c8 commit b4c94c2
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions assets/css/extended/toc.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
.toc {
padding: 14px;
border: solid 1px lightgray;
font-size: 16px;
}

@media (min-width: 1280px) {
.toc {
position: sticky;
float: left;
--toc-left: calc(100vw / 50);
left: var(--toc-left); /* _minimum_ distance from left screen border */
top: 100px;
margin-left: -1000px; /* overruled by left */

width: calc((100vw - var(--main-width) - 2 * var(--gap)) / 2 - 2 * var(--toc-left));
padding: 14px;
border: solid 1px lightgray;
font-size: 16px;
}

.toc .inner {
padding: 0;
}

.toc details summary {
margin-inline-start: 0;
margin-bottom: 10px;
}

}

tr {
vertical-align: baseline;
}


summary {
cursor: pointer !important;
}

.clearright {
clear: right;
}

0 comments on commit b4c94c2

Please sign in to comment.