Possible reasons that CSS snippet styles never apply?

I’ve been working in a new vault for a couple of days, and today I noticed a very strange problem when trying to apply a CSS snippet: it just never applies. It never even shows in the document (I checked by adding a unique string into the snippet and then searching in the DOM).

I have a few plugins installed, but I have disabled all of them. This did not help. I hopefully don’t need to uninstall them, right? Them being disabled is already proof enough that it’s not a plugin issue, correct?

I’m sorry if this question lacks detail, but I can’t seem to think of any other factor that might be at play here. I’ve disabled every community plugin, which I would think makes the vault good as new?

Please help.

P.S. The snippet is obviously enabled. I even reloaded the app to confirm the problem is real. And yes, I have tried !important-ing the styles (which shouldn’t even matter since the styles aren’t even in the DOM, as mentioned).

It’d be helpful if you gave us the snippet, so we can see if there’s a problem with it.

Your CSS code won’t apply if it’s old code.

As @ReaderGuy42 pointed out, we cant help you if you don’t upload your css.

It seems like you would need to apply that style to some given element in your page, and then use the inspector to see what is really applied to that element.

Within the inspector, I would suggest to do the following:

  • Use the select element icon in the top left of the Developers tool > Element pane to select the element you want to inspect
  • This should now show the html of this element in the main window
  • Now focus your attention on the bottom half, and locate the Computed pane there, and look for the attribute you’re trying to change
  • It’ll show all targets related to that given attribute, alongside which selector has been used to set that target

This window will show where your styling is in the rank, and if it doesn’t show here at all then your CSS snippet isn’t enabled (or correct for that element).


A last tip, and that is to try to set either the color or the background-color from your selector. These are often not set with a high selector value, so I tend to use them to verify that my CSS selectors are correct, before I continue doing the actual styling that I really want.

PS! I moved this thread to Custom CSS & Theme Design

I got it to work now. Nothing to do with the style itself, but rather the way I created the .css file (I “echo”-ed it in PowerShell). I then created another snippet in just vscode, and then its styles applied.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.