Browser: Chrome 136
OS: Windows
Video: ClickUp
Hi Bricks Team,
Thank you for the fantastic Bricks 2.0 beta—new component variations are an absolute game-changer. While testing today’s beta, I encountered two separate issues in the Builder. You can reproduce both with the same simple component:
Reproduction Steps
-
Create a component, e.g.: div with class .card .
-
Add a Global Classes property with two options:
card--primary
card--secondary
- Connect that Global Classes property to the component’s
class
attribute. - Select the component instance and choose the “Primary” variant.
- Save and Refresh the Builder.
Bug 1. PHP Warning with External Files
With CSS Loading Method set to External Files, saving and refreshing produces this warning:
Warning: foreach() argument must be of type array|object, string given
in …/bricks/includes/assets.php on line 3271
Switching to Inline Styles removes the warning.
Bug 2. Component Classes Order Resets on Save/Refresh
- When you select a variant on the component instance, the Builder initially applies styles in the correct order (base
.card
first, then.card--primary
). - After you save and refresh the builder, the variant
<style>
block is injected before the base<style>
, so the.card--primary
rules no longer override the base styles:
<style> /* .card--primary styles */ </style>
<style> /* .card styles */ </style>
- On the front end, class order and styling remain correct.
Expected behavior:
The Builder should preserve the base-then-variant ordering exactly as on the front end.
I’ve recorded a screen capture showing both issues in action. Thanks again for all your hard work—Bricks 2.0 is looking fantastic!