This file provides guidance to Claude Code (claude.ai/code) when working with this repository.
Mastodon Bird UI is a CSS-only theme that transforms Mastodon's default UI to resemble Twitter/X's interface. It's maintained by @rolle@mementomori.social.
src/- Modular SCSS source filesdist/- Compiled CSS outputscripts/- Installation and utility scripts- Parcel bundler compiles SCSS to CSS
npm install # Install dependencies
npm run dev # Development mode with hot-reload (Browsersync)
npm run build # Production build (alias for build:custom-css)
npm run build:custom-css # Build CSS for Custom CSS field usage
npm run build:mastodon-core # Build SCSS for Mastodon core installation
npm run clean # Remove dist/ and .parcel-cache/Copy contents of dist/mastodon-bird-ui.css to Mastodon Admin > Server settings > Appearance > Custom CSS
npm run build:mastodon-core
./scripts/install-to-mastodon.sh --path /path/to/mastodonThis installs Bird UI as selectable themes in user preferences.
- Run
npm run devto start Parcel + Browsersync - Browsersync proxies a local Mastodon instance (configure in
bs-config.js) - Edit SCSS files in
src/, changes appear instantly - Production builds go to
dist/with version banner from package.json
- Keep CSS-only output (no JavaScript runtime)
- Maintain backward compatibility for users copying CSS to Custom CSS field
- Follow existing variable naming conventions in
_variables.scss - Test both single-column and multiple-columns layouts
- Version is managed in
package.jsonand auto-injected into built CSS
This theme targets Mastodon v4.6.0+ which uses a new semantic token system with CSS custom properties like --color-text-primary, --color-bg-primary, etc. Bird UI overrides these tokens.
- One logical change per commit
- Keep commit messages concise (one line), use sentence case
- Update CHANGELOG.md for user-facing changes
- Use present tense in commits and CHANGELOG.md
- Use sentence case for headings (not Title Case)
- Never use bold text as headings, use proper heading levels instead
- Always add an empty line after headings
- No formatting in CHANGELOG.md except
inline codeand when absolute necessary - Use * as bullets in CHANGELOG.md
- Critical: No Co-Authored by Claude watermark in commits
- No emojis in commits or code
- Keep CHANGELOG.md date up to date when adding entries
- Update README badge version when releasing
- No empty lines after // comments in SCSS
- Always commit
dist/build files together with source changes, because users rely on the compiled CSS via the Custom CSS panel
npm run build MUST compile all five Custom CSS variants (the README list), not just the main file:
mastodon-bird-ui.css, mastodon-bird-ui-light.css, mastodon-bird-ui-stars.css, mastodon-bird-ui-accessible.css, mastodon-bird-ui-accessible-plus.css.
build:custom-css passes all five entry SCSS files to parcel. Always run npm run clean && npm run build and commit the rebuilt dist/ before tagging a release, otherwise Custom CSS users get stale CSS for every variant except the main one. dist/ uses --no-source-maps, so there are no .css.map files.