Embed tags

I don’t understand your question.

The snippet will hide the tags in preview mode, not in edit mode (which makes sense, as you would still want to see your source code somewhere…).

If it doesn’t hide your tags even in preview mode, it might possibly conflict with some other css…

  • Which theme and/or custom css are you using?
  • Can you paste the snippet you saved as custom css?


Deactivate “Apply custom css” - this is the old way of using custom styles. You can still use that, but it conflicts with the css snippets - so: either custom css or snippets!

nope that’s not doing anything.
re opened the app as well.
.
i have a but load of extra plug ins, should i deactivate all of em.

Try deactivating all your plugins - if that changes anything, we can be sure that the snippet conflicts with one of them. If that doesn’t change anything, try deactivating your custom theme and check the result. I don’t think the cybertron theme causes that, but just to be sure…

Tell me if it works!

Just to be sure: in order to hide the “qualifier” tag from your screenshot, the code in the snippet should look like this:

a.tag[href="#qualifier"] {
    display: none;
}

yup that’s right.

nope.

strange… can you paste the exact content of your css snippet?

You should of course replace #event by the tag you want to hide, as I explained above and also in my original post!

1 Like

OOF!
sorry, sorry…
so…
i create multiple coppies of this .css
or… create multiple commands in the same file file like
.
first, date, name, qualifier, bla bla bla … ???

nvm it works perfectly, thanx a ton. :pray:

basically this.

a.tag[href="#qualifier"] {
display: none;
}

a.tag[href="#ranking"] {
display: none;
}

a.tag[href="#date"] {
display: none;
}

a.tag[href="#name"] {
display: none;
}

a.tag[href="#place"] {
display: none;
}

and it goes on… i’ll keep adding more as i need.
this is PERFECT.

Hi,

This method disappears the tag. It is OK in this case.
But, does anybody know such a method, which shows just the tag text without #, for example with other colours.
Prev. : The #cat is #red.
New: The cat is red. (and the cat and red is red coloured)

It is much easier to read.

Thanks
Füles

You can get rid of the # with the following code:

span.cm-formatting.cm-formatting-hashtag.cm-hashtag-begin.cm-hashtag.cm-meta {
    font-size: 0px;
  }

However, this only works in edit mode; I am not aware of a css-based solution for preview mode.

Hi,

I tried, but failed. Nothing changed. I tried font-size and color.
Do you have any opinion.
Füles

This should work in preview mode.

a.tag[href="#cat"] {
	font-size: 0;
}
a.tag[href="#cat"]::before {
	content: "cat";
	font-size: initial;
}

@eatondpe This works but you have to define it for each single tag, I guess?

Unfortunately, yes. :slightly_frowning_face: At least with CSS.

I’m new to Obsidian and to CSS. I followed the steps and have no results, the tags are there in the preview.

Can you help me?