How to inline include css using sightly | AEM | Community
Skip to main content
August 16, 2021

How to inline include css using sightly | AEM

  • August 16, 2021
  • 1 reply
  • 3270 views

Hi all -

Need your inputs and suggestion on how to convert the below css include to inlinecss in sightly. Does sightly even supports this inline rendering feature?

sample css include: 

<sly data-sly-call="${clientlib.css @ categories='contexthub.dependencies'}"></sly>

Thank you in advance.

Regards!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Adobe Champion
September 14, 2021

I think this question might be more suitable for the AEM section 

May 15, 2023

For style and script contexts, it is mandatory to set a context. If the context isn't set, the expression shouldn't output anything. 

Examples :

  1.  <a href="#whatever" style="color: ${colorName @ context='styleToken'};">Link</a>
  2. <div style="background-image:url('${imageUrl@ context='styleString'}');">Link</a>

Just check this answer : Solved: Can I call sightly within Javascript? - Adobe Experience League Community - 230833