BlockGlow — Per-block Custom CSS

plugin banner

Adds a "Custom CSS" inspector panel to every Gutenberg block and saves per-block CSS files to uploads for front-end enqueuing.

Author:Mary Rose Elbambo (profile at wordpress.org)
WordPress version required:5.8
WordPress version tested:6.9.1
Plugin version:1.1.7
Added to WordPress repository:09-01-2026
Last updated:11-01-2026
Rating, %:0
Rated by:0
Plugin URI:https://wordpress.org/plugins/blockglow/
Total downloads:157
plugin download
Click to start download

BlockGlow adds a “BlockGlow — Custom CSS” panel to the inspector of every block. Use it to scope custom CSS to a single block instance. The plugin stores CSS in the uploads folder (under uploads/blockglow/) and enqueues the generated CSS file when rendering on the front end. If the uploads directory isn’t writable or file write fails, BlockGlow will fall back to outputting inline styles.

Key features:

  • Adds two block attributes to every block: blockglowCustomCSS and blockglowId.
  • Inspector panel with a CodeMirror-backed code editor (if WordPress provides it) or a fallback textarea supporting Tab and Shift+Tab outdent.
  • Live preview inside the block editor: custom CSS is scoped to the block in the editor so you can see the effect while editing.
  • CSS files are saved to wp-content/uploads/blockglow/blockglow-<id>.css and enqueued on the front end as a linked stylesheet; files are removed automatically when you clear the Custom CSS field.
  • Graceful fallback to inline styles when file writing isn’t possible.

How scoping works:

BlockGlow creates a unique blockglowId for each block instance and scopes your CSS with a wrapper selector like:

[data-blockglow-id="bg-xxxxxxx"] { /* your declarations */ }

For convenience you can use & as the wrapper shorthand in the editor. Example:

& .my-class { color: red; }

The plugin will replace & with the wrapper selector for both editor preview and front-end output.

Support

If you find issues or want improvements (for example: limiting who can edit per-block CSS, collecting styles into a single head include, or adding an admin UI to manage generated CSS files), open an issue in the repository or reply here and I will assist.


FAQ
ChangeLog