Skip to content

Commit

Permalink
fix: proper strikethrough in navigation for Fifefox #3156 (#3436)
Browse files Browse the repository at this point in the history
(cherry picked from commit d416612)
  • Loading branch information
berezinant authored and IgnatBeresnev committed Jan 11, 2024
1 parent 809bfb7 commit 5324006
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
Expand Up @@ -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 {
Expand Down
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5324006

Please sign in to comment.