/r/FirefoxCSS

Photograph via snooOG

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

Post your Firefox UI customizations here!

What is userChrome.css?

Rules (enforced)

  1. Posts must have flair!

  2. Follow Reddit 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 /r/FirefoxCSS wiki.

Links

Subreddits

Websites

This subreddit is night mode compatible

/r/FirefoxCSS

27,115 Subscribers

3

Does anyone know if it's possible to move the highlighted icon to the right?

4 Comments
2024/04/18
14:54 UTC

5

Tabs blocked when moving tab after changing height

8 Comments
2024/04/18
03:41 UTC

3

MacOS Vibrancy

A request to those who have MacOS 11+. Install Firefox 126 Beta and activate the browser.theme.macos.native-theme and widget.macos.titlebar-blend-mode.behind-window keys. After enabling these keys, transparency should be enabled. Confirm or deny this.

0 Comments
2024/04/17
22:00 UTC

1

Change background color of list of downloads?

Anyone know how to change the background color of the list of downloads shown when you click on the downloads button on the toolbar? Trying to get it matched to the background color of address and searchbar.

1 Comment
2024/04/17
20:17 UTC

7

Search suggestions blocking address bar after new update

3 Comments
2024/04/17
15:59 UTC

21

New Firefox Update Broke Window Control Buttons - Linux

11 Comments
2024/04/17
15:22 UTC

2

Adding a chrome folder to all new profiles

4 Comments
2024/04/17
11:47 UTC

7

How would I go about making this button (the plus button round). I can't find a CSS property linked to it.

6 Comments
2024/04/17
02:56 UTC

2

Help, How to move the back and forward buttons ?

Hi, the back and forward buttons are locked so I can't move them.

Is it possible please to make them moveable so that I can move them to another toolbar ?

I guess in CSS It's not possible, but in javascript is it possible ?

I'm still using customJS : https://github.com/Aris-t2/CustomJSforFx

But I can't find a script that unlock them...

9 Comments
2024/04/17
01:24 UTC

2

help needed, how to move toolbutton separator ?

i would like to move the toolbuttons separator 2px up and 1px to left since they look off on my userChrome using custom toolbuttons icons, thanks.

https://preview.redd.it/dybnu8boowuc1.png?width=552&format=png&auto=webp&s=e483868683d90c580ff32783740a885e27384c7f

3 Comments
2024/04/16
21:02 UTC

1

Help needed, cant find too much information about the canvas button

I would like to tweak the margin of this icon individually a little bit, something like margin-top to make it go down by 1px, but i cant find too much information about it on google results

https://preview.redd.it/mwwmc8c68puc1.png?width=761&format=png&auto=webp&s=1ea3ed68f8020ce89f2a5a17d44a20608b2db90b

6 Comments
2024/04/15
19:57 UTC

3

Help needed, how do i remove this hover effect ?

i would like to remove that mouse hover effect on buttons like the reader view, pip and star button, all these buttons located on the right side of the url bar, i would like to remove that darker background effect and have same result as idle when having mouse hover on these buttons

https://preview.redd.it/lnl1wvafiouc1.png?width=468&format=png&auto=webp&s=47278967e9b48169bf7fd51a6e834ecd277a40dc

3 Comments
2024/04/15
17:33 UTC

4

Is there a way to make the top transparent (or use system theme)?

Also would be cool to also have the windows 7 close maximize and minimize buttons too.

Long story short: windows 7 aero border for firefox need to go brrrrrr (like in the screenshot)

3 Comments
2024/04/15
15:59 UTC

1

Autohide toolbox but the top gets cut off

I'm using MrOtherGuy's autohide_toolbox.css code it's excellent, but like 4 vertical pixels are gone at the top above the tabs, tried using this code, top doesn't get cut off but it doesn't hide the Bookmarks Toolbar while the setting of Always Shown is on, any help please.

Here's the comparison photos not edited open the 4k overscan test pattern in a separate window to display it correctly

8 Comments
2024/04/15
12:44 UTC

15

Make firefox transparent. But only for background.

Is it possible make Firefox transparent but not the elements like text, image in the website?

This is the CSS I'm currently using.

:root #tabbrowser-tabbox {
    -moz-default-appearance: menupopup !important;
    appearance:  auto !important;
    opacity: 0.6;
}

https://preview.redd.it/uooxxkdx0muc1.png?width=2940&format=png&auto=webp&s=79fbf25db4974382efe4cb2244b3a97cc0c63994

6 Comments
2024/04/15
09:08 UTC

2

[FF 124] Changing tab height, but I'm not there yet

Hi everybody,

I'm using FF (latest version) on Win 11.

FF density is set to "tablet" even though I have a desktop rig, because that's what I prefer visually as a whole.

However, in that mode, tabs are a bit too high for my taste (I understand that it's for tablet purposes):

https://preview.redd.it/vu72cxas5juc1.png?width=370&format=png&auto=webp&s=6938a587a3db3d2fd55339c64049889ab01729a3

So I've found this topic and I've tried making some changes to userChrome.css:

#tabbrowser-tabs {
  max-height: 26px !important;
  min-height: 26px !important;  
}

#tabbrowser-tabs {
  max-height: 26px !important;
  min-height: 26px !important;  
}

The result was not what I was expecting, lol:

https://preview.redd.it/dg7za5aq5juc1.png?width=370&format=png&auto=webp&s=ab892f29f0ea37d7df6cafdb488aa8348a0f69e9

Could you help me solve these two issues? Thanks in advance.


As a side question, I'd also like to reduce vertical spacing in Bookmark folders, menus, etc:

https://preview.redd.it/dxw2pfqs9juc1.png?width=436&format=png&auto=webp&s=62663f0e7b997a887118e6575b1623db3e76f45b

Thanks again.

16 Comments
2024/04/14
23:41 UTC

2

What's the rule for how the star icon changes when a page is bookmarked

The star icon goes blue when visiting a bookmarked page. How do I change the look when it is starred?

2 Comments
2024/04/14
21:19 UTC

1

Disable address bar select on new tab

I have a custom start page that loads on new tabs. This start page has its own search bar that i use.

The problem is that when i make a new tab, firefox auto-selects the default address bar on top, so i have to manually click on the custom search bar.

How do i make it so that firefox doesnt select the default address bar and instead selects the custom page?

I cant modify the code so i can use js on the custom search bar to auto-select it.

Perhaps there's a new tab extension that solves this problem?

1 Comment
2024/04/14
17:27 UTC

0

[HELP NEEDED] Changing text selection color causes font to change in pdfs

I'm using the following in userContent.css

@-moz-document url-prefix(http), url-prefix(https), url-prefix(file) {
    ::selection {
        background-color: #fd6b6b !important; /* Red background */
        color: black !important; /* Black text */
    }
}

This is working fine on HTML, but on pdfs it causes the font of the selection to change as indicated in the attached image

https://preview.redd.it/aay6kr5ttduc1.png?width=779&format=png&auto=webp&s=f5c62c0cfc8359453ffe369ff0fc08eb093627d5

5 Comments
2024/04/14
05:37 UTC

0

Questions about customizing my new tab

I'm an absolute begginer btw, I didn't know anything about CSS 3 days ago.

How do I change the logo image into another image? I tried targetting it with "::before" or ".search-wrapper .logo-and-wordmark .logo" but didn't have much success. Maybe I made some mistake when trying to put the new image in, idk

Also, how would I go about inserting something new into the page? Like text, images with links, etc. ? So far I've only been able to replace existing elements and didn't find any resources on that online...

5 Comments
2024/04/14
04:35 UTC

2

Help again with bottom bookmarks border, is something like this possible ?

Basically i would like to hide-disable that border but only when the bookmarks toolbar is not visible, is something like that possible ?

https://preview.redd.it/dvk9c3lovauc1.png?width=710&format=png&auto=webp&s=9840fa285326fafce1ce061b3ca7913dd7f33c14

10 Comments
2024/04/13
19:42 UTC

3

Thunderbird v102. How to add classic Zebra striping in userChrome.css to the email letter list?

Here is a video https://imgur.com/a/Hn50kHF
The first one in the video is v.68 like we want it, and the second one is userChrome.css modified v.102.

How can I make it work like the first one? It is so hard with CSS.

I tried this code and it didnt work iether like the old variant.

https://kb.mozillazine.org/Zebra_striping

Thank you for helping me.

3 Comments
2024/04/13
17:00 UTC

5

Help needed, how to change border color under the bookmarks toolbar ?

Does anyone know to change the color of the border under the bookmarks toolbar with userChrome ? thanks

https://preview.redd.it/hsvugd6p1auc1.png?width=835&format=png&auto=webp&s=ce3a55f7965a533f3e7ccd41778e68e137438668

3 Comments
2024/04/13
16:54 UTC

3

Help needed, how to change toolbar top separator color with css

Hi, i recently found out i can change the toolbar top separator color with the firefox color addon, but i would like to do that with userchrome instead, how can i do that ? thanks

13 Comments
2024/04/12
22:41 UTC

3

change focus-outline-color for some webpage search boxes

0 Comments
2024/04/12
12:20 UTC

3

I can't change post flair to "solved"

Hi I'm not able to change my post to solved, I get an error message.

Can someone help?

https://preview.redd.it/4fwhd0lpv0uc1.png?width=1920&format=png&auto=webp&s=38b3b818e86d44951d3828e5413a374c31bf3782

4 Comments
2024/04/12
10:08 UTC

4

How to remove Firefox nav bar auto hide animation?

14 Comments
2024/04/12
09:48 UTC

6

Is there a way to bring back the infinite scroll bar?

Last year Mozilla changed the way the scrollbar works, so that it no longer loads pages automatically when dragged downwards, and it now stops and becomes unresponsive every time a new page is loaded.

Is there any way to make it work like it did before?

1 Comment
2024/04/12
02:08 UTC

Back To Top