-
Task
-
Resolution: Unresolved
-
Could have
-
None
-
None
-
Blocks (all), Maintenance, Technical Debt
The original WP block API would output the editor component of each block in a wrapper div.
In the V2 block registration API this wrapper div is removed, and instead the wrapper props are passed to the edit component to allow it managing its own wrapper.
This has multiple benefits:
- Much easier to use front end CSS in the editor.
- Better block alignment behavior.
- Less complex HTML tree is easier to work with and has better performance.
However it could for some blocks be tricky to rewrite the code. The V1 API will keep being supported, so we can decide for each block whether it's worthwhile.
For example in the carousel header block currently needs additional CSS on top of the ".alignfull" class for that one to work.
- opened during git code review in
-
PLANET-6670 Support full alignment on blocks
- CLOSED
- relates to
-
PLANET-5876 Investigate useBlockProps hook
- OPEN