How Pega CSS (Inheritance/preference ) works.?

Hi Team,

I have a small doubt about how Pega CSS gets applied based on hierarchy.

Description -

Basically i want to understand the preferences of CSS. means which one pega looks for first and next and so on.. among the below list of approaches.

Like we have Skin, Custom Class, Inline CSS, Additional styles and other OOTB CSS which comes default.

Example -

Suppose i have one Label control and i want to change font color of that label, to fix it i am using inline style and for the same control i am also applying Custom Class for the same styling now again for the same styling i am also using additional style, so which one will get apply and what would the next one and so on.

Thanks in advance :-)



***Edited by moderator, Maryrita: moved to Product Support from Applications***

***Edited by Moderator Marissa to update categories***

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.


Keep up to date on this post and subscribe to comments

September 8, 2017 - 1:01am

Hi Yash,

Hope this helps:

September 12, 2017 - 1:59am
Response to Vikash Karn

@vikashkarn , Thank you for the response, i believe this the how css ordering happens in pega.

September 8, 2017 - 1:57am

Hi Yash,

In Pega the cascade is general as follows: base CSS (in core product); skin generated CSS (as of 7.2 skins may inherit from each other); CSS files attached to the skin; CSS files attached to a harness. Inline CSS should never be used—it is not cached by the browser thus causing performance issues and additionally is essentially unmaintainable. Legacy inline styles can be overwritten using !important. Use this lightly as performance is greatly affected.  

As a best practice, style all components in your application using style formats available in the skin. You can modify existing formats or create additional formats as needed.


September 12, 2017 - 2:00am
Response to rodrg

@Gisela_R, Thank you for the reply on my query.