Draw floating table-of-contents on the right when possible.

This commit is contained in:
Sergio Martínez Portela 2023-04-28 00:05:40 +02:00
parent 61b1b79f95
commit 5ae3be6d0f

View File

@ -462,6 +462,21 @@ tr.__table-separator {
border-bottom: 0.5ex solid black;
}
/* Side-to-side */
@media (min-width: 120ex) {
body {
margin: 0;
}
.global-table-of-contents {
position: fixed;
right: 1ex;
max-width: calc(100vw - 85ex);
top: 1ex;
overflow: auto;
max-height: 100vh;
}
}
/* Dark mode. */
@media (prefers-color-scheme: dark) {
html {