Hide content from Service Studio preview

Hide content from Service Studio preview

  
What is the best way to hide some content from being visible in the Service Studio preview?

I have widgets on some layouts that I don't want to be visible in Service Studio, because they break the layout and it's hard to work with them visible.
If I put them inside an if widget works, but then the eSpace references became messed up. The layout with the hidden object is shown as an outdated reference but if I refresh it, it keeps outdated:

In this cases, the outdated reference info says: 
'Block preview was changed'

What is the best way to hide this elements and don't mess up the eSpace references?
use specific css-styles in your containers:

-servicestudio-display: none;
Hi Carlos,

I know you can apply styles only to be used in Service Studio preview. You can create a class in the style sheet editor and prefix a css element with -servicestudio-, like: -servicestudio-background-color: red;

You apply that class/style to a widget of your choice.

I don't know if this applies to hiding content...
Thanks.

It only worked after creating a new CSS class with the '-servicestudio-display: none;' attribute.
Using the extended properties of the widget with the style property didn't work.
Hi Carlos,

It won't display on your screen? I have used it before, but with other css elements, with "-servicestudio-display: none;" it doesn't work properly.
-servicestudio-display: none; works. The element I want to hide is not shown in the block preview.
But Service Studio still shows the web block with the hidden element as outdated. And, it stays outdated forever...

Is there another solution or it's a Service Studio problem?
The best way is arguably an If condition with value False (or something similar); then you place your UI under the False branch, and leave the True branch for display in SS (empty or with some dummy preview).

If you're having issues with references caused by a platform misbehavior, I'd advise you to contact Support.
Hi Paulo.

That what I was using in the first place. But whatever solution I use I get a permanent outdated reference.