Open dholbert opened 1 week ago
This style rule lives here in the code: https://github.com/mozilla/contain-facebook/blob/da5ee2e04b7a2a34dd5c08f0dccf7145eac98fe8/src/content_script.css#L1-L12
git blame indicates that these styles were added here, where they seem to have been intended to target some of the addon's UI rather than actual web content: https://github.com/mozilla/contain-facebook/commit/00ded7623f2615a3a81271907b8feecf011acfbb
That commit included some regular CSS properties, too (like font-family: ...
and overflow: hidden;
) which presumably broke/impacted body
rendering in lots of cases -- those were removed (or moved to another rule, for font-family
) in subsequent commits like:
https://github.com/mozilla/contain-facebook/commit/9503ba93455207dac37d99f2a23db71cef8b625e
https://github.com/mozilla/contain-facebook/commit/3e6dc514fedd85eed3a5a40365c3db976a996802
...but these CSS variables remain as being specified on body
. Maybe they can move to the .fbc-container
CSS rule, like the font-family
declaration did in that last commit?
Actual behavior
Facebook Container adds a style rule that applies to the
<body>
element in all web content, as shown in DevTools. (This style rule has 10 declarations and takes up a substantial amount of space in the DevTools rules view, which makes it feel slightly cluttery; and it impacts the page behavior if the page happens to use these variables.)Expected behavior
Facebook Container shouldn't add any styles for
<body>
, for regular web content.Steps to reproduce
Notes
Here's a screenshot showing the unexpected styles shown in devtools: