obsidian-style-settings
obsidian-style-settings copied to clipboard
Feature Request: Option to invert toggle state for class-select settings
I sometimes have settings that are enabled by default but in order to support usage without Style Settings, I apply the CSS by default and use a class-select
setting to disable the styling. That is I enable the styling if the class-select
setting class is not present.
This works fine but currently forces me to word the settings in terms of disabling options. So a user has to enable the toggle to disable the default styling. This is a bit clumsy both in terms of wording the settings as well as the user's mental modal.
It would be much nicer if the setting was worded as enabling some styling and the toggle being enabled by default as is the case when setting default: true
for a class-select
setting.
But using default: true
is undesirable since that default only works if Style Settings is installed and I'd like for the defaults to also work without Style Settings.
As a solution I suggest adding a invert-toggle: true
option (or similar) that would invert the display for a class-select
toggle. If set, the toggle in the UI would show as on if the class is not being set and off if the class is being set.
I can also look into providing a PR, hopefully this should not be too difficult. But I wanted to sound out your opinion first if this is something that seems sensible or if there are alternative or better solutions.