Checkbox without strikethrough?

Is it possible to configure Obsidian so that checking a checkbox does NOT render the rest of the paragraph in strikethrough? There are times when I want to clearly see the text of the completed items in a to-do list.

5 Likes

I just found out that the recent Insiders release makes it so that any fill character other than ‘x’ in the checkbox will check the box without the strikethrough!

  • [ ] unchecked - [ ] unchecked
  • [x] checked - [x] checked
  • [v] checked - [v] checked, no strikethrough
8 Likes

But then there should also be an option to check a checkbox with an X or a V. So you can set the default behaviour. I do not have insider release … is that option there?

2 Likes

Unfortunately, no. So it’s not a complete solution if you want to simply mouse click to complete an item. But at least if you’re willing to type the ‘v’ (or whatever) in the right place, you can make it subsequently display the fact that it’s checked but still have the details of the item be fully readable.

1 Like

In the Night Owl theme it doesn’t use a strikethrough it changes the color of the text, kind of nice that way.

Edit: Just notice while on my desktop it works as I mentioned above, however on my Android it still does the strikethrough. Didn’t know that because I had been running the default theme on my mobile, just switched to Night Owl this morning.

1 Like

Not sure if this helps, but this is a CSS snippet for the - [v] to work:

v-checkbox-no-strike-through.css (74 Bytes)

this snipit did not work for me. fyi

Can you show me the HTML tag of the checkbox?
You can do this using the inspector tool (ctrl+shift+i)

If you don’t know how this works, I explained it here:

This way I can see the class of your checkbox and modify the snippet.

I’m looking for a screenshot like this:

I also would like a global setting to remove the strikethrough from checkbox text. My daily template has checkboxes for items I add detailed text to after completion. I don’t want that text obscured.

3 Likes

Hi folks,

If you are using version 1.0 and default theme, this CSS snippet will work for you!

You can continue using checkboxes as you normally do.

Regards!

checkbox-no-strikethrough.css (183 Bytes)

1 Like

See also Option to disable strikethrough for checked todo items

Thanks for attaching, but it did not work for me

I’ve solved it by putting the following in a css snippet (Settings->Appearance->CSS snippets):

body {
  --checklist-done-decoration: none;
}

I tried putting the var in :root first, but that didn’t work.

If you’d like to change the color of checked items, add --checklist-done-color as well. It’s default set to the var --text-muted.

I personally prefer this to the solution proposed in Option to disable strikethrough for checked todo items

6 Likes

thx, it’s really work.

This worked perfectly – thank you!

1 Like