Open mtisec opened 1 year ago
I found the lines that disable strikethrough on hover of a checked box. It's line 2682-2685 in the current version of the theme.
.markdown-source-view .HyperMD-task-line:is([data-task=x], [data-task=X]):hover,
.task-list-item.is-checked:hover {
text-decoration: unset;
}
and these lines - that seem to be from the original Obsidian CSS - seem to be responsible for the strikethrough:
.markdown-source-view.mod-cm6 .HyperMD-task-line[data-task="x"], .markdown-source-view.mod-cm6 .HyperMD-task-line[data-task="X"] {
text-decoration: line-through;
color: var(--text-faint);
}
I'll try overwriting them with a snippet now and come back here :)
Works like a charm 🤩
Everything necessary was to add the following lines to a snippet and activate it:
/* Disable strike-through in markdown mode */
.markdown-source-view.mod-cm6 .HyperMD-task-line[data-task="x"], .markdown-source-view.mod-cm6 .HyperMD-task-line[data-task="X"] {
text-decoration: unset;
color: var(--text-faint);
}
/* Disable strike-through in preview mode */
ul > li.task-list-item[data-task="x"], ul > li.task-list-item[data-task="X"] {
text-decoration: unset;
color: var(--text-faint);
}
I am not sure if text-decoration: unset;
is the logically best choice, but that's what hovering did.
Trying now to add that to the Style Settings and creating a pull request ❤️
Thank you so much for your contribution! I will be adding this to the Style Settings update after Primary 2.0 is launched.
Hi Cecilia, I freaking love your theme! It is pure perfection! ... with one thing I'd like to change. I wish I could remove the strikethrough from checked boxes. I tried multiple things. Among them was the snippet from https://github.com/Dmytro-Shulha/obsidian-css-snippets/blob/master/Snippets/Check%20box.md
It all doesn't work and I couldn't figure out yet, how the whole Obsidian CSS styling works. I have a bare minimum grasp of CSS, but that's all. I'd love to hear from you with an idea :)
PS: I think it would also be a perfect addition for Style Settings. I often create checklists that I want to export later for others and having my selections striked is really hard to read.