In my daily notes, I will sometimes nest TODO items under one another, for instance if I encounter a new task to track within the context of another task.
I would prefer for the indented bullets and checkboxes underneath a completed task to be not struck through.
Current workaround (optional)
None. I deal with it.
Related feature requests (optional)
In the second screenshot above, I would also like the nested bullet to be rendered as a list item (i.e. with a bullet). But this might be an issue with the theme I’m using rather than Obsidian itself.
Update: I upgraded to 0.9.12 right after posting this and it looks like the nested list item is rendered with a bullet glyph. The indentation is a little odd, though:
It seems it’s not easily possible to remove strikethrough from child elements without removing it from the full block.
But if it’s acceptable - the greyed out color on the parent block will remain - I found a CSS snippet workaround by CurioHeart on reddit, posted here:
.markdown-preview-view ul > li.task-list-item {
/* This is to help center the checkbox with other unordered list items; you may want/need to tweak this value for your current theme */
margin-left: 0.35em;
}
.markdown-preview-view ul > li.task-list-item.is-checked,
.markdown-preview-view ul > li > ul > li.task-list-item.is-checked,
.markdown-preview-view ul > li.task-list-item > ul > li.task-list-item.is-checked {
text-decoration: none;
color: var(--text-faint);
}
.markdown-preview-view ul > li.task-list-item.is-checked > ul > li {
color: var(--text-normal);
}
To use it, create a new text file under vaultFolder/.obsidian/snippets, copy the text in, and save it with .css extension.
Then opening the Obsidian Options, go to Appearance, go down to CSS Snippets section, and enable the file you have created.
Sometimes it’s too hard to read the strikethrough text because of the fat line in the middle:
Proposed solution
Have an option to disable the middle line.
If the option for disabling the middle line is enabled:
Upon checking a checkbox, everything should be the same as it currently is, including dimming the text, but just hide the strikethrough line.
Hmm, interesting. But that only works when I type the character. I’m looking for a way to have this functionality when checking the box with my cursor.
By the way, if you are like me and like the strikethrough look for finished tasks, but sometimes want to be able to read it clearly, you could add the :hover function.
This way, unless you are hovering the task, it will still have that strikethrough.
/* <<------------- Hide Strikethrough in Reading View ----------------->> */
.markdown-preview-view ul>li.task-list-item:hover {
text-decoration: none;
}
/* <<------------- Hide Strikethrough in LIVE PREVIEW ----------------->> */
.markdown-source-view.mod-cm6 .HyperMD-task-line[data-task="x"]:hover {
text-decoration: none;
}
Since these haven’t been updated in over a year (and don’t support Live Preview), here are my updates (for Obsidian v1.0.2) on the default theme.
Also, it doesn’t make that much sense to me to have ? and ! interpreted as “question” or “important”. New types of checkboxes should be sub-classes of “done” since other markdown processors will treat them as done.
Sorry, just saw your question. Maybe you’ve found it out by now, but here I go anyways:
You create a textfile with the CSS code and give the file a title + .css (e.g.: Checkboxes.css).
You put that file into the snippets folder (Vault/.obsidian/snippets). If the snippets folder does not exist yet, simply create it.
Now you can activate your snippet in Obsidian under Settings -> Appearance -> CSS snippets.