mozilla / contain-facebook

Facebook Container isolates your Facebook activity from the rest of your web activity in order to prevent Facebook from tracking you outside of the Facebook website via third party cookies.
Mozilla Public License 2.0
975 stars 176 forks source link

Newly released 2.3.3 version overwrites body fonts #858

Closed zoliszabo closed 2 years ago

zoliszabo commented 2 years ago

Actual behavior

font-family, font-size and color rules defined on body of websites are overwritten by CSS embedded into the newest version (2.3.3) of the plugin. The code in question is here: https://github.com/mozilla/contain-facebook/compare/2.3.2...2.3.3#diff-d6d3ff0148c2b8fa45833179130aa22914f0efb639fc40ca86cc68d45b7dafbfR2

Expected behavior

Shouldn't override website CSS. Plugin CSS should be scoped better to only apply to the plugin's elements.

Steps to reproduce

  1. Have a website that defines font-family / font-size / color on body level.
  2. Use the Facebook Container plugin.
  3. See what happens with the fonts...
lisenet commented 2 years ago

The same problem here, it started happening today after the plugin upgrade to 2.3.3.

zoliszabo commented 2 years ago

Same as #857. (It wasn't there when I started writing.)

adrian-pasten commented 2 years ago

Same Problem here is overwrite also color so on dark template fonts with withe color is black no posible to read teh css is content_script.css, fixed installing version 2.3.2

body {
    --blue60: #0060df;
    --blue70: #003eaa;
    --primaryText: #15141A;
    --secondaryText: #5B5B66;
    --grey20: #ededf0;
    --light-gray: #F0F0F4;
    --white: #ffffff;
    --transition: all .15s cubic-bezier(.07,.95,0,1);
    --borders: 1px solid #ededf0;
    font-size: 13px;
    font-weight: 400;
    color: #15141A;
    font-family: "SF Pro Text", 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}
Avenyet commented 2 years ago

Same issue. Browser updated to 104.0.2 with the newest plugin and font sizes are getting overwritten to 13px

content_script.css from extensions/@contain-facebook.xpi

LiamDawe commented 2 years ago

I thought I was going insane.

It breaks the styling on Tweetdeck and my own website, despite my website not touching Facebook at all.

geommr commented 2 years ago

also breaking styles on my site due to target.querySelectorAll is not a function error: Screenshot_20220908_114901

kamenlitchev commented 2 years ago

Windows 11 64-bit, Firefox 90.0.2 - same issue - some sites got fonts totally messed up...

Felixoid commented 2 years ago

Hello. For me it breaks not only https://tweetdeck.twitter.com/, but even github in a dark mode is spoiled up completely image

See a comment how to fix it

the-ge commented 2 years ago

Kubuntu 22.04.1 LTS, Firefox 104.0.2 (64-bit), Facebook Container 2.3.3 - me too. I found content_script.css loading over page styles. Being a web developer, it is really annoying.

moloko commented 2 years ago

Same here, only noticed when font in GH changed suddenly to SF Pro Text

Toriigate commented 2 years ago

Same here. Breaks the look of Github, Wikipedia (Mobile) and gHacks. FF Stable 104.0.2, add-on version 2.3.3

Yahiroz commented 2 years ago

Same too, breaks OcUK's forums and Google: firefoxfacebookcontainer

woubuc commented 2 years ago

Same problem here, it seems to override the body styles of all websites. I had to downgrade the add-on to the previous version & disable automatic updates.

mehdibo commented 2 years ago

Same problem here

Felixoid commented 2 years ago

@woubuc thank you for a hint

I had to downgrade the add-on to the previous version & disable automatic updates.

Here's how to do it:

That's all, folks

its0x08 commented 2 years ago

Same here!!

This fixes it!!

lisenet commented 2 years ago

@Felixoid saved the day!

kellenmurphy commented 2 years ago

Same here. I just disabled the add-on temporarily... 👀 for an updated version.

VitaliyYa commented 2 years ago

Same issue - some sites got fonts messed up.

bakulf commented 2 years ago

Version 2.3.3 was buggy and, as a temporary fix, we just released a v2.3.4 as a v2.4.2 repackaged. Please, update the add-on to have a fix for this issue. All the features introduced by v2.3.3 will be released in v2.3.5 as soon as possible.

zacharyp commented 2 years ago

Why would a facebook container affect fonts at all?

dveditz commented 2 years ago

Because web extension "content scripts" operate in the page context—that's the point!—which means mistakes in extension code affects web pages.

Do you mean "how"? In this case CSS was mistakenly applied to the page's body element instead of the body of the iframe created to hold the extension UI.

johnhamlin commented 2 years ago

Same issue here. Was going nuts trying to read MDN in dark mode.

Maus3rSR commented 2 years ago

Same here, really annoying

valscion commented 2 years ago

Steps to fix

  1. Go to about:addons page (write about:addons to your URL bar)
  2. Click on the cog icon menu
  3. Select "Check for updates"

After that, the Facebook container extension is updated and your fonts will now look correct again.

https://user-images.githubusercontent.com/482561/189325745-efade561-3ec5-4c4b-8de7-abc7aa72b2e8.mp4