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

FR: Add Alternative Checkboxes toggle in Style Settings #8

Open
damiankorcz opened this issue Oct 26, 2024 · 0 comments
Open

FR: Add Alternative Checkboxes toggle in Style Settings #8

damiankorcz opened this issue Oct 26, 2024 · 0 comments

Comments

@damiankorcz
Copy link

This request comes as part of the initiative I've started for Obsidian October 2024. Additional information and progress on this project can be found here: https://github.com/damiankorcz/Alternative-Checkboxes-Reference-Set

The current goal is to make it easier for users to implement their own CSS Snippets with Alternative Checkboxes, regardless of the theme they use. At the moment, any theme that doesn't present an option to disable their Alternative Checkboxes implementation, requires the snippet to overwrite the existing theme's code. This can become complicated and hard to maintain as currently 44 themes implement Alternative Checkboxes. Ideally, if all themes have the option to disable their implementation, the snippets can be simpler, and work universally across all themes.

If this is something you are interested in implementing, it would require the following code to be added to your theme:

body.enable-alternative-checkboxes {

/* Encapsulate all code relevant to Altenative Checkboxes here */

}

Add a toggle in the Style Settings code:

-
    id: enable-alternative-checkboxes
    title: Enable Alternative Checkboxes
    description: Disable this if you are using your own implementation via a CSS Snippet.
    default: true
    type: class-toggle
-

Since your theme already implements the feature, the code above enables it by default, in order to not change the existing functionality for users.

When the theme implementation is disabled, all additional checkboxes should be styled the same as the default - [x] checked checkbox; removing any changes to color, icons, fonts, backgrounds, etc.

If you need any help implementing this, let me know! I can also look into making a Pull Request if you would prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant