Skip to content

[Enhancement]: added css variables for styling#1068

Open
theinfinull wants to merge 1 commit intoVinzent03:masterfrom
theinfinull:master
Open

[Enhancement]: added css variables for styling#1068
theinfinull wants to merge 1 commit intoVinzent03:masterfrom
theinfinull:master

Conversation

@theinfinull
Copy link
Copy Markdown

exposed overridable CSS custom properties under
.theme-dark and .theme-light for user-styling
via snippets

includes variables for:

  • file-status markers for modified and deleted
  • diff view line backgrounds/highlights
  • editor gutter markers

Docs updated with variable reference

exposed overridable CSS custom properties under
.theme-dark and .theme-light for user-styling
via snippets

includes variables for:
- file-status markers for modified and deleted
- diff view line backgrounds/highlights
- editor gutter markers

Docs updated with variable reference
@Vinzent03
Copy link
Copy Markdown
Owner

I'm unsure if adding variables is really necessary/the right solution. I would suggest you to write css rules with a higher specificity, which should be possible with for example !important

@theinfinull
Copy link
Copy Markdown
Author

theinfinull commented Apr 21, 2026

!important works, but it forces users to replicate internal selectors. like overriding the gutter marker size currently needs ~8 !important rules. All of which may silently break if those class names ever change or if new ones are added

Variables collapse em into one line config, and users can style via docs without knowing internal class names, which is how obsidian itself does it.

Seemed like a cleaner approach - open to feedback

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

Successfully merging this pull request may close these issues.

2 participants