NO BUG: Basic Text Element if Content Empty doesn't Display on the Front End

Found a bug.

The Basic Text element if empty of content doesn’t exist on the frontend (not in the HTML source). I notice this as I have a counter which uses an after pseudo element and counter-increment. It is visible on the backend but not the frontend unless I add some text to the content area in the Bricks UI. This worked fine in Bricks 1.9.2 and older versions.

The same issue happens if I just insert an empty basic text element or a rich text element. It is not found on the frontend.

Hi Tom,
Thanks so much for your report!

If the element has no content (text), it makes no sense to render it anyway, keyword “clean markup”.

You can solve your very specific problem very easily by simply adding an empty space to the basic text element.

Best regards,

This is not how it worked in Bricks 1.9.2 and earlier. If the element had pseudo elements it would display. (just like it does within the builder interface)

The counter I have uses 2 pseudo elements for each digit producing text like this:


Adding an empty space in the text element puts a space between the 2 digits (pseduo elements) in the counter and breaks the design.

BTW my pseudo elements are created in the elements custom CSS of the Bricks UI

I swapped the text element with a div and set it to a span so that is the fix I am going with.

Though I still think elements that contain pseudo elements built within the element itself either through the Bricks UI or within its own custom css it should remain visible.