nothingislost / obsidian-codemirror-options

Obsidian plugin with options to customize the behavior of CodeMirror
GNU General Public License v3.0
172 stars 13 forks source link

Can't get front matter CSS to work #69

Closed jsmorabito closed 3 years ago

jsmorabito commented 3 years ago

I might be misunderstanding the instructions.

  1. I put this in the front matter

    ---
    text-color: pink
    --- 
  2. Then added this to the front matter key section

image

  1. Then I expected the text of the page to turn pink but it doesn't

Am I missing a step?

nothingislost commented 3 years ago

Yeah, you need to create a snippet that does something with that variable now. In the demo video, I have a CSS snippet which is applying this style:

.CodeMirror-line {
 color: var(--text-color);
}

you may need to add !important to the color declaration if it still isn't working.