Hardcoded style system | Community
Skip to main content
Level 6
August 31, 2025
Question

Hardcoded style system

  • August 31, 2025
  • 3 replies
  • 476 views

Hello,

As we know, there are restrictions on loading the style system in targeting mode. I’m trying an alternate approach: checking if the mode is edit or targeting, and then loading the style system tab in the dialog only for targeting mode (loading from the dialog with hardcoded values, not from editable template policies).

For my use case, I don’t need the “paintbrush” icon indicating the style system in targeting mode, as long as the style system is available when opening the dialog. I plan to use the same styleIds, hardcoded in the dialog dropdown for selection.

 

I’m just checking if anyone has tried this approach and found it successful. Please let me know.

3 replies

MukeshYadav_
Community Advisor
Community Advisor
September 2, 2025

Hi @test1234567 ,

Yes we had implemented styling using drop down of theme/style allowed for a given component.
It suffice the purpose and works well.

PS:

If required you can created a common node of theme/drop down and include in all the required dialog using resource include to act same as style system

Thanks

Level 6
September 2, 2025

Thanks for your reply. Could you tell me if you have implemented the custom style dropdown only in targeting mode, while in non-targeting mode it is loaded from policies? If so, are you hiding the custom styles in non-targeting mode and showing them only in targeting mode? Also, have you checked for any specific cookies in targeting mode? If you have a sample or skeleton implementation, could you please share it?

kautuk_sahni
Community Manager
Community Manager
September 25, 2025

@test1234567 Hey! Just wanted to see if this got resolved. If you solved it yourself, sharing your solution could really help others. And if one of the answers here helped you, marking it as accepted will guide future readers. Thanks!

Kautuk Sahni
Vishal_Anand
Level 4
September 25, 2025

Use Policy configuration to configure style system (OOTB). For targeting mode, I would recommend hiding it via authoring styles.