soflyy / breakdance-bugs

Bug reports from Breakdance users.
40 stars 6 forks source link

Bearkdance Zero Theme with "Keep Theme" leads to whacky div classes and DOM structure #992

Closed dreadedhamish closed 6 months ago

dreadedhamish commented 9 months ago

The bug is if using the Breakdance Zero Theme with the "Keep Theme" setting leads to all sections of a page being wrapped in the

, all of them nested under the which also has the class of 'breakdance'. I'm assumign this is a bug because having the same class on different levels of the DOM heirachy is going to lead to drama - it did for me.

Steps to reproduce:

  1. Clean install Breakdance Zero Theme, Breakdance.
  2. Create page with some sections
  3. Check Theme setting is "Disable theme"
  4. View created page

Result:

<body class="breakdance ...>
   <header>
   <section>
   <section>
   <section> - this is the footer
</body>
  1. Switch to "Keep Theme" and view page:

Result:

<body class="breakdance ...">
   <div class="breakdance">
      <header> - this is the header
   </div>
   <div class="breakdance">
      <section> 
      <section>
   </div>
   <div class="breakdance">
      <section> - this is the footer
   <div>
</body>
jwarnox commented 8 months ago

Same here, multiple wrapper divs with class of "breakdance", screenshot attached:

Screenshot 2023-12-12 at 17 38 51
JeusuDigital commented 7 months ago

There was a previous issue I opened about this, Louis said it is by design and required:

https://github.com/soflyy/breakdance-bugs/issues/547

https://github.com/soflyy/breakdance-bugs/issues/547#issuecomment-1323139921

No, it is 100% necessary for visual consistency between the frontend and the builder. There are many edge cases. Sure, it looks like it works if you just put it on the body class, but it doesn't. Not really. Not in all cases.

This behavior won't change.

dreadedhamish commented 7 months ago

There was a previous issue I opened about this, Louis said it is by design and required:

547

#547 (comment)

No, it is 100% necessary for visual consistency between the frontend and the builder. There are many edge cases. Sure, it looks like it works if you just put it on the body class, but it doesn't. Not really. Not in all cases. This behavior won't change.

It cant't be absolutely necessary. It's particularly bad as :

  1. it has 'breakdance' as a class on multiple levels of the DOM heirachy - I've had occasions where code that was shared wouldn't work because of this, and
  2. it inserts the 'breakdance' class even on pages where Breakdance isn't active.