Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Style not appliying to text component

Avatar

Level 2

Hi all, I'd like to ask for your help with this, thanks in advance for checking it.

 

I have a text component on a template:

pixeldvx_0-1668617522833.png

I added a style to it:

pixeldvx_1-1668617552983.png

The style is showing in the style menu

pixeldvx_2-1668617586985.png

 

I select the style:

pixeldvx_3-1668617613076.png

 

But after selecting and enter in the Style menu again it appears unselected and the style never applies to the component.

 

I tried with other components adding fake styles and those apply, the issue happens only in the Text component.

 

Thanks for your support.

5 Replies

Avatar

Community Advisor

Hi @pixeldvx ,

Please ensure if the applied style's id matches as the style id in the policy.

Hope that helps!

Regards,

Santosh

Avatar

Level 2

Hi Santosh, thanks for your reply.

 

It matches, but the odd thing is that if I put, for example, in a List component the style "fake" in the policies and then I select it in the authoring it works, I mean, it applies the style and adds the class in the HTML to the component, but in this case for the text component I just can't select the style on the menu because it always switch to unselected automatically.

Avatar

Community Advisor

Hi @pixeldvx ,

 

Check this article which explains step by step to have custom styles added to the component.

https://experienceleague.adobe.com/docs/experience-manager-65/authoring/siteandpage/style-system.htm...

 

Hope that helps!!!

Avatar

Level 2

Thanks for your answer Manikumar, however I already checked that, and other documentation and the bug is only with the Text component, I guess is something not related to the style itself but to the component or the platform, I don't know and don't have any clue.

Avatar

Employee Advisor

Hi @pixeldvx ,

 

Not sure which version of core components are you using, but could you check if the issue still exists with the newer release, you can find it here:- 

https://github.com/adobe/aem-core-wcm-components/releases 

 

Regards,

Nitesh