Firefox CSS

452 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 2 years ago
MODERATORS
1
 
 
2
3
4
0
submitted 1 month ago* (last edited 1 month ago) by mobsenpai to c/firefoxcss
 
 

Make firefox look like this?

5
 
 

like this: https://i.imgur.com/vu85Vtp.png

Previously I've used the "Decrease toolbar height" section from here, which stopped working correctly a few days ago so I messed around and ended up with:

toolbar#nav-bar {
  height: 26px !important;
}
.urlbar-input-container {
  height: 26px !important;
  margin-top: -4px !important;
  margin-bottom: 0px !important;
}
#urlbar-background {
  height: 20px !important;
  margin-top: -1px !important;
  margin-bottom: 0px !important;
}

But almost every day the urlbar moves up or down from where I set it and I have to change the values above accordingly.

edit: the changes seem to have stopped. I've updated the code with the currently-working values

6
6
submitted 2 months ago* (last edited 2 months ago) by AresUII to c/firefoxcss
 
 

EDIT: Fixed the dropdown by nuking line 15, still trying to solve the selection highlighting turning green again

My userChrome:

menupopup:not(.in-menulist) > menuitem, 
menupopup:not(.in-menulist) > menu {
  padding-block: 0px !important; /* reduce to 3px, 2px, 1px or 0px as needed */ 
  min-height: unset !important; /* v92.0 - for padding below 4px */
}
:root {
  --arrowpanel-menuitem-padding: 0px 0px !important;
}

/* Make urlbar appear more compact */
#urlbar[breakout]{
  margin-inline-start: 0px !important;
  width: 100% !important;
  left: 0 !important;
  top: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2) !important;
}
#urlbar[breakout]:not([open]){ bottom: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2) !important; }
.urlbarView{ margin-inline: 0 !important; width: auto !important; }
.urlbarView-row{ padding: 0 2px !important; }
.urlbarView-row-inner{ padding-inline-start: 4px !important; }
#urlbar-background{ animation: none !important; }
#urlbar-input-container{ padding: 1px !important; height: 100% !important; }
#identity-icon{ margin-block: var(--urlbar-icon-padding) }
.urlbarView > .search-one-offs:not([hidden]){ padding-block: 0px !important; }


#nav-bar:-moz-lwtheme #urlbar ::-moz-selection,
#nav-bar:not(:-moz-lwtheme) #urlbar ::-moz-selection {
        background-color: #3040cf !important; /*it's green again; want to fix this too*/
    color: white !important;
}

/* Set blank page background-color */
/* Uses color from theme_colors if available */

#tabbrowser-tabpanels{
  background-color: var(--uc-light-bkgnd-color,rgb(0,0,0)) !important;
}
7
6
is CSSs safe? (self.firefoxcss)
submitted 7 months ago* (last edited 6 months ago) by bitahcold to c/firefoxcss
 
 

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?

8
9
 
 

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.
10
 
 

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.

11
 
 

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

12
 
 

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.

13
 
 
14
 
 

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.

15
11
submitted 1 year ago* (last edited 1 year ago) by mulcahey to c/firefoxcss
 
 

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!

16
 
 

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).

17
 
 

css:

18
4
submitted 1 year ago* (last edited 1 year ago) by zapsnh to c/firefoxcss
 
 

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?

19
 
 

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!

20
 
 

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!

21
 
 

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.

22
 
 

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.

23
24
 
 

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.

25
view more: next ›