SPFX Pretty

Home › How to fix › Branding

BRD003Auto-fix

Hard-coded colour in SCSS

Why it matters

Fixed colours ignore the site theme and section backgrounds.

How to fix

  1. Apply the fix to use a theme token.
BEFORE
color: #0078d4;
AFTER
color: "[theme:themePrimary, default: #0078d4]";

Microsoft articles

In VS Code: right-click the finding → Apply Fix…, or use ▶ Fix step by step in the report.