No description
Find a file
2026-07-19 17:50:16 +01:00
.github/workflows Fix community review checks for 0.1.1 2026-07-14 21:37:48 +01:00
src Simplify code background controls for 0.1.6 2026-07-19 17:50:16 +01:00
tests Simplify code background controls for 0.1.6 2026-07-19 17:50:16 +01:00
.gitignore Initial release 0.1.0 2026-07-14 19:32:35 +01:00
esbuild.config.mjs Fix community review checks for 0.1.1 2026-07-14 21:37:48 +01:00
eslint.config.mjs Fix community review checks for 0.1.1 2026-07-14 21:37:48 +01:00
LICENSE Initial release 0.1.0 2026-07-14 19:32:35 +01:00
manifest.json Simplify code background controls for 0.1.6 2026-07-19 17:50:16 +01:00
package-lock.json Simplify code background controls for 0.1.6 2026-07-19 17:50:16 +01:00
package.json Simplify code background controls for 0.1.6 2026-07-19 17:50:16 +01:00
README.md Simplify code background controls for 0.1.6 2026-07-19 17:50:16 +01:00
styles.css Simplify code background controls for 0.1.6 2026-07-19 17:50:16 +01:00
tsconfig.json Fix code block background rendering for 0.1.3 2026-07-19 15:18:40 +01:00
versions.json Simplify code background controls for 0.1.6 2026-07-19 17:50:16 +01:00

Style Controller

Style Controller is an Obsidian plugin for managing reusable style profiles, path overrides, and visual settings through a native settings interface. It applies profile values as CSS custom properties consumed by the plugin's static stylesheet; it does not edit theme files, snippets, or notes.

Safety warning

This plugin changes appearance by applying scoped CSS custom properties. Test profiles on a small set of notes before assigning broad path overrides. Most blank/default controls remove the corresponding property and allow native Obsidian or theme behavior to continue. Inline and block code backgrounds instead use the Style Controller built-in #fafafa background whenever their custom override is Off.

Features

  • Reusable stored style profiles, including a built-in Default profile with native styling plus #fafafa code backgrounds.
  • Active global profile settings for typography, headings, links, tables, code, blockquotes, callouts, images, file explorer styling, and custom CSS.
  • Path-specific overrides for folders, files, and path-contains matching.
  • Static CSS rules with custom properties scoped to active Markdown views and matching file paths.
  • Image controls for alignment, width, and whether explicit image sizes are respected.
  • Status indicators for style fields: On, Off, and Error.
  • Import/export workflows for stored configurations.

Profiles and Default behavior

The Default profile keeps native Obsidian styling except that inline-code and fenced-code backgrounds use Style Controller's built-in #fafafa. Each code background uses one compact color control: Off displays and renders #fafafa, entering a custom color automatically changes it to On, and clearing the field automatically returns it to Off and #fafafa. Stored profiles can be applied to the global settings or used as path-specific overrides. The active profile for a note is resolved from the global settings plus matching enabled overrides in their saved order.

Path overrides

Overrides can match folders, files, or paths containing specific text. Matching paths receive only the modules enabled for that override. Override ordering is preserved, and later matching overrides can layer additional non-blank profile values.

Supported visual fields

Style Controller includes controls for base text, headings, links, tables, inline code, code blocks, blockquotes, callouts, images, file explorer entries, and custom CSS. Blank values produce no CSS declaration for that field; the current theme or Obsidian default remains in control.

Image controls

Image settings include alignment, width, and a control for respecting explicit image sizes. Blank image settings do not emit image CSS.

Applied styles

The plugin uses the packaged styles.css; it does not create runtime stylesheets. It applies scoped classes and CSS custom properties to each Markdown view, clears stale values before resolving a new file or profile, and removes its classes and properties on unload.

Code background smoke test

  1. Reload Style Controller.
  2. Confirm Inline bg has only one compact color control.
  3. Confirm Block bg has only one compact color control.
  4. Confirm no extra toggle or built-in-default description exists.
  5. Confirm both show #fafafa and Off by default.
  6. Confirm both previews render #fafafa.
  7. Type a custom Inline bg color and confirm it immediately becomes On.
  8. Clear it and confirm it immediately becomes Off and returns to #fafafa.
  9. Repeat for Block bg.
  10. Test Reading view and Live Preview.
  11. Restart Obsidian and confirm persistence.
  12. Test light and dark themes.

Privacy and network behavior

Style Controller runs locally. It does not use telemetry, analytics, remote code, remote images, or remote fonts.

Installation

Download the release assets from GitHub and place them in .obsidian/plugins/style-controller/:

  • main.js
  • manifest.json
  • styles.css

Then enable the plugin in Obsidian settings.

Development

npm ci
npm run build

The production build writes main.js.

License

MIT License. See LICENSE.