Skip to content

Commit

Permalink
fix: improve line breaking in ToC CSS (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
david-christiansen authored Jul 17, 2024
1 parent 93af241 commit a139de2
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions static/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,51 @@ figcaption {
/* Different color for information */
.information pre, .information code {
border-color: var(--lean-blue);
}

/* TODO: consider upstreaming, but also consider doing section numbering server-side */

#toc ol li::before {
text-align: right;
padding-right: 0.5ex;
}

#toc li > ol {
padding: 0;
}

#toc > ol > li::before {
width: 1.5em;
position: absolute;
left: -1.5em;
box-sizing: border-box;
}

#toc > ol > li {
margin-left: 1.5em;
position: relative;
}

#toc > ol > li > ol > li::before {
width: 2.25em;
position: absolute;
left: -2.25em;
box-sizing: border-box;
}

#toc > ol > li > ol > li {
margin-left: 2.25em;
position: relative;
}

#toc > ol > li > ol > li > ol > li::before {
width: 2.75em;
position: absolute;
left: -2.75em;
box-sizing: border-box;
}

#toc > ol > li > ol > li > ol > li {
margin-left: 2.75em;
position: relative;
}

0 comments on commit a139de2

Please sign in to comment.