After a mistake, I can't uninstall the theme! HELP!

I have zero expertise in coding.

I was trying to change the left side and right side background colours for the Ukiyo theme.

In doing so (and even if it was intended to be used for the “minimal theme”) I copied a line of code that someone implied could do the trick, and pasted it into the Ukiyo theme .css

The results were unexpected.

Here is the code I used, except I removed the part about the center column, and changed the words “black” for an HTML colour code.

/* LEFT COLUMN */

.mod-left-split .workspace-leaf-content {background-color: black;}

/* RIGHT COLUMN */

.mod-right-split .view-content, .mod-right-split .workspace-leaf-content {background-color: black;}

/* CENTER COLUMN */

.mod-vertical .view-header {background-color: midnightblue !important; border-bottom: 1px solid black;}

.mod-vertical .view-content {background-color: midnightblue !important;}

I applied it at the end of Ukyio’s light theme section in the .css and saved it.

The theme went black and white. So I simply deleted the lines to go back to the original, thinking it would restore the colors that were there before.

But the Ukiyo theme stayed black and white.

Now I want to uninstall and re-install Ukiyo to have everything reset, but the uninstall button does not work anymore. Just for this theme. I can install/uninstall all the others.

Does anyone have any idea of what is going on?

For deleting the theme, an absolute way to do it would be to delete the theme file itself.

  1. Open your file explorer and go to the location of your obsidian vault.
  2. Open the .obsidian folder.
  3. Open the themes folder.
  4. You should see the folder for Ukiyo. Now you can delete it.
2 Likes

And for next time, it’s best to use a CSS snippet to alter the look of Obsidian instead of changing the theme’s CSS file directly.

In addition to the above link, here’s what the Discord bot says:

Custom CSS lets your completely customize how your Obsidian looks.

To use a custom theme created by our community, go to Settings > Appearance. From there, you can choose among a list of community themes.

You can further customize the look of Obsidian by using CSS snippets. To create a snippet, go to Settings > Appearance > CSS snippets and click the folder icon. After saving a CSS file to that folder enable the snippet in the settings.
We recommend editing the CSS file using something like Visual Studio Code or Sublime Text to properly highlight and format it, as invalid CSS will not work.

There’s a wonderful guide on our forum that should get you comfortable with working with CSS, if you’d like to make tweaks yourself: https://forum.obsidian.md/t/getting-comfortable-with-obsidian-css

You can also borrow from existing snippets the community has developed over time here: https://forum.obsidian.md/t/meta-post-common-css-hacks

2 Likes

Thank you this was a good solution.

1 Like

I am currently learning how to make snippets. Thank you :slight_smile:

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