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

Command icon 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

marcofernandes created an issue. See original summary.

marcofernandes’s picture

Some 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.

marcofernandes’s picture

The 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.

marcofernandes’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.