Code2Bricks Changelog
See what's new, what's fixed, and how we're making the Code2bricks better.
A focused patch resolving two SVG sync issues introduced in recent releases. SVGs added or pasted in the HTML editor now correctly appear in both the structure panel and the canvas, and nested SVGs inside other elements, like icons inside buttons or cards, are no longer silently stripped during a sync cycle.
SVG elements added or pasted in the HTML editor now correctly appear in both the Bricks structure panel and the canvas. Previously, new SVGs were created in the data but never rendered, the canvas stayed unchanged. This affected all SVG insertions through the HTML editor, including pasting SVG code inside existing containers.
SVG elements nested inside other elements, such as icons inside buttons or cards, are no longer silently removed when the HTML editor syncs. Previously, a sync cycle could strip SVGs from the element tree, causing them to disappear from the structure panel and canvas.
This release adds a CSS Variable Manager so variables defined outside Bricks, in WPCodebox, theme code, or conditional selectors, show up in autocomplete just like any other variable. A new Tools section in the Settings modal gives you quick access to the Variable Manager, Recipes, and Quick Import from one place. Mixed content in buttons and links (SVGs alongside text) now imports correctly without losing content, and a round of SVG sync fixes resolves several long-standing issues with class handling, canvas updates, and false error toasts. Data attribute changes now also persist correctly on save across all template types.
Register CSS variable names defined outside Bricks — such as variables in WPCodebox, theme code, or conditional selectors like [data-brx-theme] — so they appear in the CSS editor autocomplete. Only the variable keys are stored, not values, since their values may change at runtime. Two input modes are available: List View for browsing, searching, adding, renaming, and deleting variables one by one; and Code Editor for bulk-pasting CSS blocks and extracting all --variable-name declarations automatically. Variables are saved per-site and appear immediately in suggestions after save without a page refresh, with a C2B badge in the hint dropdown alongside the existing AT, CORE, and ACSS badges.
The Settings modal now has a dedicated Tools section with quick-open buttons for the CSS Variable Manager, CSS Recipes, and Quick Import. The settings modal closes smoothly before the target tool opens, so you never end up with stacked overlays.
Elements like <button><svg>...</svg> Click me</button> and <a><svg>...</svg> Read more</a> now preserve both the SVG and text content when imported or pasted. Previously, these became structural wrappers that silently dropped adjacent text nodes. They are now correctly treated as text elements with the original tag preserved and full inner HTML kept intact — including inline SVGs, images, and text.
Clicking a global class suggestion that visually overflows the modal boundary no longer causes the modal to close unexpectedly. The overlay dismiss now only triggers when you directly click the backdrop, not when a click bubbles up after a child element is removed.
Resolved multiple issues with SVG elements in the HTML editor. SVG code pasted or typed in the editor now syncs correctly to Bricks. SVG elements display their CSS classes and custom attributes in the editor. New SVGs without a tracking reference are created as proper Bricks elements instead of being silently skipped. Classes are always managed through Bricks settings and never embedded in the SVG code string. Adding classes to SVGs no longer triggers a false “Sync error” toast. SVG code changes now clear the Bricks signature so the code is re-signed on save, and SVG elements receive class and attribute updates in the canvas preview during sync.
Data attribute changes made via the HTML editor now correctly persist when saving, including on header and footer templates. Previously, changes appeared in the builder but reverted on save because the sync engine was suppressing Bricks’ native mechanism for tracking unsaved changes. The sync engine now lets Bricks’ own change tracking handle dirty state, exactly as it does when editing through Bricks’ own attribute inputs.
A refinement release focused on cleaning up the CSS editing experience. Short Tab expansions that cluttered autocomplete have been trimmed down to only the most essential ones, and recipes are now exclusively triggered with the @ symbol so they never interrupt normal CSS typing. The selector bar no longer flickers or jumps when switching elements, the Add Selector modal now accepts any valid HTML attribute, and the autocomplete dropdown styling is now consistent regardless of third-party plugins.
The Tab expansion shortcuts have been cleaned up, only the most essential ones remain: r → %root%, v → var(), c → calc(), and imp → !important. Everything else is now accessible as a recipe via the @ trigger, keeping autocomplete clean while still having all the power one keystroke away.
Recipes no longer pop up while typing normal CSS properties. They now exclusively appear when you type @, keeping autocomplete clean and predictable. Typing @ alone shows all available recipes; typing something like @hover narrows the list.
The selector bar now remembers your last active class per element and restores it instantly when switching between elements, with no visual flickering. Element classes no longer interfere with Bricks’ own class panel state.
The Add Selector modal now accepts any valid HTML attribute — aria-label, role, tabindex, and so on — not just data-* attributes. Previously, non-data attributes would return “No valid selectors found.”
The autocomplete dropdown now consistently uses Code2Bricks styling with a minimum width, so items are never clipped or overridden by third-party plugin styles.
A focused patch release resolving four specific issues introduced and uncovered in 1.5.0. HTML attributes containing the letters “on” (like aria-controls or action) no longer get corrupted during sync, block elements are now correctly preserved in the HTML editor, the CSS formatter no longer breaks pseudo-class selectors, and Quick Import now correctly splits
Attributes like aria-controls, action, or data-icon that happen to contain the letters “on” in their name are no longer broken during HTML sync. Previously, writing <button aria-controls="menu"> could produce malformed output. This is now handled correctly for all standard and custom attribute names.
Writing <div data-bricks="block"> in the HTML editor now correctly creates a Bricks Block element, just as <div data-bricks="container"> creates a Container. Previously, block divs were treated as generic divs and the distinction was lost on sync.
The Format button no longer inserts a space after the colon in pseudo-class selectors. li:first-child, a:hover, and :nth-child(1) now stay intact after formatting, while property declarations like color: red are still formatted correctly as expected.
Pasting HTML that contains inline styles or script tags into Quick Import now correctly extracts the CSS into the CSS editor and the JavaScript into the JS editor, even when the pasted content is a partial snippet rather than a full HTML page.
This release brings full Bricks 2.3 compatibility, including support for instant navigation and nested component UIDs, with automatic version detection that adjusts behavior accordingly. The entire plugin architecture has been rewritten for stability and performance — the sync engine, Bricks bridge, and app layer are now structured into focused modules with Vue-reactivity-safe state management, resulting in faster element selection and smoother editing on large pages. On top of that, CSS Recipes introduce reusable code blocks you can insert anywhere with a single keystroke, a new Format button cleans up your CSS instantly, and autocomplete is now smarter than ever — with source badges, logical property support, and fuzzy recipe search. Several long-standing sync and persistence bugs have also been squashed, including stale editor content, silent save failures, BEM generator CSS loss, and missing Advanced Themer color variables.
Code2Bricks is now fully compatible with Bricks Builder 2.3. Instant navigation (switching pages inside the builder) and nested component UIDs are both fully supported. Version detection automatically adjusts plugin behavior based on the installed Bricks version, so no manual configuration is needed. The entire plugin architecture has been rewritten for stability and performance — the sync engine, Bricks bridge, and app layer have been restructured into focused, single-responsibility modules with Vue-reactivity-safe state management. This means faster element selection, smoother editing on large pages with complex element trees (including SVGs), and a more reliable foundation that prevents regressions as new features are added.
Reusable CSS code blocks you can insert into any CSS editor with a single keystroke. Type @ followed by a recipe name (e.g. @clickable-card) to see matching recipes appear in the autocomplete dropdown, then select one to insert the full code block at your cursor. Three useful recipes ship out of the box: button-padding, remove-default-bricks-space, and clickable-card. Open the Recipe Manager from the new toolbar button (located after Quick Import) to create your own recipes, rename, delete, or toggle them on and off. Recipes you disable won’t appear in autocomplete. You can also import and export your custom recipes as JSON to share them across projects or with your team.
A new Format button in the CSS editor action bar cleans up and pretty-prints your CSS on demand. It normalizes spacing, aligns declarations, and applies proper indentation using CodeMirror’s built-in CSS formatting engine. Your cursor position and scroll offset are both preserved after formatting, so you can format mid-edit without losing your place.
Public documentation is now available at docs.code2bricks.com, covering installation, features, workflows, and reference guides.
CSS variable suggestions now display source badges — AT, CORE, and ACSS — so you can tell at a glance where each variable comes from. Variables from Advanced Themer color palettes, Automatic.css, and Core Framework are all included automatically. Modern CSS logical properties (inline-size, block-size, margin-inline, padding-block, etc.) and newer properties like aspect-ratio, container, scroll-snap-type, and text-wrap are now suggested and auto-expanded with Enter. Recipe and snippet search is now fuzzy — typing @hide will find a recipe named visual-hide.
The radio options have been reordered to Class → ID → Data Attribute for a more natural flow. A global class search dropdown now lets you find and select existing Bricks global classes by typing a prefix, with full keyboard navigation and category badges. Data attribute names now autocomplete with common HTML and ARIA suggestions, and typing = after any attribute name automatically inserts quotes — not just on data-* attributes. The modal is also blocked from opening on uneditable component children to prevent confusion.
All CSS editors across Code2Bricks — the main CSS editor, the Recipe modal editor, and the Quick Import CSS editor — now share identical functionality. Every editor gets the same Tab expansions (r → %root%, bg → background, etc.), CSS variable hints with source badges, property autocomplete, recipe suggestions, and comment toggle. The Quick Import HTML editor also gains auto-closing tags and tag matching. Autocomplete styling is now consistent across all editors regardless of which third-party plugins are active.
The CSS editor no longer shows stale content from the previously selected element when you click a different element on the canvas. Selecting an element on the canvas or in the structure panel both correctly update the editor. When you select an element, the CSS editor now defaults to the first class instead of the element root — reducing clicks for the most common workflow. The Code2Bricks selector bar and Bricks’ active class panel now stay perfectly in sync: switching classes, removing classes, and auto-fallback after removal all work correctly in both directions. Previously, Code2Bricks could interfere with Bricks’ native class selection, making it impossible to choose a different active class in the Bricks visual panel, this is now fully resolved.
Resolved several issues where CSS edits could silently fail to persist. Edits on non-desktop breakpoints no longer write to the wrong key. Global class CSS saves that were silently skipped due to reference comparison now work correctly. Throttled saves are retried instead of dropped. When switching elements quickly, unsaved CSS is now flushed before the next element loads, and a post-save verification step confirms the edits stuck.
Global classes created by the BEM generator now correctly save their CSS. Previously, a data format mismatch caused CSS to be silently lost on serialization, and an early-return in the save path meant edits only persisted on a full page save, both issues are now resolved.
Color variables created via Advanced Themer’s color palettes now appear correctly in CSS autocomplete suggestions. Previously, variables injected via inline styles on :root were not detected, and some palette-derived variables were filtered out incorrectly. Both sources are now scanned
This release introduces a centralized Settings Modal that consolidates all Code2Bricks preferences in one accessible location, plus powerful CSS Snippet Autocomplete that speeds up writing common patterns like pseudo-selectors and media queries. CSS variable autocomplete now scans all active stylesheets automatically, surfacing variables from Automatic CSS, Core Framework, Advanced Themer, and any other framework without manual configuration. We’ve also added comprehensive container query support with intelligent snippets and optional dimension overlays, improved HTML sync reliability across numerous edge cases, and refined the CSS editor workflow to default to your first class for faster access saving you lots of click which adds up overtime.
Container queries are now significantly easier to write and use. Type container, has, or parent to get a snippet that makes the parent element a query container. Type container + TAB for a dynamic @container query that uses the selected element’s current width as the breakpoint value. The CSS editor recognizes container-specific properties like container-type, container-name, and container in autocomplete. An optional element dimension overlay, which you can enable in Settings under Canvas options, displays width and height measurements directly on the canvas for quick reference while writing container queries.
A new settings window is now available via the gear icon in the panel header, consolidating all Code2Bricks preferences in one accessible location. Control Auto-sync behavior, toggle editor visibility for HTML, CSS, and JS panels, and manage canvas options like element dimension overlays. The Auto Sync toggle has been moved here from the panel header, creating a cleaner main interface while keeping all configuration options logically grouped and easy to find.
The CSS editor now suggests helpful snippets as you type, accelerating common styling patterns. Type keywords like hover, focus, before, after, media, or container to see relevant code suggestions that insert complete, ready-to-customize blocks. New snippets for relative color syntax let you type from to instantly insert oklch(from var(--foo) L C H / 1) or hsl(from var(--foo) H S L / 1), making it effortless to derive color variations from your existing CSS variables.
CSS variable autocomplete now scans all stylesheets active in the builder, including Automatic CSS, Core Framework, Advanced Themer, and any other framework that outputs :root variables. You no longer need framework-specific setup or configuration. Variables from any active stylesheet appear automatically in suggestions, giving you instant access to your entire design system regardless of which tools generate it.
When you select an element, the CSS editor now defaults to showing the first class instead of the element root. This reduces unnecessary clicks for the most common workflow where you want to edit class styles immediately. When you return to an element with a previously selected global class, the Bricks panel now correctly shows that same class as active, keeping both panels synchronized and eliminating confusion about which selector you’re currently editing.
Elements created via the HTML editor or Quick Import that don’t have an ID or class now display readable tag names in the structure panel. You’ll see meaningful labels like “table”, “Heading 1”, “Link”, or “nav” instead of generic Bricks element names like “Div” or “Block”. This makes it much easier to identify and navigate to specific elements in complex page structures without needing to add classes just for identification purposes.
Several sync issues have been resolved to make HTML editing more predictable and reliable. Elements added or modified in Bricks are no longer incorrectly morphed when Code2Bricks syncs. Morphing now only happens when your edit genuinely changes the element type. Code elements containing raw PHP or HTML now sync correctly without their content being misinterpreted as markup. Block elements stay as blocks instead of being converted to divs. Image alt text with spaces or special characters now syncs properly, and removing the alt attribute correctly clears it in Bricks. Attribute values containing quotes, ampersands, or angle brackets are now properly escaped to keep your HTML valid and prevent parsing errors.
SVG elements inserted via Bricks, whether from file upload, dynamic data, or icon-set source, no longer have their source type overwritten to “code” during sync. This preserves the original SVG configuration and prevents unexpected behavior. SVG attributes like xmlns, viewBox, fill, and stroke are no longer duplicated. They stay correctly stored in the SVG code without creating redundant attribute entries that could cause rendering issues.
Renaming a class in the HTML editor now correctly preserves whether it was a global class or element-level class. When you rename a global class, the rename updates the existing class everywhere it’s used across your site instead of creating a new class and leaving the old one orphaned.
This release resolves critical compatibility issues with Core Framework, ensuring both plugins work seamlessly side by side without interfering with each other’s drag behaviors or UI elements. Canvas resizing now works accurately on zoomed-out previews and intelligently disables on non-desktop breakpoints to prevent conflicts with Bricks’ responsive behavior. We’ve also added automatic UI hiding in preview mode, introduced gutter-based panel resizing for a more intuitive editing experience, and implemented encrypted storage for license data to enhance security.
When you click the Preview button in the Bricks toolbar, all Code2Bricks panels and resize handles are now hidden automatically. The extra padding reserved for the editor panel is also removed so you see a clean full preview. Exiting preview brings everything back, letting you seamlessly switch between editing and preview modes.
The HTML, CSS, and JavaScript editor panels now resize using visible drag gutters between them. Dragging a gutter redistributes space between its two neighboring panels. When you hide an editor, the remaining panels automatically fill the available width with no empty gaps. Your panel sizes are remembered between sessions for a consistent workspace layout.
Your license key and activation data are now encrypted before being stored in the WordPress database. Previously, this data was saved as plain text. If you are upgrading from a previous version, your existing license is automatically migrated to the encrypted format with no action needed on your part, providing enhanced protection for your sensitive licensing information.
The responsive preview resize handles no longer stop working when the Core Framework plugin is active. Previously, Core Framework’s drag behavior would intercept mouse events and prevent the resize handles from responding. Both plugins now work side by side without interfering with each other’s functionality.
When you set a preview width larger than your screen (for example 1440px), Bricks scales the canvas down to fit. The resize handles now account for this scaling, so dragging them changes the canvas width accurately regardless of zoom level. The handles also stay correctly positioned at the edges of the canvas at all times, eliminating the misalignment that occurred on scaled-down views.
The canvas resize handles are now automatically disabled when you switch to tablet, mobile landscape, or mobile portrait breakpoints. This prevents conflicts with Bricks’ own responsive behavior on those breakpoints. The handles show a visual indicator (changed cursor and reduced opacity) so you can tell they are inactive. Switching back to desktop re-enables them immediately.
Editing HTML in Code2Bricks no longer silently changes Bricks “block” elements into “div” elements. Both element types produce identical HTML output, so the sync engine previously treated them as different and would swap one for the other. Element types now stay exactly as you set them in Bricks unless you make a change that genuinely requires a different element type.
If you use Core Framework alongside Code2Bricks, both BEM class generator buttons in the structure panel are now visible and accessible. Previously, Core Framework’s button would overlap on top of the Code2Bricks button, making both difficult to use. The buttons now coexist without visual conflicts.
This release fundamentally improves CSS autocomplete reliability, eliminating the frustrating stop-and-start behavior where suggestions would work in one context but disappear in another. The suggestion engine is now context-aware, showing relevant property values based on what you’re editing. Visual consistency and menu interaction have been refined throughout, making the CSS editing experience feel smoother and more predictable across all scenarios.
Suggestions are now context-aware when you enter property values. After choosing a property like display, the suggestion list automatically focuses on values that make sense for that specific property. This intelligent filtering makes CSS writing faster and more intuitive by surfacing only relevant options instead of overwhelming you with every possible value.
The suggestion menu now behaves more consistently with clearer visual states while navigating through options. Hover and active states are easier to distinguish, and overall interaction in the CSS editor feels smoother and more predictable. The refined visual polish removes distractions and keeps you focused on writing styles.
The CSS suggestion box now appears reliably while you type, working consistently in longer imported styles, nested sections, pseudo selectors, and regular day-to-day editing. This eliminates the unpredictable behavior where autocomplete would suddenly stop working mid-session, forcing you to restart your editing flow.
This release refines HTML tag detection to mirror your actual Bricks output more accurately, making the editing experience feel more predictable and natural. We’ve improved how Enter key indentation works in nested markup, enhanced semantic element handling during structural edits, and clarified how JavaScript imports behave when working with multiple root elements. Additional fixes ensure CSS autocomplete works reliably in nested contexts and imported styles land on the right elements.
The HTML editor now mirrors your real Bricks output with greater fidelity, including better handling for container markers and rendered tag types. What you edit in the HTML panel now matches what you see on the canvas more consistently, reducing surprises when switching between code and visual views.
Pressing Enter in the HTML editor now behaves more naturally with cleaner indentation in nested markup. Cursor placement remains stable while editing element attributes, eliminating the frustrating jumps that previously occurred mid-edit. The result is a typing experience that feels responsive and predictable.
Better handling when you change element meaning, in HTML when you change an element to a different type while editing HTML (for example, turning a wrapper element into a text element), Code2Bricks now updates that change more reliably so the result in Bricks matches what you wrote.
When importing multiple root elements with JavaScript, Code2Bricks now stores the script in a dedicated global JavaScript code element instead of fragmenting it across individual elements. This approach provides clearer behavior and makes imported scripts easier to locate and maintain in your project.
Unrecognized selectors from imported CSS are now assigned more predictably to target elements. Imported styles apply to the expected elements more consistently, reducing manual cleanup after bringing external CSS into your Bricks project.
CSS autocomplete now works reliably inside nested media queries and nested rule blocks. Advanced CSS editing with complex nesting structures is smoother, with property suggestions appearing correctly regardless of nesting depth.
This release introduces Quick Import for converting full HTML/CSS/JS snippets directly into native Bricks elements in one action, plus a native CSS comment toggle shortcut that works exactly as you’d expect. We’ve made imported CSS and JavaScript significantly more reliable with better handling for compound selectors, media queries, and persistent element linking. Import formatting is cleaner, the UI is more stable, and we’ve resolved Advanced Themer css hint box styling conflict and compatibility issues that were affecting autocomplete behavior.
Import a complete HTML/CSS/JS snippet and convert it directly into native Bricks elements in one action. Quick Import accepts full-page input, automatically splits code into the appropriate editors, and inserts content based on your current selection in Bricks. No more manual copy-paste across multiple editors—bring your entire component stack in at once.
Toggle CSS comments instantly with Ctrl+/ (Windows) or Cmd+/ (Mac) for selected code blocks in the CSS editor. This uses CodeMirror’s native commenting behavior for reliable wrap/unwrap functionality, making it effortless to temporarily disable styles during debugging or testing.
CSS autocomplete hint styling and completion behavior are now stable when Advanced Themer is active. Improvements include safer hint scoping to prevent style conflicts and improved cursor placement after property completion, eliminating the jarring cursor jumps that occurred when both plugins were running simultaneously.
Code2Bricks integrates HTML, CSS, and JavaScript editors directly into Bricks Builder. Work visually when it makes sense, drop into code when it's faster. One workflow, zero context switching.
