Skip to content

WP Packages is our new WPackagist replacement that's 17x faster and updates every 5 minutes

Sage
  • Sage page

Roots is an independent open source org, supported only by developers like you. We’ve been improving the WordPress developer experience since 2011, and your support keeps it independent.

Gutenberg Block Editor Support in Sage

View as Markdown:

Sage includes two assets that are enqueued when working with the WordPress block editor, also known as Gutenberg:

  • resources/js/editor.js
  • resources/css/editor.css

Any styles added to editor.css will only be applied to the block editor.

All blocks must have version 3 support

Sage's editor.css expects the block editor to be iframed. If you have any blocks that don't support version 3, then the block editor won't be iframed.

(Reference)

theme.json generator

Sage includes a theme.json file for configuring the WordPress editor. It's generated during asset builds automatically and accounts for settings from your Tailwind setup.

theme.json spec

Reference the theme.json documentation for the full specification.

Due to Sage including a theme.json file, this means trying to use add_theme_support() to configure the editor will not work.

Tailwind CSS colors, font families, and sizes are generated on the theme build for theme.json. See the Sage docs on Tailwind CSS for more information. This can be disabled in vite.config.js.

Last updated