diff --git a/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/NavigationPage.kt b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/NavigationPage.kt index eae43daff6..6d2967eb09 100644 --- a/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/NavigationPage.kt +++ b/dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/NavigationPage.kt @@ -77,7 +77,7 @@ public class NavigationPage( private fun FlowContent.nodeText(node: NavigationNode) { if (node.styles.contains(TextStyle.Strikethrough)) { - strike { + strike(classes = "strikethrough") { buildBreakableText(node.name) } } else { diff --git a/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css index 5689590824..34d42f5154 100644 --- a/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css +++ b/dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css @@ -686,6 +686,26 @@ code.paragraph { text-decoration: line-through; } +/* Workaround for Firefox https://github.com/Kotlin/dokka/issues/3156 */ +@-moz-document url-prefix() { + .strikethrough { + position: relative; + text-decoration: none; + } + + /* complex selectors here are required to handle multiline cases */ + .strikethrough::after, .strikethrough span:after { + content: ''; + position: absolute; + top: 7px; + left: 0; + right: 0; + height: 1px; + background-color: currentColor; + z-index: 1; + } +} + .symbol:empty { padding: 0; }