Missing Stylesheet documentation

Perhaps I’m not looking in the right place, but the Stylesheet documentation is missing some elements. To name one example: I had to read through a few stylesheets before I figured out that lead is the attribute for the task markup in TaskPaper.

Is there any other place I could read up on TaskPaper’s stylesheet format? For instance, I’m unsure what the different between item and run elements is. Thanks!

I just added some additional documentation here:

https://www.taskpaper.com/guide/reference/stylesheets/

Adding to lead there is also tagname ,tagvalue, and content. I “think” that’s it.

It’s intended to represent the same idea as styling an html paragraph that has span elements in it. For example:

<p class="item">
  Hello <span class="span">World</span>
</p>

So if you style an “item” that style will apply to all of the items text. On the other hand if you style a “span” it will only apply to the text covered by that span.

Note that TaskPaper isn’t using HTML in the implementation, so behavior might not match exactly what you see in HTML styling, but it tries to be similar and borrow similar ideas.

Jesse

1 Like

@jessegrosjean I think the item’s attribute filtered is missing too. It should be listed along focused, expanded, collapsed, empty, etc.

Thanks I added this. I actually added it right after you asked, but for some reason one of the website caches for the documentation site seems to be very aggressive, didn’t notice that the page updated until today.

Hi Jesse, thanks for adding this documentation. I can’t seem to get the content attribute working. For instance, I want to style notes that start with >> differently. I’m trying to do this with variations of run[content=">>"], run[content^=">>"] etc and none seem to be working.

Is matching the actual text content of the content attribute supported?

This isn’t possible in current TaskPaper release.

I think before I’ve said that it wasn’t possible to add this sort of styling to TaskPaper, but now I’m wondering why I thought that. Actually seems pretty easy to add. I will try to release a new TaskPaper preview next week that adds this styling ability and will see if it works OK.

2 Likes