WordPress plugin intelligence profile

Headless Block Styles

Exposes Gutenberg block inline styles and the global stylesheet over the REST API for headless frontends like Next.js.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 7.0
Current version0.1.0
WordPress coverageTested up to WordPress 7.0
Minimum stackWP 6.1 · PHP 7.4
Directory statusactive
Last directory update21 Jul 20263mo ago
Active installationsNewAdoption metric — not a quality score
WordPress.org ratingNo WordPress.org ratings yet
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records Headless Block Styles version 0.1.0 as active, updated 3mo ago and tested up to WordPress 7.0.

Overview

About this plugin

g. js) using the WordPress REST API — no WPGraphQL required.

It does two things:

  • Serves the global stylesheet ( wp_get_global_stylesheet() ): all --wp--preset--* CSS variables, preset classes ( has-*-color, has-*-font-size, …), and theme/user styles — the CSS WordPress would normally enqueue on its own frontend.
  • Computes per-block inline styles on the server with the WordPress Style Engine and adds a block_data field to post REST responses, so your frontend receives ready-to-spread React style objects instead of deriving them from raw block attributes in JavaScript.

REST API

GET /wp-json/headless-block-styles/v1/stylesheet

  • types — comma-separated subset of variables,presets,styles,base-layout-styles. Omit for all.
  • format — json (default) or css (raw CSS, usable directly in a <link> tag).

GET /wp-json/headless-block-styles/v1/theme

json settings ( wp_get_global_settings() ) — color palette, font sizes, layout sizes.

block_data field on posts and pages

Every REST-enabled post type response gains a block_data field: the parsed block tree where each block carries inlineStyles (camelCase, ready for a React style prop), classNames (editor-parity has-* classes), attributes, innerHTML, and recursive innerBlocks.

contentSize/wideSize/justifyContent`).

rendered_blocks field on posts and pages

For rendering WordPress’s HTML faithfully: returns html, css, and svg — the rendered block markup together with the block-support CSS WordPress generates at render time (layout container rules, element link/button colors, duotone filters) and the duotone SVG definitions. On a normal WordPress frontend this CSS is printed in a <style> tag and never reaches REST consumers; here it is captured from the same render as the returned HTML so the generated class names always match.

Not needed on a request? _fields=id,title,content.

Filters

  • headless_block_styles_block_inline_styles — modify a block’s computed style object. Args: $styles, $attrs.
  • headless_block_styles_block_class_names — modify a block’s computed class names. Args: $classnames, $attrs.
  • headless_block_styles_post_types — which post types get the block_data field.

com/FuSan21/headless-block-styles

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • rest api
  • blocks
  • decoupled
  • gutenberg
  • headless
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 7.0

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 7.0.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to7.0
Minimum requirementsWordPress 6.1 · PHP 7.4
Update activity21 Jul 20263mo ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.