Anima is a WordPress block theme (FSE) by Pixelgrade. It serves as the universal base for Pixelgrade LT themes (Rosa LT, Felt LT, Julia LT, Mies LT). Heavily integrated with Style Manager (color/font system) and Nova Blocks (block library).
GitHub: git@github.com:pixelgrade/anima.git
- Node 16+ required (
.nvmrc= 16,package.jsonengines>=16.13.0). Enforced bynode-tasks/lock_node_version.jsonnpm install. npm run buildcreates the ZIP — it runs webpack, gulp styles, ANDgulp zipin sequence. The build deletes../build/before creating it, so a failed build mid-way can leave the theme without a build folder.- CLAUDE.md is excluded from the ZIP via
.zipignore— keep it that way. style.cssis compiled output — never edit it directly. Source is insrc/scss/.- Text domain
__theme_txtdis a placeholder replaced withanimaduring the build process. Use__theme_txtdin source PHP/JS/CSS files.
export NVM_DIR="/Users/georgeolaru/.nvm" && source "/Users/georgeolaru/.nvm/nvm.sh" && nvm use 16export NVM_DIR="/Users/georgeolaru/.nvm" && source "/Users/georgeolaru/.nvm/nvm.sh" && nvm use 16
cd "/Users/georgeolaru/Local Sites/style-manager/app/public/wp-content/themes/anima"
npm run buildwebpack --mode=production— compiles JS entry points todist/js/gulp compile:styles— compiles SCSS to CSS indist/css/(with RTL variants)gulp zip— runs the full packaging pipeline:build:translate— generates.potfilebuild:folder— rsync to../build/anima/, removes files per.zipignorebuild:fix— fixes permissions (755/644), line endings (UNIX), replaces__theme_txtdwithanimabuild:zip— creates../Anima-X-Y-Z.zip, deletes build folder
Output: ../Anima-2-0-12.zip (one directory up from the theme).
npm run devRuns webpack in watch mode + gulp dev (BrowserSync + SCSS watch).
npm run styles # gulp compile:styles only
npm run scripts # webpack production only# Check size (should be reasonable, not tiny)
ls -la ../Anima-*.zip
# Must NOT contain CLAUDE.md, src/, node_modules/, or dev config
unzip -l ../Anima-2-0-12.zip | grep -E "CLAUDE.md|/src/|node_modules|webpack"
# Check version
unzip -p ../Anima-2-0-12.zip anima/style.css | head -15anima/
├── assets/ # Static assets (fonts, images, separators)
├── dist/ # Compiled output (JS + CSS) — committed to git
│ ├── css/ # Compiled stylesheets + RTL variants
│ └── js/ # Compiled scripts + minified versions
├── inc/ # PHP includes
│ ├── admin/ # Customizer, nav menu admin
│ ├── fse/ # Full Site Editing patterns
│ ├── integrations/ # Plugin integrations
│ │ ├── style-manager/ # Style Manager (colors, fonts, layouts)
│ │ ├── novablocks.php
│ │ ├── jetpack.php
│ │ └── woocommerce.php
│ ├── required-plugins/ # TGM Plugin Activation
│ └── upgrade/ # Theme upgrade routines
├── languages/ # Translation files (.pot)
├── parts/ # FSE template parts (header.html, footer.html)
├── src/ # Source files (excluded from ZIP)
│ ├── js/ # JavaScript source
│ │ ├── scripts.js # Main entry (App component)
│ │ ├── woocommerce.js # WooCommerce entry
│ │ ├── editor.js # Block editor entry
│ │ ├── components/ # JS components (navbar, hero, search-overlay)
│ │ ├── blocks/ # Block filters (button, paragraph, separator)
│ │ └── admin/ # Customizer scripts
│ └── scss/ # SCSS source
│ ├── style.scss # Main entry point
│ ├── setup/ # Variables, mixins, functions, typography
│ ├── components/ # UI component styles
│ ├── blocks/ # Block styles (core, Nova Blocks, WooCommerce)
│ ├── custom-properties/ # CSS variable definitions
│ ├── woocommerce/ # WooCommerce overrides
│ └── utility/ # Utility classes
├── tasks/ # Gulp build tasks
├── templates/ # FSE block templates (25+ HTML files)
├── woocommerce/ # WooCommerce template overrides
├── functions.php # Theme setup and initialization
├── style.css # Compiled main stylesheet (with theme header)
├── theme.json # Block theme configuration (v2)
├── webpack.config.js # Webpack config
├── gulpfile.js # Gulp task registry
└── package.json # Dependencies and scripts
| Entry | Source | Output |
|---|---|---|
| scripts | src/js/scripts.js |
dist/js/scripts.js + .min.js |
| woocommerce | src/js/woocommerce.js |
dist/js/woocommerce.js + .min.js |
| editor | src/js/editor.js |
dist/js/editor.js + .min.js |
| customizer-nav-menus | src/js/admin/customizer-nav-menus.js |
dist/js/admin/customizer-nav-menus.js + .min.js |
Externals: React and jQuery are provided by WordPress.
The theme's visual design (colors, fonts, spacing) is controlled by the Style Manager plugin via:
inc/integrations/style-manager/— connected fields, color palettes, font palettes, layout options- CSS custom properties prefixed with
--sm-(e.g.,--sm-current-accent-color) theme.jsonrestricts custom colors/fonts to enforce Style Manager control
- Block templates in
templates/(index, single, page, archive, search, 404, etc.) - Template parts in
parts/(header, footer) - Block patterns in
inc/fse/patterns/ - Custom template canvas in
inc/fse/template-canvas.php
Defined in inc/integrations/novablocks.php. Provides custom separator markup, hero block support, and color signal classes.
Four registered menus: primary, secondary, tertiary, search-suggestions.
Template overrides in woocommerce/, dedicated styles in src/scss/woocommerce/, and scripts in src/js/woocommerce.js.
For every fix or improvement:
- Create a GitHub issue describing the problem and proposed fix
- Assign to the latest open milestone (or create a new one if none exists)
- Commit referencing the issue — use
(#NNN)in the commit message - Close the issue after the fix is pushed —
gh issue close NNN -r completed
# Example workflow
gh issue create --title "Fix XSS in widget output" --milestone "2.0.13" --label "[Type] Bug"
# ... apply fix ...
git add inc/widgets.php
git commit -m "Fix XSS in widget output (#NNN)"
git push origin main
gh issue close NNN -r completedWhen changing the version, update:
-
style.cssheader →Version: X.Y.Z(in the compiled output — rebuild after changing source) - Source SCSS that generates
style.cssif version is embedded there
The build system reads the version from the style.css header to name the ZIP file.
git add <files>
git commit -m "message"
git push origin main
# Tag and release
git tag -f X.Y.Z
git push origin X.Y.Z --force
# Create release with ZIP
gh release create X.Y.Z ../Anima-X-Y-Z.zip --title "X.Y.Z - Title" --notes "Release notes"This theme was originally built around WordPress 5.8–5.9 (2021–2022). Several decisions made sense at the time but conflict with how the block editor (Gutenberg) works in WordPress 6.x+. When investigating bugs, check inc/block-editor.php first — it aggressively disables core block features.
wp_render_layout_support_flagwas removed (inc/block-editor.php). This filter processes blocklayoutattributes (flex alignment, content justification) into CSS. Without it, alignments set in the editor (e.g., centered buttons) had no effect on the frontend. Fixed in 2.0.12 (#348).
wp_enqueue_global_stylesremoved (inc/block-editor.php). Disables WordPress global styles (fromtheme.json). The theme uses Style Manager instead, but this may break core blocks that depend on global CSS custom properties as WordPress evolves.wp_render_duotone_supportremoved (inc/block-editor.php). Disables duotone image filters set in the editor. Any duotone settings users apply to images will not render on the frontend.wp_restore_group_inner_containerremoved (inc/block-editor.php). Disables the inner container wrapper for Group blocks, which may affect layout in certain configurations.theme.jsondisables most settings — custom colors, gradients, font sizes, spacing, borders are all set tofalse. This forces users through Style Manager but prevents use of native block editor design controls. As WordPress block capabilities grow, these restrictions may feel increasingly limiting."layout": {}intheme.jsonis empty. This means nocontentSizeorwideSizeis defined, so WordPress doesn't generate default layout constraint styles. The theme handles layout widths entirely through its own CSS."spacing": { "blockGap": null }disables block gap support. WordPress uses this for vertical spacing between blocks. The theme uses its own spacing system (Nova Blocks--nb-*variables) instead.
When a block editor feature "doesn't work on the frontend," the first place to look is inc/block-editor.php — it's likely being explicitly disabled. Before re-enabling a filter, test that the theme's CSS doesn't conflict with the generated WordPress styles.
- #349 — Menu item badge:
esc_html()(inc/admin/class-admin-nav-menus.php:977) - #350 — Menu item description:
wp_kses_post()(inc/extras.php:380) - #351 — WooCommerce product title:
esc_html()(inc/integrations/woocommerce.php:288)
- #352 — Search query:
esc_attr()onget_search_query()(inc/admin/class-admin-nav-menus.php:834) - #353 — Body class options:
sanitize_html_class()(inc/template-functions.php:69,77) - #354 — Transparent logo sanitize callback:
absint()(inc/admin/class-admin-customize.php:104) - #355 — Separator symbol: allowlist validation before
get_template_part()(inc/integrations/novablocks.php:171) - #356 — Upgrade notice:
esc_html()on theme name and version (inc/upgrade/class-Anima_Upgrade.php:148) - #361 —
save_custom_fieldsnonce: relies on WP core nonce (no code change, documented)
- #357 — Admin field labels/IDs:
esc_attr()andesc_html()(inc/admin/class-admin-nav-menus.php:226-230,586-590) - #358 — Pixelgrade Care installer:
esc_html()on title,esc_js()on status (inc/integrations/pixelgrade-care.php:139,188) - #359 — CSS selector output:
esc_html()(inc/admin/class-admin-nav-menus.php:292) - #360 — Removed unused
debug()method withvar_dump()(inc/upgrade/class-Anima_Upgrade.php:176)
- PHP: WordPress coding standards. Tab indentation (4 spaces wide).
- JS: WordPress Babel preset. Space indentation (2 spaces).
- SCSS: Space indentation (2 spaces). BEM-like naming (
.c-component__element). - Text domain: Always use
__theme_txtdin source (replaced at build time). - CSS custom properties:
--sm-*from Style Manager,--nb-*from Nova Blocks. - Editor config:
.editorconfigdefines indentation rules per file type.