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

Match the color scheme of buttons added by Commander to that of native buttons by default or as an option #145

Open
greetclammy opened this issue Oct 28, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@greetclammy
Copy link

Describe the feature

Title

Does this fix a problem? If so, specify.

UI elements such as the ones in the tab title bar adjust their color dynamically based on dark vs light theme, meaning even if you set the icon color to closely resemble that of a native button, they will not match when Obsidian switches from light theme to dark or vice versa. This makes UI elements added by Commander stick out like a sore thumb and drives my OCD into a frenzy!

image

Did you consider other alternatives?

Implemented this for tab title bar w/ CSS snippet:

/* Match Commander plugin buttons colors with native Obsidian buttons */

/* Normal state - transparent background */
.view-actions .clickable-icon.cmdr-page-header,
.view-actions .clickable-icon[class*="templater-obsidian"] {
    color: var(--icon-color) !important;
    background-color: transparent;
}

/* Hover state */
.view-actions .clickable-icon.cmdr-page-header:hover,
.view-actions .clickable-icon[class*="templater-obsidian"]:hover {
    background-color: var(--interactive-hover);
    color: var(--text-normal) !important;
}

/* Active/pressed state */
.view-actions .clickable-icon.cmdr-page-header:active,
.view-actions .clickable-icon[class*="templater-obsidian"]:active {
    background-color: var(--interactive-accent);
    color: var(--text-on-accent) !important;
}

Result: visually consistent, native feel to the icons
Screen Shot 2024-10-29 at 00 23 37

Screenshots and recordings

No response

@greetclammy greetclammy added the enhancement New feature or request label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant