Browser: Chrome 110 OS: macOS / Windows / Linux / etc.
Hi everyone,
I’d like to report a bug I’m experiencing with Components Variants in Bricks 2.2.
The issue: When creating variants of a Component, class-level changes are not isolated between variants — they bleed into all other variants as well. Only ID-level changes work correctly.
Steps to reproduce:
Create a Button element as a Component
Create 2 variants (e.g. Primary and Secondary)
In one variant, assign an ACSS class to the button (e.g. btn--primary)
Switch to the other variant — the same class (btn--primary) is applied there too
Expected behavior: Each variant should maintain its own independent class assignments.
Actual behavior: A class added in one variant is applied globally across all variants of that component.
Workaround: Changing the button’s background color at the ID level works correctly and is isolated per variant. The issue is specific to class assignments.
There is also another bug. I have a button element whose style I change using Global Classes — this works perfectly. However, when I assign a custom CSS class I created to the button, the Gutenberg editor displays the default style, while the frontend renders it correctly according to the custom CSS class. For example, I have a gold-colored gradient button. Gutenberg displays it as green (default style), but the frontend renders it correctly.