Skip to content

Responsive settings

How block attributes map to Tailwind-like classes on the frontend and in the editor.

Enable per block

In block.json:

json
{
  "supports": {
    "webentor": {
      "display": true,
      "spacing": true
    }
  }
}

Here is the schema of supports.webentor in a scan-friendly format:

PropertyTypeDescription
spacingbooleanEnables Spacing controls (padding and margin).
displayboolean | objecttrue enables all Display controls. Use an object for granular control flags.
gridbooleanEnables Grid controls.
gridItembooleanEnables Grid Item controls.
flexboxbooleanEnables Flex controls.
flexboxItembooleanEnables Flex Item controls.
blockLinkbooleanEnables Block Link controls.

When display is an object, use these properties:

PropertyTypeDescription
displaybooleanShows display controls (e.g., none, block, flex, grid).
widthbooleanShows width controls.
minWidthbooleanShows min-width controls.
maxWidthbooleanShows max-width controls.
heightbooleanShows height controls.
minHeightbooleanShows min-height controls.
maxHeightbooleanShows max-height controls.

Breakpoints

Editor tabs are driven by webentor.core.twBreakpoints (default: basic, sm, md, lg, xl, 2xl). Classes are emitted with prefixes (sm:pt-4, lg:grid-cols-3).

Theme tokens

Tokens come from webentor.core.twTheme (colors, spacing, radii, sizes). Ensure your webentor-config.ts safelists generated classes.

Rendering

On render, Core computes:

  • block_classes – outer/wrapper classes (layout, spacing, display)
  • bg_classes – background-related classes

These are passed to Blade views and can be filtered via:

  • webentor/block_classes(string $classes, WP_Block $block)
  • webentor/block_bg_classes(string $classes, WP_Block $block)

Tips

  • Provide only the property groups you need per block to keep UI focused.
  • Large class surfaces: rely on safelist generation in webentor-config.ts.
  • Combine with recipes like hero banner.