Reset styles when focused in?


I’m trying to create a stylesheet that will colour my items based on indentation level. Items up to level 5 have specific colours, anything beyond level 5 is red. This is to indicate items that cannot be parsed to Things3 using Drafts.

I have legacy outlines that go beyond level 5 but would still benefit from this. The problem is when I focus in, they remain red. I would hate to copy-paste them into a new file just to see the parsing logic for Things3. Is there a way to ‘reset’ the styling when I focus in on an item?

Also, is there an easy way to tell TP to colour anything beyond a certain level red? I’ve tried >= variants, but they don’t seem to work.

A simple example of what I mean:

I don’t think this is possible now.

I very recently shared TaskPaper source code for license holders:

I think this type of styling would be possible with a small change:

// BirchEditor/birch-editor.js/src/
getComputedStyleKeyPathForItem: (item) ->
  attributes = Object.assign({}, item.attributes ? {})
  attributes['depth'] = item.depth
  attributes['focusDepth'] = item.depth - (@focusedItem?.depth ? 0) // add this line

Anyone game to try to make this change and submit a pull request to the TaskPaper repository?


1 Like