Skip to content

Commit 293cd13

Browse files
committed
style first paragraph in content
1 parent cfc4f72 commit 293cd13

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

scaladoc/resources/dotty_res/styles/theme/layout/content.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@
150150
color: var(--text-primary);
151151
}
152152

153+
/* content first paragraph */
154+
#content .first-p {
155+
color: var(--text-secondary);
156+
}
157+
153158
/* content list */
154159
#content li {
155160
color: var(--text-primary);

scaladoc/src/dotty/tools/scaladoc/renderers/SiteRenderer.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ trait SiteRenderer(using DocContext) extends Locations:
7878
}
7979
}
8080

81+
document.select("header + p").forEach(firstParagraph =>
82+
firstParagraph.addClass("body-large")
83+
firstParagraph.addClass("first-p")
84+
)
8185
document.select("a").forEach(element =>
8286
element.attr("href", processLocalLinkWithGuard(element.attr("href")))
8387
)

0 commit comments

Comments
 (0)