fbjs. Your page’s CSS and the survey’s CSS meet there. This page explains how to keep them apart.
Keep Your Page CSS Out Of The Survey
The survey’s built-in styles are protected against many global rules, but broad rules can still reach the survey, especially with!important: * { font-size: 12px !important; } or button { background: red !important; }.
If one of your rules changes the survey, exclude the survey from it:
globals.css
Styling The Survey From Your Page CSS
You can still style Website & App Surveys from your own stylesheet, but Custom CSS is the better place:- Your page CSS only reaches surveys on your pages, not link surveys or surveys in mobile apps.
- Many built-in survey styles sit in cascade layers and win over your page CSS, even with
!important. Custom CSS is placed above them and always wins.
data-fb-part hooks, their states and the --fb-* variables. Always scope rules under #fbjs.
globals.css
Troubleshooting
My page styles change the survey- Find the rule in the browser inspector and exclude the survey with
:not(#fbjs *).
- A selector is missing
#fbjs. Prefix every survey rule with it, or move the rules to Custom CSS, where scoping is automatic.
- Hard refresh the page to clear cached SDK files.