CSS Editor
approvedby Zachatoo
Edit CSS snippet files.
CSS Editor
This plugin allows you to edit CSS files in the .obsidian/snippets/ directory.
Features
- Create, edit, rename, and delete CSS snippets
- Syntax highlighting and code completion
- Works on desktop and mobile
- Basic VIM support
Installation
Recommended to install from the Obsidian community store.
You can manually install this using the BRAT Obsidian plugin. Generic installation instructions are available on that plugin's documentation.
Commands
Create CSS snippet
Opens a prompt to create a CSS snippet in your .obsidian/snippets/ directory. Upon creation, show editor to edit that CSS file.
Open quick switcher
Opens a suggestion modal to create, edit, or delete a CSS snippet. Has similar functionality to the core quick switcher where holding down a secondary key will modify the action that will take place.
- Press Enter to open the selected CSS snippet, or if no suggestions are available, create a new CSS snippet.
- Press ⌘Enter to open the selected CSS snippet in a new tab.
- Press ShiftEnter to create a new CSS snippet.
- Press Tab to toggle the enable/disable state of the selected CSS snippet.
- Press ⌘Delete to delete the selected CSS snippet.
Delete CSS snippet
Deletes the currently active CSS snippet file. Only available when viewing a CSS snippet file.
Toggle the enabled/disabled state of CSS snippet
If the currently active CSS snippet file is enabled then disable it, and vice versa. Only available when viewing a CSS snippet file. Note that you can also toggle this state directly from the quick switcher using the Tab key.
Contributing
Releasing
Releasing a new version involves the following steps:
- Update
minAppVersioninmanifest.jsonif applicable. - Run
npm version patch,npm version minor, ornpm version major.- This command will bump the version in the
manifest.json,package.json, andpackage-lock.jsonfiles, add a new entry inversions.json, and create a git tag.
- This command will bump the version in the
- Push the changes and tag. This will trigger a GitHub action to create the release.
Running tests
Tests are run using wdio-obsidian-service. Tests are run automatically during PR checks and before releasing. You can also run tests manually with npm test.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.