How to configure custom CSS in Pega skin rule?
Hi @Satya K,
This is the AI generated answer, I have customized
Here are the step-by-step configuration steps to add custom CSS in a Pega Skin rule:
Steps to Configure Custom CSS in a Pega Skin Rule####
Step 1: Open the Skin Rule
-
Launch Dev Studio.
-
Go to Records → User Interface → Skin. or Application → skin
-
Open your application’s skin rule (e.g.,
SmartDisputeSkin,BankAppSkin).
Step 2: Navigate to the “Additional styles” Tab
-
Inside the Skin rule, click on the tab labeled “Included styles”.
-
This section is for adding inline custom CSS.
-
Under the Additional style sheets add the new css file. label name, webwb, file format css
Step 3: Add Your Custom CSS Code
-
Paste your custom CSS code into the text area.
Example: -
/* Custom header style for dispute case views */
.dispute-header {
background-color: #002b45;
color: #ffffff;
padding: 12px;
font-size: 18px;
font-weight: bold;
border-bottom: 2px solid #0099cc;
}/* Custom primary button */
.btn-dispute-primary {
background-color: #0070d2;
color: white;
border: none;
border-radius: 4px;
padding: 8px 16px;
font-weight: 600;
}.btn-dispute-primary:hover {
background-color: #005bb5;
}/* Styling for alert messages */
.alert-warning {
background-color: #fff3cd;
color: #856404;
border-left: 5px solid #ffeeba;
padding: 10px;
margin-bottom: 10px;
}
Step 4: Save the Skin Rule
-
Click Save.
-
Check in if your application is in a version-controlled environment.
Step 5: Apply CSS Classes in UI Rules
-
Open the Section rule where you want to apply styles.
-
Select the layout or control (e.g., Dynamic Layout, Button).
-
Go to the Presentation tab.
-
In the “Custom CSS class” field, enter the class name you defined in your CSS.
- Example:
custom-header,custom-btn-primary.
- Example:
Step 6: Test in the UI
-
Launch the user portal or the section preview.
-
Verify that the custom styles are applied.
-
If not visible, clear browser cache or use Live UI → Refresh Section.
Optional: Include CSS from a Text File
If you prefer to manage CSS separately:
-
Create a Text File rule:
Records → Technical → Text File -
Add your CSS there.
-
In the Skin rule → Included styles tab, add your Text File rule.
I hope it works,
Thank you