Firefox CSS

420 readers
1 users here now

Pushing the limits of the Firefox Browser through the use of CSS.

#join #firefoxcss:mozilla.org

Post your Firefox UI customizations here!

What is userChrome.css?

Rules (enforced)

  1. Posts must have flair!

  2. Follow Lemmy.World rules

  3. Posts cannot be memes/shitposts. They should be about Firefox customization with CSS.

  4. Please be civil. Bear in mind that many users come here for help and would be turned off by insults and rudeness.

  5. When posting large amount of code use a service dedicated to hosting text snippets, such as pastebin, hastebin, github gist or equivalent. Relatively short snippets can be wrapped in code-block for inline viewing.

  6. Do NOT use url-shorteners or link to compressed downloads (such as zip or rar) when sharing code.

Guidelines (not enforced)

Consider adding the following info to help people try your tweaks:

  1. Screenshots should have code in comments.

  2. Include Firefox version

  3. When asking for help you should share your custom style to help others understand what you are doing. This is increasingly important the more custom rules you have.

  4. List any other addons that may be changing the UI

  5. If a custom wallpaper is used, include a link to the original.

  6. If someone's comment solves you problem, reply to the comment to let them know, and change your post flair to solved.

Wiki

Find Helpful Knowledge and answers to common issues in /c/FirefoxCSS wiki.

Links

Lemmy Communities

Websites

founded 1 year ago
MODERATORS
1
5
is CSSs safe? (lemmy.world)
submitted 2 months ago* (last edited 2 months ago) by [email protected] to c/[email protected]
 
 

Hello friends, I am using custom css' on my Librewolf. Downloaded FF-ULTIMA and it looks cool. I have looked at its all .css files as stranger for css. As far as my view, there is no problem but can these css files cause any security or privacy vulnerability? Like, being injectable or the creator of theme can track us or not? It may seem a funny question but idk much about css language. Just wanted to asking. Am I safe with it?

2
3
 
 

Personally I'm pretty frustrated with the way it works. I've noticed all of the following , and at least some of these apply to dev tools too. I don't like the way Google controls the internet with Chrome, but at least its dev tools just work.

  • Sometimes when I try to use the element picker tool it actually clicks the element instead of selecting it in the toolbox
  • I can't change selectors in CSS files in the sidebar, I have to go the style editor (Chrome lets me do this)
  • I can't easily copy HTML attributes, if I double click on an attribute, the text is selected but when I press CMD C, it copies the entire tag with all of its attributes.
  • A lot of the time CSS properties I write just don't apply and isn't crossed out. Its like it just has a hard time doing that.
4
 
 

This is actually unrelated to the CSS lagging on my device, I also write CSS for Firefox's UI. It's not meant for 3rd party customization and the ability for customization is behind a configuration flag. With that in mind, Firefox's CSS just feels very dirty, like its very tricky to figure out how to best change this or that element because of how many moving parts there are between state changes (like :hover) and how variables interoperate. And in some places to make a single change you have to change multiple variables, like if you want to change the height of the URL bar row.

I've spent many hours on the CSS, and each time I revisit it, I find that I could've wrote this or that better, and I looked for variables that the UI uses, and wonder why I didn't find them the first time. I've been writing CSS on and off for 8 years now, I wonder if I'm just bad it since I've never done web dev full time, or it's actually a lot of work to write good CSS.

5
 
 

I customiced the home page with the usercontent.css but i would also like to add some javascript.

6
 
 

So I applied an updated version of Firefox-UI-fix for Firefox 120, and now my accent on selected tabs is gone.

For context, this is what it looks like now -

The image below is in private window mode, because for some reason it works over there. Focus on the line above the selected tab, with a blue accent line. This is how I want it to be -

Here are my chrome and user.js folders.

7
 
 
8
 
 

elements like the previous tab, next tab, and reload buttons? I've been using SVG images for them and I know you can either do that or embed the SVGs right in with a url(), but I wonder if anyone has found a workaround for using text, with or without psuedo-elements, like using content in a :before() element.

9
11
submitted 9 months ago* (last edited 9 months ago) by [email protected] to c/[email protected]
 
 

I'm using the Proton theme of TST, and I really want these X buttons to only appear on hover. I know that's possible: It's how the Xs function in the Sidebar theme of TST. However, I don't like the Sidebar theme otherwise.

Does anyone know how to change the TST Proton theme to make the X button only appear on hover?

Thank you!

10
 
 

Theoretically it should be possible to make child elements flow vertically instead of horizontally, by setting these properties on the parent: display: flex; flex-direction: column;. I tried that with a bunch of the tab elements and it didn't work. The problem with addons like TST is that they glitch out sometimes, and you have to wait for the tabs to load, it takes much longer on my M1 Mac once I have 100s of tabs open (don't judge me).

11
 
 

css:

12
4
submitted 10 months ago* (last edited 10 months ago) by [email protected] to c/[email protected]
 
 

cross-posted from: https://lemmy.world/post/7063072

I just updated Firefox Nightly (2023-10-19) and it seems that about:config values are no longer detected by -moz-bool-pref().

Does anyone else have this issue. If so, is this just unintended behavior or is this permanent?

13
 
 

Hello!

I was wondering how can I change the background color of this options in preferences, they appear when you go to privacy and security all the way down to authorizations and you click one of them. (In my case it was notifications)

Thanks!

14
 
 

Hi all!

I recently installed firefox-gnome-theme to Librewolf, but it doesn't respect my GTK theme's colors, which is Dracula.

All I need to edit is the color palette. Which file should I need to edit for the hex values?

Thank you for your help in advance!

15
 
 

Hi all, I’m currently the only mod here and I’ve sadly had to be less active given sizable real life responsibilities. So posting here to see if anyone is up for assisting in mod management?

If anyone’s interested just comment below and I can get things approved from there, Preferably say any experience you have if applicable.

16
 
 

So, you know how on mainstream Firefox, the shortcut icons are a bit padded to give them a uniform look?

Yeah, I wanna do that, but with Waterfox, a fork of Firefox. I know, this is not exactly the sub for that browser, but this is the closest I could find here on lemmy.

Currently on Waterfox, the padding on shortcut icons seems erratic.

17
18
 
 

Edit: One user proposed to set widget.macos.native-context-menus to false in about:config, but the issue I'm trying to solve is the `` context menus not looking native, which I'm trying to fix with CSS. So I don't want to set it to false. I filed a bug report since the menus are supposed to be native when set to true.

This is the page to see the select elment, you change the CSS using the browser toolbox (not the dev tools). I tried setting border-radius on both the option elements and the context menu itself, but nothing has worked.

19
20
 
 

I have enabled everything to make userChrome.css work, but it doesn't seem like any JS works when I paste it into a userChrome.js file in my chrome folder, including this JS snippet, it could be because I'm on macOS. I should note that the chrome folder is not in my profile directory, its somewhere else and symlinked to that profile and 4 others.

(function(){
  _ucUtils.registerHotkey(
  {
    id: "testKey",
    key: "g",
    modifiers: "Ctrl br Alt",
    
  },
  function(win,hotkey){
    const doc = win.document;
    const bmtb = CustomizableUI.AREA_BOOKMARKS;
    CustomizableUI.setToolbarVisibility(
      bmtb,
      doc.getElementById(bmtb).getAttribute("collapsed")==="true");
  });
})();

21
 
 

A Firefox CSS themes with auto-color, Mica, auto-hide nav-bar support. Inspired in firefox-one , Edge/Chrome restyle 2023.

https://github.com/Neikon/Fox11

https://firefoxcss-store.github.io/

22
 
 

Hi, i was trying to change the background of the pocket stories in the Firefox homepage with this code

@-moz-document url("about:home"), url("about:newtab"){
  div.meta{
    background-color: #08111c !important;
  }
}

yet the pocket stories are still the same default grey color.

What is wrong with my code?

23
 
 

Hi! Just FYI folks, the plan going forward would be to build this community on Fedia instead: Right here https://fedia.io/m/FirefoxCSS

Thanks to federation, you can also participate in the community through lemmy if you want - though some features such as microblog or sidebar info won't be accessible via lemmy - for now at least. The link to access the community via lemmy world would be https://lemmy.world/c/[email protected]

See ya there!

24
 
 

Good day,

I've been trying to adjust some of the design of lemmy in the past few days, and it's been working well so far.

However, this forum has a few images in the header, a quite tacky anime-style background picture, and that silly Fx logo which is disgusting.

Not to mention the left ear of the poor thing is cut off.

I figured out I can use .banner-icon-header to manipulate those images in userContent.css , but how can I make changes only apply to this subforum?

I tried [href*="https://lemmy.world/c/firefoxcss/"] in some different ways, just don't know how to use it properly to make it work.

Or we could just lose those images. 😉

25
 
 

The css theme I'm using is Cascade FYI

view more: next ›