fix: Code comment and comment marker classes clash

This commit is contained in:
Tom Moor
2023-03-05 17:53:53 -05:00
parent b795c992fe
commit f9709897fe
2 changed files with 5 additions and 5 deletions

View File

@@ -563,7 +563,7 @@ h6 {
opacity: 1;
}
.comment {
.comment-marker {
border-bottom: 2px solid ${transparentize(0.5, props.theme.brand.marine)};
transition: background 100ms ease-in-out;
cursor: pointer;
@@ -1463,7 +1463,7 @@ del[data-operation-index] {
display: none;
}
.comment {
.comment-marker {
border: 0;
background: none;
}

View File

@@ -21,10 +21,10 @@ export default class Comment extends Mark {
userId: {},
},
inclusive: false,
parseDOM: [{ tag: "span.comment" }],
parseDOM: [{ tag: "span.comment-marker" }],
toDOM: (node) => [
"span",
{ class: "comment", id: `comment-${node.attrs.id}` },
{ class: "comment-marker", id: `comment-${node.attrs.id}` },
],
};
}
@@ -88,7 +88,7 @@ export default class Comment extends Mark {
mousedown: (view, event: MouseEvent) => {
if (
!(event.target instanceof HTMLSpanElement) ||
!event.target.classList.contains("comment")
!event.target.classList.contains("comment-marker")
) {
return false;
}