Personal style

What I’m trying to do

I want to take “personal” notes in the notes. For example, I am reading a paper, taking notes from that paper with quotes as below, and I like to add my personal view. Below is an example, I took the part in “” from the paper and the part `` is my opinion.

“Whether low TMB cancers, which are largely refractory to immunotherapy, harbor potentially immunogenic neoantigens remains unclear.” `yeah, I guess and hope so. otherwise, it would trigger auto-immune reactions.’

It works well with the code-block, because it is inline. However, it is not visible when I need to skip my notes, because I cannot change the color, style, or highlight the text of code-block.

In an ideal world, I would like to have a personal style that I could switch while I am writing, quickly. Thus, `` or /HA (which was my style in LaTeX, where I defined it with a new comment) would work well.

Simply, I need a personal style that I can

  • switch quickly while writing, inline with the normal text
  • change the color, style, and background color

Things I have tried

I have spent some time in the forum, but could not find a solution that meets everything I need. Here are some items I have tried with the explanations why they did not work.

I switched to the Prism theme and changed the h6 into a different color, style, highlight box, etc. But it is not inline, which is a deal for me. Also, I cannot switch easily.

I also tried the plugin “Highlightr”. The problem is, it requires:

<mark style="background: #FFB8EBA6;">hallmark</mark>

How on earth could writing this be easy? I know there is a quick access by the right-click, but it requires me to go to the mouse, it is not “while writing”. Yet, I will use it, if that is the only way to do so…

Any help is appreciated. Thanks!

Hi! I’m pretty much starting out with using Obsidian so I don’t know much yet, but I think I have 3 approaches for you:

  1. Markdown has ==, when put before and after text ==like this==, Obsidian highlights it specially:
    You could customize this through the selector, don’t forget to mark your rules with !important.

  2. The Highlightr plugin seems to have entries in the command prompt, so you could link those with hotkeys.

  3. Combining those two, maybe a snippet like this could do the job with shortening the <mark... stuff:

    {trigger: "/HA", replacement: "<mark style=\"background: #FFB8EBA6;\">$0</mark>$1", options: "tAw"}

    Remove the w if you want to use /HA midway into a word, I encourage you to take a trip through the readme of the plugin for more detail.

Hope this helps~

1 Like

…oh, wow. Didn’t realize the post was tagged with custom-css. Since selecting an inline code block in Ctrl + Shift + I shows this chonker as applied rule in the Styles tab below in the debugger, I guess you can use the same rule to set the background color of an inline codeblock to whatever you want:

.cm-s-obsidian {
    background: #FFB8EBA6;
1 Like
  1. yes, == works, but without a style change. I do not know what you mean with selector and !important (I am sorry for my ignorance). I assume it is a new snippet? Maybe because of the PRISM theme, the snippets I added (simply by writing with txt editor and saving as .css under the ‘snippets’ folder, under obsidian settings, and turning it on) did not work. I might have missed the !important though, I will work on it.

  2. The Highlightr plugin: correct! I defined for one color of the highlight and that’s what I am using currently. Again, without a style change.

Both options above interfere with my highlighting, for which I have a personal coding and it is vital for me. So, yes, they are solutions, but not perfect. Yeah, I am asking a lot, but maybe not?

{trigger: "/HA", replacement: "<mark style=\"background: #FFB8EBA6; font-family: 'Noteworthy'\">$0</mark>$1", options: "tAw"}

I will work on this and inform you. Though, as I said, I still could not make the snippets work. It will take some time.

Thank you for the inspiration!

" Didn’t realize the post was tagged with custom-css."
Please do not overestimate my tagging abilities :slight_smile: I thought this could be done through a custom snippet.

Unfortunately, none of my background color change attempts for the codeblock in the original apps.css was successful. Therefore, I asked here.

You should absolutely be able to restyle inline code with a CSS snippet. I don’t know the details, but someone in the #appearance channel of Obsidian’s Discord should be able to help you.