Css color by file type

By using this css code I can set the color of file in the navigation panel:

.nav-file-title-content{
color: Tomato;
}

But I would like the markdown files to have a different color than the other files. So that any file that ends in .md will have a certain color different from other files. Is that even possible?

1 Like

Try this:

.nav-file-title[data-path$=".md"] .nav-file-title-content {
  color: Tomato;
}
3 Likes

That worked. Thank you again. :smile:

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