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
Feedback Buttons And Banners
Creatives don’t render under#fbjs. Each one is drawn in its own Shadow DOM, which your page CSS can’t reach and which doesn’t leak into your page, so nothing above applies to them. Only your page’s font reaches them, when the workspace uses Page font. To style a creative, use its own Custom CSS field on the creative’s Styling tab, scoped to .fb-creative-button or .fb-creative-banner. Your workspace Custom CSS doesn’t apply to creatives.
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.