Skip to content

Commit 5324006

Browse files
berezinantIgnatBeresnev
authored andcommitted
fix: proper strikethrough in navigation for Fifefox #3156 (#3436)
(cherry picked from commit d416612)
1 parent 809bfb7 commit 5324006

File tree

2 files changed

+21
-1
lines changed
  • dokka-subprojects/plugin-base/src/main

2 files changed

+21
-1
lines changed

dokka-subprojects/plugin-base/src/main/kotlin/org/jetbrains/dokka/base/renderers/html/NavigationPage.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public class NavigationPage(
7777

7878
private fun FlowContent.nodeText(node: NavigationNode) {
7979
if (node.styles.contains(TextStyle.Strikethrough)) {
80-
strike {
80+
strike(classes = "strikethrough") {
8181
buildBreakableText(node.name)
8282
}
8383
} else {

dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,26 @@ code.paragraph {
686686
text-decoration: line-through;
687687
}
688688

689+
/* Workaround for Firefox https://github.com/Kotlin/dokka/issues/3156 */
690+
@-moz-document url-prefix() {
691+
.strikethrough {
692+
position: relative;
693+
text-decoration: none;
694+
}
695+
696+
/* complex selectors here are required to handle multiline cases */
697+
.strikethrough::after, .strikethrough span:after {
698+
content: '';
699+
position: absolute;
700+
top: 7px;
701+
left: 0;
702+
right: 0;
703+
height: 1px;
704+
background-color: currentColor;
705+
z-index: 1;
706+
}
707+
}
708+
689709
.symbol:empty {
690710
padding: 0;
691711
}

0 commit comments

Comments
 (0)