Possibility to give tags a color


#1

Is there a possibility to give some tags special colors to emphasize them e.g. @urgent ?


#2

Update I’ve added a FAQ for this: How do I theme tags and tag values.

There are two ways you can color by tag right now. Assuming you have the tag @demo in your list.

This will set the base color for the line containing the tag:

item[data-demo] {
  color: red;
}

This will set the tag text’s actual color:

run[tag="data-demo"] {
  color: green;
}

Make sure to put these at the end of your user.less file so that they override earlier rules.


#3

Great Tip. That is exact, what I was looking for. Can I style a project heading also?


#4

This is the rule that bolds projects from the default user.less file:

item[data-type=project] {
  font-weight: bold;
}

You can change/add new styles as you see fit.


#5

Thank you. That worked well for font-size, but I could not get a margin-top or padding-top working.


#6

TaskPaper uses LESS/CSS syntax for styling, but it’s a native app with no web view. So the target elements and style attributes are very limited compared to what you would have in a HTML/DOM setup. TaskPaper doesn’t support any margin or padding attributes.


#7

Is there any way to colour tags in FT?


#8

I was expecting

item[data-type="project"] {
  font-family: "Menlo";
  font-weight: bold;
}

to style projects with a different font but it’s not working.

Any clues ?


#9

Looks like there’s a bug reading quoted values… it will work if you remove the quotes around Menlo I think.


#10

You’re right. It should also be noted that it works even with fonts having a space in its name.
Cheers.