Tasks and Checklists

I have tasks in my Obsidian vault in relevant notes and I also have checklists in the notes.

Issue:
I want to differentiate between them when I check them off.

Explanation:

  • Tasks are things to be completed. They can be “strike-through” on completion as we do not want to read them again. Also, strike-through looks nice in the note as it signifies we have done it. But checklists are not tasks. They may be used as radio buttons or multi-select buttons in the note. For example, I may have a checklist in the template which then I select from in my actual note.
  • However, if I use any theme that supports automatically marking checked item as strike-through, then it also marks the checklists the same way.
  • I am able to configure tasks with a specific keyword to only keep tasks with that keyword for the purpose of plugin ‘Tasks’. But similar kind of differentiation is not available for checklists.

What should I do to achieve this?

Did you try any of the plugins? There are a few, but only I notice one that doesn’t strike through text when done (per image, didn’t try plugin).

Maybe you can use something like that.

Cheers, Marko :nerd_face:

Four options come to mind.

1
What about choosing a status character that’s not in use by your theme? For example, if the full stop (.) is available, then when you use it like this…

- [.] Checked but not crossed out

… do you see a check in the box without crossing out the text? (It doesn’t have to be a period/full stop. It could be some other character.)

2
But if your theme crosses out tasks even for status characters that aren’t reserved, then maybe say which theme you’re using, and someone can write a snippet to not cross our your chosen status character.

3
On the other hand, if you need to click with a mouse instead of type, you could use a CSS class that you apply to notes which contain the type of checklist you’re talking about. You could make it so that all checkboxes in those notes don’t get crossed out when they’re checked. Tasks in other notes will continue to follow your theme’s behavior.

4
You might be able to tag individual lists or individual list items, and use CSS to keep those from getting crossed out. (I think this wouldn’t be difficult to write and have done it for similar list styling but not specifically checkboxes, but I don’t want to “promise” since I haven’t tried it yet. It might involve something called a has pseudo class, which might slow down your Obsidian experience.)

?
Or do you mean something else?

If you want help with any of these options, it could help to say which theme you’re using.

Your options 3 and 4 are promising to my use case! Though I am not technical so I don’t know how to write that css. Can you guide me on that?

Adding a css class for a specific note would be cool! For each task with a tag, may be, I will explore this one…

This can get you started with making a CSS class. It already works in the default theme and might work in your setup as is.

  1. Use this snippet (how to use snippets):
.checklist ul > li.task-list-item[data-task="x"],
.checklist .HyperMD-task-line[data-task="x"] {
	--checklist-done-color: var(--text-normal);
	--checklist-done-decoration: initial;
}
  1. Add the cssclasses property to one of your checklist notes, and type checklist into it:

Here’s how it looks in the default theme. The left side is a normal task list. The right side has the checklist class:

Hi! When utilizing plugins, make sure that tasks are tagged with unique keywords such as “TODO” or “TASK” to distinguish them. Instead of using themes that strike through items automatically, mark work as finished by hand. Use checkboxes or visual differentiation to set templates apart. To keep tasks and checklists clear, adjust plugins or CSS settings.