I'm very new to HTL and AEM in general.
I have a component, where the top level element in HTL is <sly>:
<sly
data-sly-test.empty="${!properties.title}"
data-sly-use.template="core/wcm/components/commons/v1/templates.html"
data-sly-call="${template.placeholder @ isEmpty=empty}"
>
</sly>
<sly
data-sly-use.cardModel="com.cisco.dcloud.core.models.CardModel"
data-sly-test="${cardModel.compareUserAccessLevel==true}"
>
<div
data-sly-test="${wcmmode.edit && !wcmmode.preview}"
class="aem-helper configure__container"
>
${cardModel.entitlement}
</div>
<sly data-sly-test="${properties.variation == 'cardwithimage'}">
<sly data-sly-include="cardwithimage.html" data-sly-unwrap></sly>
</sly>
<sly data-sly-test="${properties.variation == 'cardwithlabel'}">
<sly data-sly-include="cardwithlabel.html" data-sly-unwrap></sly>
</sly>
<sly data-sly-test="${properties.variation == 'manualcard'}">
<sly data-sly-include="manualcard.html" data-sly-unwrap></sly>
</sly>
</sly>
It renders like this:
<div class="card">
<div class="card-component height-full">
...
Is there a way I can add a conditional style to that top element? The one with the class="card"? I just want the style to appear in preview/publish, but not the editor.
Thanks.