aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt9
-rw-r--r--plugins/base/src/main/resources/dokka/styles/style.css5
2 files changed, 11 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
index 50af53f0..dc211502 100644
--- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
@@ -74,7 +74,7 @@ open class HtmlRenderer(
node.extra.extraHtmlAttributes().forEach { attributes[it.extraKey] = it.extraValue }
childrenCallback()
}
- node.dci.kind in setOf(ContentKind.Symbol, ContentKind.Sample) -> div("symbol $additionalClasses") {
+ node.dci.kind in setOf(ContentKind.Symbol) -> div("symbol $additionalClasses") {
childrenCallback()
if (node.hasStyle(TextStyle.Monospace)) copyButton()
}
@@ -548,8 +548,11 @@ open class HtmlRenderer(
code: ContentCode,
pageContext: ContentPage
) {
- code(code.style.joinToString(" ") { it.toString().toLowerCase() }) {
- code.children.forEach { buildContentNode(it, pageContext) }
+ div("sample-container") {
+ code(code.style.joinToString(" ") { it.toString().toLowerCase() }) {
+ attributes["theme"] = "idea"
+ code.children.forEach { buildContentNode(it, pageContext) }
+ }
}
}
diff --git a/plugins/base/src/main/resources/dokka/styles/style.css b/plugins/base/src/main/resources/dokka/styles/style.css
index db42e3c0..bec590e6 100644
--- a/plugins/base/src/main/resources/dokka/styles/style.css
+++ b/plugins/base/src/main/resources/dokka/styles/style.css
@@ -212,6 +212,11 @@
font-family: monospace;
}
+.sample-container {
+ display: flex;
+ flex-direction: column;
+}
+
code.paragraph {
display: block;
}