5.0.0: CSS Grid purple toggle lost the icon

Hi!

When we hover over a CSS Grid element, there should be a purple button at the top-right with an icon. It is now empty, without the icon.

image

EDIT: After resizing CSS Grid for a while, the preview area got stuck. I wasn’t able to scroll it anymore, and also the purple toggle stopped responding.

Thanks!

Thanks Misho,

That’s strange, next time it happens would you mind dropping into dev tools and letting me know what you see inside this button?

There should be the is-check-circle SVG in there. Not sure what could cause that to go away. Also, let me know if you see any other errors in the javascript console in that instance.

Thank you!

Hi @alexander,

I have found the culprit!

So CSS Grid element is placed inside a Section that has a custom SVG background.

That section has this CSS:

$el svg {
  transform: rotate(180deg);
  fill:rgb(207, 242, 251);
  position:absolute;
  bottom:calc(10vh - 1px);
}

So this CSS affected the icon. Looks like something that shouldn’t be happening? Or should I add more specificity in the future?

Thanks!

Oh gotcha! Yeah, that’s not really something we can avoid since the SVG does get output inside the grid element. Maybe be more specific, or just target the preview like:

body:not(.tco-preview) $el svg {}
1 Like

Interesting. I have tried this:

body:not(.tco-preview) $el svg {
  transform: rotate(180deg);
  fill:rgb(207, 242, 251);
  position:absolute;
  bottom:calc(10vh - 1px);
}

However, it broke the custom SVG. The CSS stopped applying to the custom background. Just for your info, in case that means anything. :slight_smile:

Not a big deaI. I have added a class to the SVG and solved it.

Thank you!

I’m sorry, not sure where my brain is. Using body:not(.tco-preview) just prevents CSS from running at all in the live preview so that would break your custom SVG while protecting the UI element. Glad you got it sorted out!

1 Like