Strikethrough Elimination, How

I am trying on new ways of laying out my TaskPaper design. I am attempting to kill the strikethrough text on done items. This is turning out to be harder than it seems.

I am using a modified version of DarkTheme. First, I commented out the code that DarkTheme uses to customize the strikethrough line:

item[data-done] {
paragraph-spacing-before: 1;
paragraph-spacing-after: 1;
font-size: 22;
font-family: times;
color: mix(orange,white, 50%);

// > run[content] {
// text-strikethrough: NSUnderlineStyleDouble;
// text-strikethrough: NSUnderlineStyleSingle;
// text-strikethrough- color: mix(black, white, 90%);
// }
}

But, this left a default white line text strikethrough. It did not eliminate the strikethrough text decoration. Then I reasoned, this must be set in the base-stylesheet file in the TaskPaper/Contents/Resources folder. So, I tried commenting out any mention of text strikethrough in that file:

// item[data-done] {
// > run[content] {
// text-strikethrough: NSUnderlineStyleSingle;
// text-strikethrough-color: @text-color;
// }
// }

I still end up with a default white line as strikethrough text decoration on any done item. All I can do is to color it as neutral a grey as I can to make it less noticeable but, is there a way to get rid of this text decoration? I am not suggesting that this will be a permanent change. I am only trying to suppress this feature to see if I like it that way. I want to still easily read my done items so I am trying them out using a different font, color, etc.

I’m not sure about how things interact in your custom stylesheet. But if you create a stylesheet with this single rule then it will stop showing strikethrough for done items:

item[data-done] {
  > run[content] {
    text-strikethrough: none;
  }
}
2 Likes

Brilliant Jessie, thanks. Curious, was I at all on the right track to go to the base-stylesheet less file to try and correct this? I don’t mean that your solution ended up connected with my logic, I am asking if there is any sort of hierarchy using less files so that if something is not being modified on a DarkTheme or on another custom less file, then would it ever be helpful to look at the base-stylesheet which is read first by default? Perhaps the base-stylesheet is essentially meaningless once I have set a different custom stylesheet? Just wanting to understand.

This is just for future reference and my understanding of how this works a little better. I know that a style sheet reads from top to bottom (for example). Meaning, if I have more than one tag or condition affecting an item, then it will be the last one read in the less file that is going to apply. I am curious if there is a similar hierarchy which would explain why the strikethrough line was put in (for example) and had to be set to none?

In theory you could change it by modifying the built in base stylesheet. But I would recommend against it, because then in the future it would mean that your setup would be different then everyone else, so you could safely use other peoples stylesheets, they couldn’t user yours, problems that you might have wouldn’t necessarily show up the same on other peoples computers. Better to just override what you don’t want in your own custom stylsheet.

Yes but … that is what I was saying, that I did comment out the strikethough text embellishment in the base-stylesheet and in the custom style sheet - but it was still there. It is something of a moot point now as your suggestion to kill it worked perfectly.

I suppose that it makes the most sense as you suggested to know the code for custom outputs a little better. I agree that keeping the community on a level playing field so to speak is a good idea.

Although I think I have heard you say before that certain elements above the stylesheet have been updated on rare occasions and when that happens it affects your results. Perhaps you were referring to a custom base-stylesheet? I am only asking to improve my understanding of how it works.