SOLVED: CSS Styling(:hover) of a Button is applied to every element on page

Bricks Version: 1.5-beta
Browser: all (out of scope)
OS: macOS (out of scope)

Hello dear Bricks family,

I might have too specific bug to report and hope you’ll be able to reproduce.

I suspect that some elements that are hierarchically under the Query loop could be affecting the whole page when their hover styles are set. Specifically a button.

I first got into this problem on a little bigger site so I tried to reproduce on blank new page and was able to reproduce the problem.

My structure looked accordingly:


(notice the highlighted Div has Query loop applied)

Steps to reproduce:

  1. Create few random elements (button, icon, image)
  2. Create few nested containers (e.g. section > container > div > div)
  3. Create Query loop on the inner div
  4. Create elements like image, title and button inside that div
  5. Style :hover of the image that lies inside the div with the Query loop - works as expected
  6. Style :hover of the button that lies inside the div with the Query loop (i.e. use red 2px dashed border) - here comes the bug
  7. Save & Check on frontend

Result:
Every element you hover over gets the red 2px dashed border which was applied on the button inside the div with Query loop

Expected Result:
Only the button gets the applied hover styles

Let me know if you have problems to reproduce I might dig a little deeper :slight_smile:

Regards,

Lukas

I found the same issue in Hover in other elements, not just in this case. When hover, it applies to other elements on the page.

Was it with or without the Query loop?

Query loop seems to play no role in it.

He @lukeSK

This is a known bug in 1.5b and has been reported:

Yes, correct I think the culprit is to do with :hover when applied to different elements not just query loops.

1 Like

Hey Michael, thanks for notifying me.

When I searched the forum if it’s reported it wasn’t at the time. Meanwhile I analysed it better it got reported by Lyle. My bad.

No worries at all Luke, It’s always better to report it just in case - There is more harm done not reporting a bug than there is creating a duplicate post :+1:.

I just wanted to let you know just in case you didn’t see the other thread and was still searching waiting for an answer :slight_smile:

2 Likes

Sure, appreciate it Michael, I love how healthy this community is :face_holding_back_tears:

1 Like

Hello @lukeSK

This was fixed in Bricks 1.5 RC.

Thank you!
Luis