bricks_html_to_bricks
Converts HTML and CSS into Bricks Builder JSON elements, handling flex-to-container, grid-to-CSS custom, and other Bricks conventions automatically.
Instructions
Convert HTML/CSS to Bricks Builder JSON elements. Tries Bricks 2.3 native converter first, falls back to our local converter. Handles flex→container, grid→_cssCustom, px stripping, and all Bricks conventions automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | Optional CSS stylesheet to apply. Class-based rules will be matched to elements. | |
| html | Yes | HTML markup to convert. Can be a full page or a fragment. | |
| prefer_native | No | Try Bricks 2.3 native HTML converter first (default: true). Falls back to local converter if unavailable. | |
| resolve_classes | No | Resolve HTML CSS class names against the site's global class registry. Matches are added as _cssGlobalClasses. Default: true. | |
| wrap_in_section | No | Whether to wrap top-level non-section elements in section > container. Default: true. |