Skip to content

FR: Add Alternative Checkboxes toggle in Style Settings #255

@damiankorcz

Description

@damiankorcz

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🧞‍♂️ enhancementSuggestion for visual improvements, and style settings customization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions