Home › How to fix › Branding
BRD002Needs youTheme changes not handled
Why it matters
The web part opts in to section backgrounds but never reads the theme, so colours stay fixed.
How to fix
- Override onThemeChanged() and push semanticColors into CSS variables.
- Run "SPFX Pretty: Show Theme-Aware Web Part Snippet" for code tailored to your web part.
Microsoft articles
- Supporting section backgrounds (theme variants)learn.microsoft.com
- Use theme colours in your SPFx customizationslearn.microsoft.com
In VS Code: right-click the finding → Explain & How to Fix, or use ▶ Fix step by step in the report.