Skip to content

Commit f85cf5c

Browse files
Earlopainst0012
andauthored
Aliki: Add padding to TOC (#1481)
I'm unsure if rdoc uses this somewhere but here is how it looks like on https://docs.ruby-lang.org/en/master/String.html <img width="348" height="637" alt="image" src="https://github.com/user-attachments/assets/c60cd491-1dee-448e-b2eb-01cd85c5c6ed" /> In #1479 I wrote about it not being formatted. Since the TOC is generated via javascript, that seems a bit difficult to fix. But I'm unsure if that is even needed. What was bothering me was that there was no connection between the "What's Here" and its subsections. This fixes that in a pretty simple way. Co-authored-by: Stan Lo <stan001212@gmail.com>
1 parent 52c1363 commit f85cf5c

File tree

1 file changed

+8
-0
lines changed
  • lib/rdoc/generator/template/aliki/css

1 file changed

+8
-0
lines changed

lib/rdoc/generator/template/aliki/css/rdoc.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,6 +1318,14 @@ aside.table-of-contents .toc-sticky nav {
13181318
height: auto;
13191319
}
13201320

1321+
aside.table-of-contents .toc-list > .toc-h2 {
1322+
margin-left: var(--space-4);
1323+
}
1324+
1325+
aside.table-of-contents .toc-list > .toc-h3 {
1326+
margin-left: var(--space-8);
1327+
}
1328+
13211329
/* Hide TOC on mobile/tablet */
13221330
@media (width <= 1279px) {
13231331
aside.table-of-contents {

0 commit comments

Comments
 (0)