Problem/Motivation
Most of the layout style features (margin, padding, gap, etc) uses the Style Engine to render CSS https://developer.wordpress.org/block-editor/reference-guides/packages/p...
Nothing needs to be done at the editor level, it's already implemented when using the Edit Post package but for rendering the blocks at "front-end", we need to do it at server-side.
Proposed resolution
Gutenberg's Style Engine package also includes PHP scripts to generate the style. We should take core Gutenberg's approach and have a build script to copy the PHP files and adjust it as necessary for Drupal.
Issue fork gutenberg-3424110
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
marcofernandes commentedSome of the scripts were implemented at the Layout processor:
https://git.drupalcode.org/project/gutenberg/-/blob/3.0.x/src/BlockProce...
But probably needs a refactor to improve maintainability.
Comment #4
marcofernandes commentedThe latest MR is good enough as an initial implementation for the Style engine and its integration with Layout processor (block supports).
Further development should be addressed/tracked on another issue.
Comment #6
marcofernandes commented