Callouts: how to remove strikethrough for checked items?

What I’m trying to do

Is it possible to prevent checked list items in a callout or ``` block from being struck out?

Things I have tried

There are quite a few snippets around for removing the strikethrough (and possible the color change), but checked list items in callouts remain struck out. Here is an example of what can be found (and works only for checked items that are on the top level of the document, not inside callouts):

.markdown-preview-view ul > li.task-list-item.is-checked,                       
.markdown-source-view.mod-cm6 .HyperMD-task-line[data-task]:not([data-task=" "]) {
  text-decoration: none;                                                        
  color: var(--text-normal);                                                    
}       

The below should work (tested with the default theme) for getting rid of the strikethrough in callouts. Completed tasks, - [x] , in code blocks already have no decoration, so shouldn’t need any alteration.

:is(ul > li.task-list-item.is-checked, callout) {
    text-decoration: none;
    color: var(--text-normal);
}

Screenshot 2023-03-09 075129

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.