How exactly does Obsidian determine the state of a checkbox?

I really appreciate Obsidian’s styling of incomplete

  • [ ]

and complete

  • [X]

Markdown checkboxes.

Sometimes, though, I like to add a different character inside the square brackets to something that is in progress, like this:

  • [~]

But Obsidian seems to interpret any string “- [.]” as a completed checkbox, where . is any character. So when I unfocus from the checkbox, - [~] and - [X] are indistinguishable.

Can anyone help me understand how this behavior is implemented by Obsidian?

My first thought was to write a custom CSS snippet for checkboxes. But the examples I’ve seen depend on the :checked state. It seems that Obsidian is reading any string “- [.]” as input[type=checkbox]:checked. So the issue seems to be pre-CSS in nature.

Some themes have a special css for that (you need to use the defined syntax). For example, Minimal by @kepano: Checklists - Minimal Documentation

1 Like

Thank you, that’s a nice feature. How does the theme identify the “- [.]” elements to which it applies styling?

Have a look at the corresponding css.

If you don’t want to change themes, take a look at this CSS snippet: Option to disable strikethrough for checked todo items - #10 by obsequious