Questions related to hashtags [CSS]

  1. How to color the tag in RIGHT TAG BAR, based on specific text? For example if there in tag #important I want it to be RED. There is no specific class for text content so I have no idea how to do it only in CSS

  2. How to strip / remove the # from hashtags in the preview mode? it is possible purely in CSS?

:pray:t3:

Please try searching before posting new questions, thanks!

This I know. I post the “Pills” tag before it become popular.

But I want to color the tags in right side of the bar, in list generated by Tag.

Ah, sorry. Switched back to an open #help issue.

You might want to ask in the Discord, as the css-themes channel there is a bit busier than CSS discussions on this forum.

1 Like

We’ll need to add either a title or href attribute for this to work. Unlinke tags in preview, tags in the tag pane don’t have a href yet.

I thought :first-letter would work, but unfortunately it doesn’t. # is not considered to be a letter by CSS spec.

So for both of these to work, we’ll need to make changes on our end.

Are you trying to make a new theme, if I may ask?

I already made a custom theme, but unfortunately it isn’t in state that I can publish it. In Discord I was looking for somebody who I can handover this theme, that he will clean the code a bit and some variables for dark / light mode.

And yes, I want to incorporate this in the theme, to make it bit more clean. It is obvious that they are hashtags so I don’t need to see #.

It is possible in edit mode:

.cm-hashtag-begin {
    display: none;
}

But I don’t think it’s possible in Preview.