Issue with visibility conditions and :empty pseudo selector

Cwicly Plugin version: 1.2.9.9.1

Hi,

It seems that Cwicly generates some spaces instead of completely removing blocks when their visibility condition is false, which prevents :empty pseudo selector to work properly on their wrapper element.

NOTE: It seems to happen only with 2 or more blocks inside the wrapper.

image

Hello @yankiara,

Thanks for bringing this up.

I can confirm seeing this behaviour.

I don’t want to get this wrong, but I do believe this is relative to how Gutenberg saves content and displays it on the frontend.
Cwicly does not generate spaces, we simply do not return any block content if it is hidden being valid conditions.

I’ll take a look at this in more detail, but I wouldn’t hesitate bringing this up with the Gutenberg team also.

EDIT: This is definitely a valid bug which will have to have a fix or workaround on our end. Thanks for the report.

Cheers,

I’m not that surprised, sorry for pointing a finger at Cwicly :wink: