aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2022-07-27 10:25:16 +0200
committerGitHub <noreply@github.com>2022-07-27 10:25:16 +0200
commitf4d2bf40e7b7e62aeb27bf0f1cabe53e35e68fd2 (patch)
tree4824ee6bdac39f6313d7e3d78f9b51df92737eae /plugins/base/src/main
parent838ec1b30de400f83accfbbf1b28920c0b4ae237 (diff)
downloaddokka-f4d2bf40e7b7e62aeb27bf0f1cabe53e35e68fd2.tar.gz
dokka-f4d2bf40e7b7e62aeb27bf0f1cabe53e35e68fd2.tar.bz2
dokka-f4d2bf40e7b7e62aeb27bf0f1cabe53e35e68fd2.zip
Disable copy button for signatures (#2577)
* Disable copy button for signatures
Diffstat (limited to 'plugins/base/src/main')
-rw-r--r--plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt7
-rw-r--r--plugins/base/src/main/resources/dokka/styles/style.css9
2 files changed, 7 insertions, 9 deletions
diff --git a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
index 9be7428a..30ae0562 100644
--- a/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
+++ b/plugins/base/src/main/kotlin/renderers/html/HtmlRenderer.kt
@@ -95,7 +95,6 @@ open class HtmlRenderer(
}
node.dci.kind in setOf(ContentKind.Symbol) -> div("symbol $additionalClasses") {
childrenCallback()
- if (node.hasStyle(TextStyle.Monospace)) copyButton()
}
node.hasStyle(TextStyle.BreakableAfter) -> {
span { childrenCallback() }
@@ -472,9 +471,9 @@ open class HtmlRenderer(
div {
it.build(this, pageContext, sourceSetRestriction)
}
- if (it is ContentLink && !anchorDestination.isNullOrBlank()) buildAnchorCopyButton(
- anchorDestination
- )
+ if (it is ContentLink && !anchorDestination.isNullOrBlank()) {
+ buildAnchorCopyButton(anchorDestination)
+ }
}
}
}
diff --git a/plugins/base/src/main/resources/dokka/styles/style.css b/plugins/base/src/main/resources/dokka/styles/style.css
index b3749e73..ad8569ea 100644
--- a/plugins/base/src/main/resources/dokka/styles/style.css
+++ b/plugins/base/src/main/resources/dokka/styles/style.css
@@ -341,15 +341,15 @@ code.paragraph {
cursor: pointer;
}
-.symbol span.copy-icon, .sample-container span.copy-icon {
+.sample-container span.copy-icon {
display: none;
}
-.symbol:hover span.copy-icon, .sample-container:hover span.copy-icon {
+.sample-container:hover span.copy-icon {
display: inline-block;
}
-.symbol span.copy-icon::before, .sample-container span.copy-icon::before {
+.sample-container span.copy-icon::before {
width: 24px;
height: 24px;
display: inline-block;
@@ -362,7 +362,7 @@ code.paragraph {
background-color: var(--copy-icon-color);
}
-.symbol span.copy-icon:hover::before, .sample-container span.copy-icon:hover::before {
+.sample-container span.copy-icon:hover::before {
background-color: var(--copy-icon-hover-color);
}
@@ -399,7 +399,6 @@ code.paragraph {
left: -15em;
}
-.symbol:hover .copy-popup-wrapper.active-popup,
.sample-container:hover .copy-popup-wrapper.active-popup {
display: flex !important;
}