{"id":47809023,"url":"https://github.com/agrison/obsidian-tag-classes","last_synced_at":"2026-04-06T18:00:37.575Z","repository":{"id":348981383,"uuid":"1200623155","full_name":"agrison/obsidian-tag-classes","owner":"agrison","description":"Automatically adds classes based on your tags in Obsidian","archived":false,"fork":false,"pushed_at":"2026-04-03T17:03:18.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-03T19:33:18.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agrison.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-03T16:24:57.000Z","updated_at":"2026-04-03T17:02:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/agrison/obsidian-tag-classes","commit_stats":null,"previous_names":["agrison/obsidian-tag-classes"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/agrison/obsidian-tag-classes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Fobsidian-tag-classes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Fobsidian-tag-classes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Fobsidian-tag-classes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Fobsidian-tag-classes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agrison","download_url":"https://codeload.github.com/agrison/obsidian-tag-classes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agrison%2Fobsidian-tag-classes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31483380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"ssl_error","status_checked_at":"2026-04-06T17:22:54.741Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-03T18:01:28.459Z","updated_at":"2026-04-06T18:00:37.565Z","avatar_url":"https://github.com/agrison.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tag Classes a plugin for Obsidian\n\nStyle your notes based on their tags without having to manually add a `cssclasses` to the frontmatter.\n\nTag Classes automatically injects your note's tags as CSS classes on the view container, \nso you can target any note from a CSS snippet using nothing but its tags.\n\nIf you already use tags to organize your notes, then you're not forced to also add a `cssclasses` property just to style them. \nTag Classes automatically turns your existing tags into CSS classes, so your tags do double duty.\n\n---\n\n## How it works\n\nEvery tag on a note gets added as a CSS class on the view container.\nA note tagged `#recipe` gets the class `.tag-recipe`. That's it.\n\nA note with these tags:\n\n```yaml\n---\ntags: [recipe, italian]\n---\n```\n\n...will have these classes added to its view container:\n\n```\n.tag-recipe  .tag-italian\n```\n\nYou can then style it from any CSS snippet in `.obsidian/snippets/`:\n\n```css\n.tag-recipe .markdown-preview-view {\n  background: #fffbf5;\n  font-family: Georgia, serif;\n}\n\n.tag-recipe h1, .tag-recipe h2 {\n  color: #c0392b;\n}\n```\n\nNo `cssclasses` in the frontmatter needed. Your tags are enough.\n\n---\n\n## Installation\n\n### From the Community Plugin store\n\n1. Open **Settings → Community plugins**\n2. Search for **Tag Classes**\n3. Install and enable\n\n### Manual installation\n\n1. Download `main.js` and `manifest.json` from the [latest release](../../releases/latest)\n2. Create a folder at `\u003cyour-vault\u003e/.obsidian/plugins/tag-classes/`\n3. Copy both files into that folder\n4. Reload Obsidian and enable the plugin under **Settings → Community plugins**\n\n---\n\n## Usage\n\nOnce enabled, tags are automatically applied as classes — nothing else to configure.\n\n### Targeting notes in CSS snippets\n\nCreate a file in `.obsidian/snippets/` (e.g. `tag-styles.css`):\n\n```css\n/* Notes tagged #recipe */\n.tag-recipe .markdown-preview-view {\n  background: #fffbf5;\n  font-family: Georgia, serif;\n}\n\n/* Notes tagged #draft — add a visual watermark */\n.tag-draft .markdown-preview-view::before {\n  content: \"DRAFT\";\n  position: fixed;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%) rotate(-30deg);\n  font-size: 6rem;\n  font-weight: 900;\n  color: rgba(0, 0, 0, 0.04);\n  pointer-events: none;\n}\n\n/* Notes tagged #important — colored left border */\n.tag-important .markdown-preview-view {\n  border-left: 4px solid #f59e0b;\n  padding-left: 1rem;\n}\n\n/* Subtag #project/personal → .tag-project-personal */\n.tag-project-personal h1 {\n  color: #7c3aed;\n}\n```\n\nEnable your snippet under **Settings → Appearance → CSS snippets**.\n\n---\n\n## Settings\n\n| Setting | Default | Description |\n|---|---|---|\n| **CSS prefix** | `tag-` | Prefix prepended to every tag name. A tag `recipe` becomes class `tag-recipe`. |\n| **Sanitize class names** | `true` | Replaces characters invalid in CSS (e.g. `/` in subtags) with `-`. Disable if you want raw tag names. |\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrison%2Fobsidian-tag-classes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagrison%2Fobsidian-tag-classes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagrison%2Fobsidian-tag-classes/lists"}