WAIT: Global classes disappearing in Bricks Builder to be transformed into selectors

Browser: Chrome 110
OS: Windows

A global class I had been using heavily for months (svg_style_container) disappeared entirely from the class manager, including the trash. Its CSS survived only as a hardcoded selector inside an unrelated class, suggesting the class entry was either corrupted or silently deleted. I also noticed this happening abundantly with another class.

Steps to reproduce (suspected)

  1. Create a global class in the Bricks class manager (e.g. svg_style_container)
  2. Write custom CSS inside it using %root% as the selector:
%root% svg * { transition: fill 0.7s ease-in-out; }
%root%:hover svg * { fill: currentColor; }
  1. Apply the class to multiple elements across the site
  2. Over time (days/weeks), observe that the class stops working
  3. Check the class manager — the class is gone, not even in the trash

What I found in the exported JSON

When exporting all 298 classes, svg_style_container did not appear as its own class entry. It appeared only as a hardcoded CSS selector inside another class (card-wrap), where someone had previously written CSS using .svg_style_container as a literal selector (not %root%). This CSS survived because it lives inside a different class — but the original class record itself is gone from the database.

Suspected root cause — %root% resolution race condition

While editing classes, I have repeatedly observed that %root% momentarily resolves to the specific element ID (#brxe-xxxxxxx) before correcting itself to the class name. This suggests a race condition in the %root% resolver.

Hypothesis: if a save occurs during that brief window where %root% has resolved to an element ID, the CSS is compiled and stored with that ID as the selector. This would cause the class to function only for that specific element, effectively breaking global usage — and may also corrupt or orphan the class entry in the database, leading to it eventually being purged or becoming invisible.

Impact
The class was applied to dozens of elements across the site. All SVG hover animations silently broke. No error, no warning, no trace in the trash.

Environment

  • Bricks Builder: 2.3.2
  • Bricks Child Theme: 1.2 (active)
  • Web server: LiteSpeed
  • DB server: MariaDB 10.6.25

Active plugins:
ACF QuickEdit Fields, Bricks BEM Generator, FluentAuth, Google for WooCommerce, HappyFiles Pro, LiteSpeed Cache, Ifthenpay - Paywal for WooCommerce, Patchstack Security, Relevanssi, Secure Custom Fields, Simple CAPTCHA Alternative with Cloudflare Turnstile, The SEO Framework, UpdraftPlus, User Role Editor, WooCommerce, YotuWP - YouTube Gallery

Questions

  • Is the %root% → #brxe-xxx flash a known issue during class editing?
  • Is there any mechanism that can purge class entries that lack a modified or user_id field in the database?
  • Are class records stored as a specific post type that could be affected by DB cleanup routines?

Has anyone noticed something similar?

Hey @vascob,

thank you for sharing this. If I understand correctly, the class was gone, as if, it was not possible to select it anymore? I have to say I never experienced this issue, so I’m curious what could happen. :thinking:

Ideally, if you have a staging website or a backup that you can restore to staging site, where this issue is visible, can you do that and share access? That way, I could see if there is any mention about the class in the database. Do you think it’s possible that you mistakenly deleted it?

%root% is just a “placeholder” that will get translated to current class or ID and this should not affect it.

No, there is no option like this.

Classes are stored inside a wp_options table as one option, so something has to override it.

Matej

Hi Matej, unfortunately I can’t replicate the issue. But if I find something more about I’ll share it here. Thank you for replying!

Ok, then let me know if you will be able to replicate it.
I’ve checked my old classes, but they are all still there., so not sure what could trigger this and how to replicate it.

Thanks and if you notice anything, please let me know.
Matej