SPFX Pretty

Home › How to fix › Branding

BRD006Needs you

Inline colour in TSX

Why it matters

Inline colours ignore the theme (especially dark section backgrounds).

How to fix

  1. Use semanticColors from the theme (e.g. theme.semanticColors.bodyText) or a CSS variable.
In VS Code: right-click the finding → Explain & How to Fix, or use ▶ Fix step by step in the report.