Theme Question - how to target tags (only) in notes


#1

Hello,

I sometimes use tags within my notes, for which I use a smaller font size. The tags, on the other hand, always have the standard font size. In the theme file, is there a way to target tags in notes items only? I could not find a working approach.

Best regards,
frevo


#2

I think this will do what you want:

item[data-type=note] {
  font-size: 10;
  > run[tag] {
    font-size: 10;
  }
}

The reason that you need to do this is because the default stylesheet specifically sets tag size (so they stay body text size even if headers are made larger). So the above just explicitly sets the tag size when within a note.


#3

Thank you very much! Maybe it’s helpful to add such an example to the guide? Enjoy your weekend!