styles Property
Syntax
Style keys use CSS selector syntax with a leading dot. The value contains one or more CSS property declarations wrapped in curly braces.How Styles Are Applied
Styles flow from configuration to visual display through three pathways:cellDecorators evaluate cell values at render time and use $(info.cell).toggleClass('className', condition) to dynamically add or remove CSS classes.
Path 2: Column cellCss — A static CSS class applied unconditionally to every cell in the column.
Path 3: Header Group headerGroupCss — A static CSS class applied to the header group row for columns within that group.
Built-In Style Patterns
RPN Risk Level Colors
Standard Risk Priority Number (RPN) risk level color coding used with therpn and rowHeaderRpnNew cell decorators. These are the most commonly used styles in FMEA configurations. RPN thresholds are user-configurable per deployment — the values below are common examples but vary by project.
RPN Color Reference Table
Header Group Styling
Style the first and last rows of column header groups using compound CSS selectors. The.firstRow and .lastRow pseudo-classes target the top and bottom rows of multi-level column headers.
Column-Level CSS Properties
cellCss Property
headerGroupCss Property
Row Height Control
Risksheet does not have a built-in row height property. Limit row height for columns with long text content using a combination ofcellDecorators, styles, and the cellRenderer column property.
System CSS Classes
Risksheet automatically applies the following CSS classes to grid elements. These are not defined in the sheet configuration — they are managed by the grid infrastructure.The system CSS class names listed above are based on source code analysis. Additional system classes may exist in your specific Risksheet version. Inspect the DOM in your browser developer tools to discover all available classes.
Supported CSS Properties
Thestyles object accepts any valid CSS property. Commonly used properties in Risksheet configurations include:
Complete Example
Full configuration combining RPN styles, header group colors, row height control, and custom severity styling:Related Pages
- Cell Decorators — JavaScript functions that toggle CSS classes based on cell values
- Conditional Formatting — combining formulas, decorators, and styles for data-driven visuals
- Item Colors — row-level color coding for work item types
- Custom Renderer Templates — advanced cell rendering with JavaScript functions
- Sheet Configuration Format — full configuration file reference
- Column Type Reference — column definition properties including
cellCssandheaderGroupCss