Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit content script CSS variables to Facebook Container elements only #927

Open
rschiang opened this issue Apr 23, 2023 · 4 comments
Open
Labels
🐛 bug Something isn't working 📝 content script

Comments

@rschiang
Copy link

rschiang commented Apr 23, 2023

  • Facebook Container Version: 2.3.9
  • Firefox Version: 112.0.1 / 114.0a1 (Nightly)

In version 2.3.3, an unexpected CSS variable pollution was rolled out to users. Two patches were proposed to address the situation, namely:

However, only the latter patch was merged as a quick migration to the problem. These variables still apply directly on the document body element of every single webpage, regardless the existence of Facebook pixels:

Screenshot

…which is really problematic for web designers, who need to actively ignore the good chunks of variables when debugging web pages. Limiting these CSS variables to FBC elements only would improve the situation a lot.

Expected behavior

CSS variables only apply to Facebook Container’s own elements.

Possible solutions

Please let me know if we could whip up some quick PR for this. Thanks! :)

@mskocik
Copy link

mskocik commented May 12, 2023

CSS polution is related also to utility classes like .is-hidden. This should be addressed as well when scoping extension styles.

@Levdbas
Copy link

Levdbas commented Jun 15, 2023

I am running into same issues were classes like is-hidden in some sites are overwritten by this extension.

@rschiang
Copy link
Author

rschiang commented Jun 15, 2023

@groovecoder @maxxcrawford Hi! Is anyone at Mozilla working on this internally? Or should we submit a PR? 😀

@EmSixTeen
Copy link

Every time I look in devtools I get a little irritated by this - especially when cycling through my own variables and having to wade through these. Not the biggest deal but it should really be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 📝 content script
Projects
None yet
Development

No branches or pull requests

5 participants