Skip to content
Gutenberg Builder Architecture

Symmetric Compilation. Native Block Grammar.

How ZeeTheme generates zero-waste per-attribute CSS in the browser editor and replicates identical styles via server-side PHP — with zero runtime JavaScript on the frontend.

sample-markup.html
<!-- wp:zee-blocks/container {"padding":24,"borderRadius":8} -->
<div class="zee-block-container">
  <!-- wp:zee-blocks/advanced-heading {"level":"h2"} -->
  <h2>Symmetric Compilation & Native Grammar</h2>
  <!-- /wp:zee-blocks/advanced-heading -->
</div>
<!-- /wp:zee-blocks/container -->

Compilation Symmetry

Symmetric Compilation: Client JS & Server PHP

The exact same CSS output is generated in the browser for live editing and by WordPress PHP on the server for uncached first paints.

Client Compiler (Gutenberg Block Editor)

Real-time style generation updating DOM style elements with zero layout stutter or iframe reloads.

generateBlockCSS.js
// client: generateBlockCSS.js
export function generateBlockCSS(attributes, clientId) {
  const { padding, borderRadius, gap } = attributes;
  const rules = [];
  if (padding !== undefined) rules.push(`padding: ${padding}px;`);
  if (borderRadius !== undefined) rules.push(`border-radius: ${borderRadius}px;`);
  if (gap !== undefined) rules.push(`gap: ${gap}px;`);
  return rules.length ? `#block-${clientId} { ${rules.join(' ')} }` : '';
}

Server Compiler (WordPress Core Engine)

Identical AST attribute traversal executed in PHP during server-side render, inlined for instant critical CSS.

build_css.php
// server: Zee_Block_Base::build_css()
public function build_css( array $attributes, string $client_id ): string {
    $rules = [];
    if ( isset( $attributes['padding'] ) ) {
        $rules[] = sprintf( 'padding: %dpx;', (int) $attributes['padding'] );
    }
    if ( isset( $attributes['borderRadius'] ) ) {
        $rules[] = sprintf( 'border-radius: %dpx;', (int) $attributes['borderRadius'] );
    }
    return ! empty( $rules ) ? sprintf( '#block-%s { %s }', esc_attr( $client_id ), implode( ' ', $rules ) ) : '';
}

Interactive Studio

Live Attribute Compilation Studio

Adjust block layout attributes and observe the real-time symmetric generation of compiled CSS rules and Gutenberg comment grammar.

Attribute Controls

3 cols
16px
24px
8px
Item Border StrokeHighlight child grid slot boundaries
Live Block Canvas3x1 layout
Slot 01Dynamic Content
Slot 02Dynamic Content
Slot 03Dynamic Content

Zero-Waste CSS & Markup

Zero additional dynamic CSS emitted for unmodified attributes.

146 B compiled
zee-block.css
#block-demo-container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
  border-radius: 8px;
}

DOM Architecture

Markup Economy: Native vs Generic Wrapper Inflation

A structural comparison of native Gutenberg block output versus the multi-layered wrapper trees common to legacy page builders.

CapabilityZeeTheme ArchitectureGeneric Page-Builder Category
Single semantic DOM element per block (demonstration)IncludedExcluded
Per-attribute dynamic CSS compiled only when modified (demonstration)IncludedExcluded
Identical CSS compilation in JavaScript editor and PHP serverIncludedExcluded
Zero runtime JavaScript required for layout and styling (target)IncludedExcluded
Native WordPress block grammar HTML comment storageIncludedExcluded

ZeeTheme Output (Demonstration)

zeetheme-semantic-output.html
<!-- ZeeTheme: single semantic element -->
<section class="zee-block-container" style="--gap: 1.5rem;">
  <h2>Engine Overview</h2>
  <p>Direct semantic node representation without wrapper inflation.</p>
</section>

Generic Page-Builder Output (Demonstration)

generic-builder-output.html
<!-- Generic Page-Builder: nested wrapper demonstration -->
<div class="builder-section-wrap">
  <div class="builder-container">
    <div class="builder-row">
      <div class="builder-column">
        <div class="builder-widget-wrap">
          <div class="builder-element">
            <h2>Engine Overview</h2>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

Platform Native

Engineered for Modern WordPress

ZeeTheme embraces modern Gutenberg platform primitives rather than building an isolated runtime sandbox.

iframe Editor Isolation

The Gutenberg editing canvas runs inside an isolated iframe, eliminating stylesheet collisions between WP Admin UI and front-end theme tokens.

Native Block Bindings

Connect block attributes directly to custom fields, post meta, and site options using the WordPress Core Block Bindings API without bespoke shortcodes.

Interactivity API

Interactive blocks utilize WordPress Core's declarative Interactivity API for hydration, keeping static blocks 100% free of JavaScript runtime dependencies.

Explore the Native Blocks Directory

Browse every released and planned block, examine compiled zero-waste CSS rules, and copy clean Gutenberg markup directly to your clipboard.