Keyword color in Frontmatter

how can I have colored keys in the Frontmatter?


author: Simenon

… and I want the key “author” with a color.

Watching some videos on YouTube I have noted that it is possible but I don’t know how I can do it.
Can someone help me?

Using css classes.

Type in editor (in template):

<span class="colored-key">author</span>

Put in MyVault/.obsidian/snippets/colored-key.css:

.colored-key {
	color: red;
	<!-- any other style here -->
1 Like

Unfortunately, you can’t use a span class in YAML (the HTML won’t render):

but you could try some CSS to color specific elements of it:

1 Like

Yes, it works!
Thanks a lot :heart:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.