Open-source project
community-archive/obsidian-style-settings avatar
community-archive/obsidian-style-settings

Obsidian Style Settings: A YAML Comment Block Inside CSS That Turns Variables Into a Settings Pane

A dynamic user interface for adjusting theme, plugin, and snippet CSS variables within Obsidian

2,599 stars189 forksTypeScriptGPL-3.0

At a glance

What is it?
Style Settings reads YAML hidden in /* @settings comments in snippet, theme and plugin CSS and turns it into one settings pane. It only controls what a CSS author has declared, and its docs and metadata disagree in a few places.
Who is it for?
Style Settings is the right tool for Obsidian users who tweak themes or write CSS snippets and want toggles, sliders and color pickers instead of hand-edited variables. It does nothing for CSS that carries no @settings block, so check that your theme ships one before installing, and verify the type list against the version you run.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 135 days ago.
What is it written in?
Mainly TypeScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 25, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • community-archive/obsidian-style-settings2,599 ★ · +92
Star history
Repository2026-09-292026-11-25
community-archive/obsidian-style-settings2.5k2.6k

92 Stars in the last 57 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Settings are declared inside a CSS comment, so a stylesheet without one gives you nothing to adjust

The whole mechanism hangs on a comment that begins with /* @settings. Inside it sits YAML with three required properties: name, id and settings. Style Settings scans every CSS file Obsidian loads from the snippets, themes and plugins directories under your vault's configuration directory, which is the .obsidian folder inside the vault, and collects those comments into a single settings pane.

The consequence is that the plugin has no settings of its own to offer for a theme. If a theme author never wrote an @settings block, the pane shows nothing for that theme, and you are back to editing variables by hand. The repository ships obsidian-default-theme.css, a snippet its README says can adjust every CSS variable of the default Obsidian theme, which is the fallback when no theme provides a block. Each setting definition inside the YAML is separated by a dash.

The README says there are 7 setting types but lists more, so count them yourself

The text states that there are 7 setting types, then lists heading, class-toggle, class-select, variable-text, variable-number, variable-number-slider, variable-select and variable-color. That is eight. A separate section then describes info-text, which would make nine. Every definition needs an id, a title and a type, with description optional.

The practical effect is that the stated count is stale and cannot be used as a checklist. If you are writing a theme and rely on a type that appears in the heading sections but not in the first list, test it in the plugin version you actually run. The id of each setting is reused as a class name or as a CSS variable name depending on type, so a duplicate id between two settings, or between two sections that share the same top-level id, is the first thing to rule out when a control seems to affect the wrong thing.

Headings group and collapse settings, but only between levels 1 and 6

A heading organizes settings into collapsible nested sections. It needs a level attribute from 1 to 6, and may carry collapsed. Copying the example exactly gives you a heading that starts folded:

css
/* @settings

name: Your Section Name Here
id: a-unique-id
settings:
    -
        id: this-is-a-heading
        title: My Heading
        type: heading
        level: 2
        collapsed: true

*/

A heading is purely organizational. It does not wrap the settings that follow it in YAML; you decide grouping through the level numbers and the order of entries. The info-text type is the sibling for explanation, and its description can contain markdown only when markdown is set to true. Without that flag, asterisks around a word stay literal.

A class-toggle can only switch a class on the body element

A class-toggle adds or removes a CSS class on the body element, and the setting's id becomes the class name. The default can optionally be set to true. This is how a theme offers features that switch on and off:

css
/* @settings

name: Your Section Name Here
id: a-unique-id
settings:
    -
        id: my-css-class
        title: My Toggle
        description: Adds my-css-class to the body element
        type: class-toggle

*/

Setting addCommand to true adds an Obsidian command for the toggle, so it can be bound to a hotkey or run from the command palette. The limit is the target: the class lands on body, so your own CSS has to be written against selectors that begin from body. The toggle cannot scope a class to one note or one pane. Because the id is the class name, a typo in the id silently produces a class nothing styles.

class-select forces a default unless allowEmpty is true, and its description mixes classes with variables

A class-select presents a dropdown of predefined options. When allowEmpty is false, a default option must be specified. When allowEmpty is true the default is optional and may be set to none. Options can be plain values, or pairs with a label and a value, so the dropdown shows My Class while the body receives my-class.

The README's description of this type says it creates a dropdown for a CSS variable and uses the id as the variable name, yet the type list calls it a dropdown that adds classes on the body element. Those two statements conflict, and the other select type, variable-select, is the one described as a text-based CSS variable dropdown. If a class-select seems to leave a variable unset, read it as the class version. Omitting default while allowEmpty is false is an authoring error that leaves the setting without a valid starting state.

variable-text needs a default and writes your value verbatim unless you ask for quotes

A variable-text setting represents any text-based CSS value and requires a default. The id becomes the variable name, so an id of text produces --text with the value copied as is, including a long font stack. Setting quotes to true wraps the output in quotes. The example below stores a bullet character:

css
/* @settings

name: Your Section Name Here
id: a-unique-id
settings:
    -
        id: icon
        title: Bullet Icon
        description: Text used in bullet points
        type: variable-text
        default: •
        quotes: true
*/

The output is the variable --icon with the value '•'. A numeric counterpart, variable-number, also requires a default and takes an optional format that is appended to the number, so format px turns 42 into 42px. The cost of the text type is that nothing validates what you type; a malformed value becomes a malformed CSS declaration.

Releases stopped at 1.0.9 in 2024, and the metadata files disagree with each other

The recent releases are 1.0.9 from 2024-08-24, 1.0.8 from 2024-03-11 and 1.0.7 from 2023-09-04. The last push to the repository was on 2026-07-13, so the code has moved since the last tagged release, but no newer release exists. The package.json still says version 1.0.8 while 1.0.9 is the latest release, and it declares license MIT, while the repository metadata lists GPL-3.0. Anyone redistributing the plugin should read LICENSE.md rather than trust either field.

The development tooling is concrete. Scripts include typecheck, dev, build, test with vitest, lint and a release flow built on bump and rlnotes. The color picker dependency is pulled from a tarball of a fork of @simonwep/pickr pinned to a specific commit, so a build depends on that GitHub archive staying available. The test script is also listed twice in the file.

Editorial conclusion

Style Settings is the right tool for Obsidian users who tweak themes or write CSS snippets and want toggles, sliders and color pickers instead of hand-edited variables. It does nothing for CSS that carries no @settings block, so check that your theme ships one before installing, and verify the type list against the version you run.

Frequently asked questions

How do I use the Obsidian Style Settings plugin?

You write a comment that starts with /* @settings in a CSS snippet, theme or plugin stylesheet, containing YAML with name, id and settings. Style Settings reads it and shows the controls in one settings pane.

How do I configure an Obsidian theme with Style Settings?

If the theme includes an @settings block, its options appear in the Style Settings pane as toggles, dropdowns, sliders and color pickers. If it has none, there is nothing for the plugin to show.

How can Style Settings help make Obsidian look better?

It exposes color, font and numeric CSS variables, plus body class toggles, as controls instead of hand-edited CSS. The bundled obsidian-default-theme.css snippet can adjust every CSS variable of the default Obsidian theme.

Official sources

  1. community-archive/obsidian-style-settings on GitHub
  2. Issues
  3. License: GPL-3.0
  4. README
  5. Releases

Was this useful?