Skip to content

Commit 07169c8

Browse files
authored
css: adjust sidebar line height to improve readability (#1045)
* css: adjust the line height to improve readability When a heading is long, it will be word-wrapped. The current value of line-height is very high, causing lines that are word-wrapped to appear as new items. The fix is to reduce the line-height, and instead use padding as a way to distance items apart.
1 parent a60e987 commit 07169c8

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

CHANGES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ Tags:
2929
### Changed
3030
- Style: Remove font fallback to Helvetica, Arial (@Julow, #1028)
3131

32+
### Changed
33+
- Style: Adjusted line height in the TOC to improve readability (@sorawee, #1045)
34+
3235
# 2.3.0
3336

3437
### Added

src/html_support_files/odoc.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ td.def-doc *:first-child {
779779
font-size: 0.95em;
780780
color: var(--color);
781781
font-weight: 400;
782-
line-height: 1.6em;
782+
line-height: 1.2em;
783783
display: block;
784784
}
785785

@@ -1070,14 +1070,15 @@ td.def-doc *:first-child {
10701070

10711071
.odoc-toc li ul {
10721072
margin: 0px;
1073+
padding-top: 0.25em;
10731074
}
10741075

10751076
.odoc-toc ul {
10761077
list-style-type: none;
10771078
}
10781079

10791080
.odoc-toc ul li {
1080-
margin: 0;
1081+
padding: 0.25em 0;
10811082
}
10821083

10831084
.odoc-toc>ul>li {

0 commit comments

Comments
 (0)