fix text color and highlight

This commit is contained in:
Philipinho
2026-08-14 01:27:04 +01:00
parent 06d7e24676
commit 8ba4792e25
8 changed files with 83 additions and 6 deletions
+3 -1
View File
@@ -16,9 +16,11 @@ export const Highlight = TiptapHighlight.extend<HighlightOptions>({
return {};
}
// --mark-bg lets CSS derive a legible dark-mode variant for
// arbitrary (imported) colors.
return {
"data-color": attributes.color,
style: `background-color: ${attributes.color}; color: inherit`,
style: `background-color: ${attributes.color}; --mark-bg: ${attributes.color}; color: inherit`,
};
},
},