rien7 / obsidian-colorful-tag

Make your tag more beautiful and powerful!
Apache License 2.0
126 stars 3 forks source link

Add overwrite option on tag #8

Closed KingOfSpades closed 1 year ago

KingOfSpades commented 1 year ago

It would be great if the plug-in allowed a tag to be completely overwritten. I already do this with custom CSS in my Obsidian.

For example, to change the tag: #Type/Note in to 📝 I use:

/* Makes the tag empty */
.tag[href="#Type/Note"] {
  font-size: 0;
  padding: 0;
}

/* Fills it with the new content */
.tag[href="#Type/Note"]::before {
  padding-right: 0.5em;
  font-size: 8pt;
  font-weight: 700;
  background-color: rgb(165, 29, 42);
  color: rgb(232, 230, 227);
  padding: 4px 4px 4px 4px;
  border-radius: 5px;
  content: "📝 ";
}