Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

light mode background contrast: high contrast setting persists after disabling the plugin (until restart of Obsidian) #64

Closed
danieltomasz opened this issue Jun 25, 2023 · 10 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@danieltomasz
Copy link

danieltomasz commented Jun 25, 2023

Before you open a bug report
Disable plugins and snippets that could be causing a conflict. Update to the latest versions of the following, and restart Obsidian:

  • Minimal Theme 6.3.11
  • Obsidian 1.3.5
  • Minimal Theme Settings plugin 6.3.1
  • Contextual Typography plugin No

Confirm that the bug is not present when Minimal theme is off
Yes

Describe the bug
A clear and concise description of the bug

Obsidian minimal setting are override other setting when I am using other themes, for example Things

To reproduce
Provide steps to reproduce the behavior

  • Install obsidian minimal settings
  • Install Minimal theme
  • set light mode background contrast to high contrast
  • Change theme to other theme (fot example things)
  • The sidebar has black/dark accents
  • this black accent is active even after deactivating minimal setting, only restart of Obsidian helps

Expected behavior
A clear and concise description of what you expected to happen

the minimal settings will be not active when I change the theme (vanilla obsidian doesnt have this problem)

Screenshots
If applicable, add screenshots to help explain your problem

image

Debug info (required):
Paste your debug info below, which can be accessed in Obsidian with Ctrl/Cmd-P, enter "Show debug info", and click "Copy to clipboard"

@danieltomasz danieltomasz added the bug Something isn't working label Jun 25, 2023
@danieltomasz
Copy link
Author

Is is also possible to set the high contrast when the theme set is not minimal, which gives weird results sometimes
image

@kepano kepano added the wontfix This will not be worked on label Jun 25, 2023
@kepano
Copy link
Owner

kepano commented Jun 25, 2023

Minimal Theme Settings is intended to be used with Minimal so this can be solved by disabling the plugin.

@danieltomasz
Copy link
Author

danieltomasz commented Jun 25, 2023

@kepano thanks for fast reply and your work here!

disabling the plugin doesn't work, only restart of Obsidian remove/unload the active "high contrast" css effect which might be considered as bug (but maybe low priority)

Switching to default obsidian theme when the minimal settings plugin is disabled, and then to another theme (like the Things theme) doesn't clear the high contrast sidebar (although the high contrast backround isn't visible with vanilla obsidian)

I might also report this as bug within obsidian

@danieltomasz danieltomasz changed the title Minimal theme settings override some other themes (light mode background contrast high contast) light mode background contrast high contast setting persist after disabling the plugin (until restart of Obsidian) Jun 25, 2023
@danieltomasz danieltomasz changed the title light mode background contrast high contast setting persist after disabling the plugin (until restart of Obsidian) light mode background contrast: high contrast setting persists after disabling the plugin (until restart of Obsidian) Jun 25, 2023
@isaacfreeman
Copy link

isaacfreeman commented Feb 5, 2024

Minimal Theme Settings is intended to be used with Minimal so this can be solved by disabling the plugin.

This is true enough in principle, but in practice many people will have Minimal Theme Settings installed when they try other themes. If they have High Contrast set, then other themes will render incorrectly, and it's not obvious to a typical user that Minimal Theme Settings would affect some other theme entirely. This isn't an abstract concern: I've personally just spent several days going back and forth with a user to figure out why my theme was rendering poorly for them. I was lucky to get a patient and understanding user who was willing to post screenshots and debug info to a forum thread, or I'd never have known!

In the short term, I've patched my own theme to override the Minimal Theme Settings behaviour by replacing

.theme-light {
 ...
}

with

.theme-light,
.theme-light .theme-dark {
  ...
}

which looks weird, but gets the job done. However, my theme happens to be in active development right now, whereas I suspect there are many other affected themes that don't get updates as frequently, and whose authors may not be aware of the problem.

Longer term, could I ask that Minimal Theme Settings be adjusted so that the High Contrast setting doesn't break other themes if users happen to leave it on? My suggestion would be that instead of applying .theme-dark to the ribbon and sidebar, it could use a new class name specific to Minimal (something like .minimal-subtheme-dark, say). Then have the Minimal CSS apply the same styles to .theme-dark and .minimal-subtheme-dark (similarly to what I've done). Perhaps you can see a better approach, but I hope that's useful.

@kepano kepano closed this as completed in 794729d Jun 11, 2024
@kepano
Copy link
Owner

kepano commented Jun 11, 2024

Fixed in 8.0.0

@danieltomasz
Copy link
Author

danieltomasz commented Jun 11, 2024

With 8.0.0 I can reproduce the behaviour: I set light mode background contrast to High contrast, and the sidebar stays in dark mode when I switch to other themes, both with the Minimal Settings Plugin turned off and turned on

Edit: this is really theme dependent — changing to Vanilla Obsidian unloads the black sidebar, but changing from vanilla to some other themes (like sanctum reborn or Sandover) brings back the black sidebar: so Minimal setting aren't completely “flushed away”

@kepano
Copy link
Owner

kepano commented Jun 11, 2024

Oops, good catch. Try 8.0.1

@danieltomasz
Copy link
Author

Zipped source code doesn't seem to be updated from 8.0.0, Obsidian doesnt see new version

@kepano
Copy link
Owner

kepano commented Jun 11, 2024

You should see it now

@danieltomasz
Copy link
Author

yes, it works now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants