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 #255

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

FR: Add Alternative Checkboxes toggle in Style Settings #255

damiankorcz opened this issue Oct 15, 2024 · 0 comments
Labels
🧞‍♂️ enhancement Suggestion for visual improvements, and style settings customization

Comments

@damiankorcz
Copy link

Primary Theme Version

v2.10.0

Debug Info

SYSTEM INFO:
Obsidian version: v1.7.4
Installer version: v1.6.7
Operating system: #1-NixOS SMP PREEMPT_DYNAMIC Fri Oct 4 14:38:57 UTC 2024 6.11.2
Login status: logged in
Language: en
Catalyst license: vip
Insider build toggle: on
Live preview: on
Base theme: dark
Community theme: Primary v2.10.0
Snippets enabled: 0
Restricted mode: off
Plugins installed: 5
Plugins enabled: 2
1: Style Settings v1.0.9
2: Code Editor Shortcuts v1.14.0

Describe the enhancement

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.

@damiankorcz damiankorcz added the 🧞‍♂️ enhancement Suggestion for visual improvements, and style settings customization label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧞‍♂️ enhancement Suggestion for visual improvements, and style settings customization
Projects
None yet
Development

No branches or pull requests

1 participant