update TOC to not be absolute

This commit is contained in:
2026-05-31 21:26:44 +00:00
Unverified
parent 435e8a8a3f
commit 09f519ae63

View File

@@ -21,25 +21,20 @@ main .container {
@media (min-width: 1280px) {
.single-post-wrapper {
display: block; /* Turns off Flexbox completely */
display: flex;
flex-direction: row;
gap: 2rem;
}
#main-content {
/* Standard block behavior: automatically centers prose within wrapper */
display: block;
flex-grow: 1;
min-width: 0;
}
#sidebar-toc {
/* Removes the TOC from document flow entirely */
position: absolute;
top: 0;
/* Math: Center of wrapper (50%) + half the prose width (32.5ch) + 2rem gap */
left: calc(50% + 32.5ch + 2rem);
/* The aside needs to be exactly 100% height of the wrapper for sticky to work */
height: 100%;
width: 256px;
position: static;
flex: 0 0 256px;
height: auto;
}
}