Browser: Chrome 110 OS: macOS / Windows / Linux / etc. URL: Link to a page that illustrates this issue Video: Short screen recording that illustrates this issue (free tool: jam.dev)
Setting the Label Size to 0 in an icon of the list when using the Icon List element does indeed hide the label on the editor but still shows the label on the frontend.
In addition to that, it would be nice to have a general option to hide all labels to avoid the icon1, icon2, etc. list when wanting to only see the icon in the frontend to avoid having to manipulate each individual icon on the list.
You want the label to remain in the source code, but not display it? Write 0px (with unit) in the field, then it will also work in the frontend.
You don’t want the label to be displayed and not rendered in the code? Empty the label field. Then, the label will not be rendered at all.
You can also use a simple CSS selector to hide all labels without setting each field to “0px”:
%root% span {
display: none;
}
With variants 1 and 3, you must ensure that the gap is set to 0, as the span is still output and the distance to the right is therefore incorrect. But as you can see, there are various options depending on what exactly you want to achieve. So I wouldn’t calssify that as a bug.
Thank you timmse. I had gone with the third option. I guess my problem was not indicating the unit when setting the Label Size. I was using 0 instead of 0px. But let me insist: setting Label Size to 0 (without the unit) hides the label in the editor but not on the frontend. That what was confusing me.
Yes, with this setting the behavior in the builder is different than in the frontend. However, this is not common practice, i.e. you would normally choose option 2 or 3.
If you do not want to display an element, you would not set its width and height to 0 (you really shouldn’t), but remove it or set it to display: none.
timmse, the case is not that I do not want to display the entire element. In such case, I wouldn’t even mind using it. I just want to hide part of the element. In this case, the Icon List element has basically two components, the icon and the label. I just wanted to hide the label and - when not indicating the unit - the behavior in the builder is different than in the frontend, and that is confusing… Thank you for your time and teaching me to not forget to put the unit of the length… I put it and it works both on the frontend and the Editor. I owe you one more…
BTW, I noticed you logged in from Miramar, FL… is that where you are? I am in Pembroke Pines…