• 1 Post
  • 55 Comments
Joined 1 year ago
cake
Cake day: June 13th, 2023

help-circle
  • Yeah, !important doesn’t affect inheritance in any way. It only means that this particular rule is to be used if there are multiple rules that would set that particular property for the element in question (unless there’s some other more specific rule with !important tag as well). MDN lists property inheritance in the formal definition section. You can totally make background-color inherited though - like *{ background-color: inherit } (and then set the property to something else on the root element from which you would want to inherit from) but it would then either not apply if website set it to anything else for an element or override any other set value if you used !important tag.

    One other thing worth noting is that I would not recommend the rules mentioned for userChrome.css to be used as is - at least on window they completely break Firefox startup - it fails to display any window if you do that. Instead you should add a [sessionrestored] selector to wait a bit before those rules are applied to main-window:

    #main-window[sessionrestored], #tabbrowser-tabpanels{ background: transparent !important; }
    

  • Right, background-color is not an inherited property (compared to for example color (color of text) which is). But even if it were, inheritance is not “enforced” so if website css sets a backround-color specifically for that element then the inherited value would be lost anyway.

    But the way you now describe it doesn’t seem possible. There is not syntax to apply style rule to “just the innermost element”. I think the closest would be to have everything else have fully transparent background, but the html root element have only partial transparency:

    *{
      background: transparent !important;
    }
    html:root{
      background: #00000080 !important;
    }
    

    However, you will still face a problem; many websites draw graphics or images as a background-image so if you use the background shorthand property then those graphics will be effectively removed. On the other hand, if you instead set just background-color then parts might get opaque again because a website could be drawing even opaque backgrounds as background-image instead of background-color.


  • I think the answer depends on which elements exactly you want to make transparent. The page is a layered structure. The html root element is behind them all. Then body element is on top of that, the rest of the elements on top of body, etc.

    So if you intend to have transparency all the way down, then you need to make sure that all the elements in that stack are transparent. If any single item in a stack has an opaque background then the transparency effect stops at that.

    As an example, if you set background:transparent to just body but not the document root element, then body will indeed be transparent, but it does not matter because the root will still be opaque. Likewise, if root is made transparent, but there is any opaque layer on top of that, then only the parts of the root element that are not covered by that opaque layer will show up as transparent. If you have a glass table and put a sheet of paper on top of it, then you don’t see through the part covered by the paper even though the table itself is transparent.



  • I don’t think I understand exactly what parts you want to make transparent, but this does work:

    1. set browser.tabs.allow_transparent_browser to true
    2. in userChrome.css add #main-window, #tabbrowser-tabpanels{ background: transparent !important; }
    3. in userContent.css add html:root{ background-color: transparent !important; }

    The above would make window background, and the are behind web-content transparent as well as background of html documents - otherwise the background of browser area wouldn’t show up anyway. Toolbars that have their own specified colors would still be colored - which might be opaque or not depending what theme you have selected.


  • MrOtherGuy@lemmy.worldtoFirefox@lemmy.mlBookmark
    link
    fedilink
    arrow-up
    3
    ·
    18 days ago

    Would be pretty idiotic to not close it, otherwise opening a bookmark would always require a second click to close the popup.

    Anyways, you can go to about:config and set browser.bookmarks.openInTabClosesMenu to false - afterwards you can hold Ctrl (or just click the middle mouse button) while clicking a bookmark from such popup and the popup should stay open.



  • Felix Mikolasch, data protection lawyer at noyb: “Mozilla has just bought into the narrative that the advertising industry has a right to track users by turning Firefox into an ad measurement tool. While Mozilla may have had good intentions, it is very unlikely that ‘privacy preserving attribution’ will replace cookies and other tracking tools. It is just a new, additional means of tracking users.”

    Sigh… I cannot for the life of me figure how anyone could think that enabling PPA (even by default) means that advertising industry has somehow right to track folks. Like dude, the entire point of PPA is that advertisers could then get to know if/when their adverts are working without tracking people.

    The argument that “It is just a new, additional means of tracking users” also doesn’t really make sense - even if we assume that this is new means of tracking. I mean, sure it technically is new addition, but it’s like infinity+1 is still infinity - it doesn’t make a difference. The magnitude of this one datapoint is about the same as addition of any new web api (I mean there are lots that shouldn’t exist - looking at you chromium… but that’s besides the point).

    File a complaint over use of third-party cookies and actual tracking if you want to be useful - this complaint just makes you look like an idiot.





  • That feature removes parameters that are known to be used for tracking. It does not remove all query parameters willy-nilly. For example on youtube it should remove si, feature and kw parameters as well as a set of parameters on a list that applies to all websites. However, pp parameter is not in that to-be-removed list.

    As an example v parameter is for video id on youtube, it would be kinda silly if that was removed, so the feature kinda has to do some site specific action.



  • You can modify prefs at runtime and have them persist - except those prefs that are also declared in user.js. The problem arises when folks apply whole list of prefs via user.js from one repository or another, which could be hundreds, without acknowledging what prefs they set and without checking what those prefs do. If they then have some reason to change any one of those prefs - their change won’t persist if that particular pref is in user.js

    A thing you could do is to just start Firefox once with a user.js file, and then remove that file. On that single startup Firefox sets prefs according to user.js, and all those changes persist to prefs.js when Firefox is shutdown. You are then able to also persist changes to all prefs because by removing user.js Firefox won’t try to override the your session saved prefs with user.js at startup.




  • Sure. For simplified example have only the following in your user.js file:

    user_pref("browser.tabs.warnOnClose",true);
    
    1. Start Firefox
    2. Observe that the pref is indeed true
    3. Go to Setting > General, observe that Confirm before closing multiple tabs is checked
    4. Uncheck the option
    5. In about:config observe that browser.tabs.warnOnClose is now false
    6. Restart Firefox
    7. Observe that the pref is again set to true

    The reason is also very simple. Firefox will never write anything to user.js - thus any changes you do at runtime will only be stored to prefs.js. However, user.js always overrides prefs.js at startup.