Dev Tools not clearing out "element.style" changes?

While trying to figure out some CSS stuff, I put a couple lines in the “element.style” part of the CSS inspector. In the past, I’m pretty sure those have been cleared out when restarting Obsidian. But I’ve got a couple that just won’t go away. Anyone know how to clear them?

Things I have tried

  • restarting Obsidian
  • rebooting, then restarting Obsidian
  • closing all instances of Obsidian on my various devices, just restarting on one device
  • reloading (cmd R) in the Dev Tools window
  • manually deleting the entries in the element.style area (they just come back)
  • looking at the Changes panel in Dev Tools (nothing there)
  • Googling to find out where these changes are stored in Dev Tools (no luck there)

What I’m trying to do

I have managed to override/negate the entries via a CSS snippet, but I would really like to figure out how to make them go away permanently. I’ve put a screenshot below - it’s those two lines in element.style (they’re struck out because I overrode them in a CSS snippet file). Is this like a “reinstall Obsidian” level thing? I hope not!

I’m on Mac, and I use iCloud for my vault, if that’s relevant.

After posting this, I realized I hadn’t tried opening a different vault to see if it persisted there. Interestingly, those same two lines were there for a “list item” element similar to the one I had been looking at in my original vault, but with different numbers (11 px and 15 px, respectively). So now I’m thinking that those weren’t my own testing entries, but that they’re hard coded into Obsidian’s HTML one way or another. Seems a bit odd - didn’t we give up hard coding CSS into HTML back in, oh, 2004 or so? - and so maybe I’m not reading the whole thing right.

Anyway, I have it successfully overridden the way I want, so I guess I’ll just have to be happy with that outcome.

I have also noticed a couple of cases where element.style seems pre-populated. Not very CSS knowledgeable, so I have not looked into it further, but just chiming in to say that I have seen the same. Glad you were able to configure how you like!

1 Like