obsidian-minimal icon indicating copy to clipboard operation
obsidian-minimal copied to clipboard

No change when changing sidebar color in Style Settings with Minimal 5.0

Open j-peeters opened this issue 3 years ago • 3 comments

Describe the bug When I set a new sidebar color in Style Settings the color doesn't change.

To reproduce Steps to reproduce the behavior:

  1. Go to 'Style Settings' in prefs
  2. Click on 'Minimal Custom Color Scheme'
  3. Go to 'Interface'
  4. Change 'Sidebar Background' color to something else.

Expected behavior I would expect that the background color of the sidebar changes when I change it's respective color.

Screenshots https://cln.sh/3ZowSeVJJT01aT67K5lR

Debug info): SYSTEM INFO: Obsidian version: v0.13.23 Installer version: v0.12.19 Operating system: Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000 21.3.0 Login status: logged in Catalyst license: supporter Insider build toggle: on Live preview: on Legacy editor: off Base theme: light Community theme: Minimal Snippets enabled: 0 Safe mode: off Plugins installed: 79 Plugins enabled: 4 1: Style Settings 2: Minimal Theme Settings 3: Contextual Typography 4: Hider

j-peeters avatar Jan 31 '22 13:01 j-peeters

Hi @kepano I'm wondering if you already found what breaks the possibility to change the sidebar color with the default theme high contrast mode?

j-peeters avatar Feb 22 '22 13:02 j-peeters

I haven't had a chance to look at this yet. The way the high-contrast background works is a bit tricky, and my guess is that the Style Settings are being overridden.

One short term solution is to use a CSS snippet for your color scheme. You can see how color schemes are constructed here: https://github.com/kepano/obsidian-minimal/tree/master/src/scss/color-schemes

To change the sidebar background:

.theme-light.minimal-light-contrast .titlebar,
.theme-light.minimal-light-contrast .workspace-fake-target-overlay.is-in-sidebar,
.theme-light.minimal-light-contrast .workspace-ribbon.mod-left:not(.is-collapsed),
.theme-light.minimal-light-contrast .mod-left-split,
.theme-light.minimal-light-contrast.minimal-status-off .status-bar,
.theme-light.minimal-light-contrast.is-mobile .workspace-drawer.mod-left {
  --bg2:#000;
}

You may need to add the color scheme name class if you are starting from a color scheme that is not the default.

kepano avatar Feb 22 '22 16:02 kepano

Thanks for sharing the CSS code and instructions, this is already great. Good luck with the bug hunt when you get to it.

j-peeters avatar Feb 22 '22 16:02 j-peeters