SOLVED: Pseudo-class leaves phantom values after removal

Bricks Version: 1.5.7
Browser: Chrome 90
OS: macOS

When working with pseudo-classes, simply deleting the pseudo-class does not remove the values and they are still printed in the CSS without a CSS selector or property.

Steps to reproduce:

  • Create an element and add an :after with a width of 100%
  • Save the page, view page source on the frontend, find the associated CSS ( #element:after { width: 100%; } )
  • Delete the pseudo-class (but leave the values set) and save
  • Refresh the frontend page source and you will see the values from your pseudo-class but no selector or property. (stray 100% in CSS)
1 Like

Hi Josh,
Thanks so much for your report!

Unfortunately, I cannot reproduce the issue. Would you be so kind as to provide a screencast showing and explaining what’s happening?

Which CSS loading method are you using?

Best regards,
timmse

@timmse Sorry, I just realized that I missed an important step in how to reproduce – you need to set the base breakpoint to anything other than desktop. Here’s a video to reproduce the issue:

Hey Josh,
this is the crucial hint :slight_smile:

I have added the problem to the bug tracker.

Best regards,
timmse

1 Like

Hey @zestjosh ,
Bricks 1.6 beta contains a fix for this problem. However, we would be happy if you could briefly test whether the problem is fixed so that we can include it in Bricks 1.6 stable.

You can find the beta version in your account:
https://bricksbuilder.io/account/?v=1.6-beta

Best regards,
timmse

@timmse It looks like this issue is now resolved, thanks!

1 Like

Hi @timmse and @zestjosh,

Sorry but this is not fixed in 1.6beta2.

I created a ::before pseudo-class on a class, styled it with the builder, then deleted it.

When I recreate a ::before on the same class, all former styles appear again.

(Whatever the breakpoint.)

1 Like

I had to remove all the styling before removing the pseudo-class.

Same with me too. And I’m on 1.5.7.

But I must add that for me the deleted ::before is on a a separate element and after deleting the pseudo from it, then trying to create a ::before on another element this older one gets its ::before styling back.

If I remove every styling from the older element’s ::before before deleting it, it still reappears as a blank ::before.

But the blank and deleted ::before is still applied to the other element even after removing all styling.

Yes. If you created a pseudo-class example: :custom under a class. You will see this pseudo-class everywhere across the site, even if there is no styling. We cannot delete this pseudo-class if other classes have such pseudo-class too.

1 Like

Well, that’s bad and definitely needs a fix asap.

Hi Yan,
Your comment is about a completely different problem. The only similarity is that it is also a pseudo-element.

The problem reported here resulted in the following output on front end:
CleanShot 2022-12-08 at 11.19.31@2x

That is not the case with you. In your case, the styling is applied again/unintentionally and therefore it is a different, new problem, isn’t it? Therefore, I ask you to open a new report, please.

Best regards,
timmse

1 Like