SOLVED: Div 'Display' CSS overrides custom classes with class chaining disabled

Version: Bricks 2.0.2
Settings:

  • Disable class chaining = ON
  • Disable Bricks cascade layer (discouraged) = OFF

In 2.0.2 the selector for the Div “Display” control changed from:

'selector' => '.brxe-div'

to

'selector' => '.brxe-div:not(.brx-dropdown-content)'

(location: includes/theme-styles/controls/element-div.php:14)

This makes the default CSS too specific and causes it to override custom class rules when class chaining is disabled.


Steps to reproduce

  1. Enable Disable class chaining in the Bricks settings
  2. Add a Div with a custom class (e.g. .hero-section).
  3. Set the display of the Div to something other than flex (e.g. grid)
  4. The Div still renders as display: flex.

Hi Rick,
Thanks so much for your report!

I can replicate the problem (after setting the div element to display flex in the theme styles) and have added it to the internal bug tracker. We will update this thread as soon as it is fixed.

Best regards,
timmse

1 Like

Hi timmse
I’ve had a similar issue but with the Block element. A new css selector overwrites my styles:

.brxe-block:not(.accordion-content-wrapper) { display: block }

Steps to reproduce:

  1. In the theme settings, change the display property for the block element to block
  2. Add a block element and set the display property to something other than block (e.g. grid).
  3. The block still renders as a block instead of grid.

I’m not sure but it might only happen when used inside a component. Haven’t tested it thoroughly.

Welcome to the forum @mkmllr !
Yes, it’s basically the same specificity problem. I mentioned it in the task.

1 Like

Hello timmse, how are you doing?

Do you guys have any prediction to get this one resolved?

Thanks.

Hi @ribeirom4e,

sadly, we can’t say when this will be implemented. From what I see from our internal task, though, it is in progress, and it could already be in the next update - but no promises; it totally depends on how hard the fix is.

Best regards,
Matej

We fixed this issue in Bricks 2.1 beta, now available as a manual download in your account (see changelog).

Please let us know if you are still experiencing issues.

As with any pre-stable release, please do not use it on a production website. It is intended for testing in a local or staging environment only.

1 Like

Do you know when a stable version of Bricks 2.1 will be released?