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?

Try this:

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

That worked. Thank you again. :smile:

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