Blocks CSS: CSS Editor for Gutenberg Blocks
Blocks CSS: CSS Editor for Gutenberg Blocks
Description
Blocks CSS allows you add custom CSS to your Blocks straight from the Block Editor (Gutenberg).
It adds a syntax-highlighted CSS Editor where you can add additional CSS to your Gutenberg Blocks to style them the way you want.
All the code and sources for this plugin are publicly available as part of https://github.com/Codeinwp/otter-blocks.
Reviews
Indispensable!
By maltmann on February 8, 2026
Works like a charm on any of my recent WP projects.
[EDIT]
I need to change my review.
On some setups, I get two CSS editors shown in the "Custom CSS" attribute panel, and only contents of the second instance are getting saved.
Problem:
Two CodeMirror editors are displayed in the Custom CSS panel of the Blocks CSS plugin instead of one. Both editors are located in the same container.
Assumed Root Cause:
WordPress enables React StrictMode by default in the Block Editor.
React StrictMode runs useEffect hooks twice to detect potential side effects.
Analysis:
The Blocks CSS plugin initializes CodeMirror in a useEffect hook.
Since this useEffect doesn't have a cleanup function that checks whether CodeMirror is already initialized, wp.CodeMirror() is called again on every mount cycle. With StrictMode enabled, this means: twice on the same DOM element.
Probable Solution:
The useEffect hook should implement a cleanup function that prevents CodeMirror from being initialized multiple times on the same element.
Side Notes:
This only happens in some of my setups.
I couldn't figure out any possibly conflicting theme, plugin or code snippet. So I assume it might be something like a timing issue.
Conclusion:
I won't change the 5-star rating, because despite of this problem the plugin does its job.
And I know how to handle this issue by a simple CSS rule to hide all Block CSS CodeMirrors except the last one:#o-css-editor .CodeMirror:not(:last-child) {
display: none;
}
Отличный плагин
By Сергей (serzh82) on November 20, 2025
Отличный плагин
Моя оценка: пять звезд
By shooter604 on November 14, 2025
Очень классные возможности! Пользуюсь постоянно!
The Other Review Titles Say It All
By someguy42 on July 24, 2024
"Essential, Useful Tool, Completes the Block Editor, Should be part of the core," The one thing they don't mention is how quick and genuinely concerned the support is.
Simple and great plugin!
By Andreslav (andreslav) on October 4, 2023
Does exactly what I need it to do.
Completes Block Editor
By Masud Rana (yeelloo) on September 26, 2023
Can't think of Block Editor without this. Tiny powerful thing.
Only thing I hate in this plugin is the following line:
$render_css = empty( $file_name ) || strpos( $file_name, 'post-v2' ) === false;
This means if you deactivate Otter, your content might just break 🙁
This is a great tool for those wanting to use core blocks
By Ronald Huereca (ronalfy) on September 22, 2023
This is a great tool for what it does. The only confusing thing for me is that it says on .org that you have 11 blocks. I couldn't spot any new ones after installing this plugin, nor found any settings.
Essential for one off css
By Sunny (frdmsun) on June 2, 2023
Essential for one off css. Simple and works.
Doing what it do
By yukiko-kawa on October 5, 2022
This should be part of core
By XU3E (angelxube) on September 26, 2022
Changelog
You can check the changelog here.

