How CSS Styling Works
The Gantt chart renders inside an iframe embedded in your Polarion wiki page. CSS styles defined in a Script block widget on the same page are automatically copied into the Gantt iframe, allowing you to override default styling for task bars, text, grid columns, and other visual elements.1
Add a Script Block Widget
- Open your Gantt wiki page in edit mode
- Add a Script - block widget to the page (from the Widgets panel)
- Place it anywhere on the page (it does not need to be adjacent to the Gantt widget)
2
Add CSS Styles
Insert your CSS inside a
<style> tag within the script block. Common customizations are listed below.Change Right-Side Text Appearance
Adjust the color, size, and position of text displayed to the right of task bars:- Positioning: Modify
topandbottomvalues to adjust vertical alignment - Appearance: Customize
colorandfont-sizeto match your style
Change Font Color of Task Labels
Style Completed Items with Strikethrough
Use an item script to add a CSS class to completed items, then target that class:3
Adjust Row and Task Heights
Row and task heights are controlled via the Gantt Config Script (not CSS). Navigate to the widget parameters, open Advanced > Gantt Config Script, and add:
Common CSS Targets
Verification
You should now see:- The Gantt chart renders with your custom styles applied
- Text colors, font sizes, and positioning match your CSS definitions
- Row and task heights reflect your Gantt Config Script settings