Editor styles + frontend styles

How are the frontend styles supposed to be injected into the Gutenberg editor?
The editor.scss shipped with Sage 10 contains adjustments for the editor GUI.

Those styles can be enqueued as editor styles and Gutenberg editor will automatically wrap these styles.

This may be also interesting (WordPress loopback):

Follow up (also to close this): Adding the frontend styles as editor styles allows to be agnostic towards the technique that Gutenberg editor uses to isolate the styles from its UI.
In the near future the iframe will be used instead, see

Therefore hardcoded style isolation (by prefixing a editor-styles-wrapper CSS class selector) would then either be unnecessary or even require additional post-processing which itself was thought to avoid in the first place.

1 Like