![Firefox logo](https://assets-prod.sumo.prod.webservices.mozgcp.net/media/uploads/products/2020-04-14-08-36-13-8dda6f.png)
firefox tabs close button
I am looking for a way to make the Firefox tab close button "x" bolder without affecting the background style. I tried using filter but I do not want any shadows or anything like that just to make the item itself not bigger but bolder - any ideas? Thank you all look4
เปลี่ยนแปลงโดย look4 เมื่อ
การตอบกลับทั้งหมด (7)
You may be able to get an answer on the Reddit sub FirefoxCSS. I suspect you will need to create a userChrome.css file.
Hi Terry , of course I use the userchrome.css , that is how I tried the filter function that didn't do the trick. I cann't find anywhere any suggestions. thanks look4
That close X in a SVG file, but looks rather complicated to me to modify the thickness of the cross.
- chrome://global/skin/icons/close.svg
- view-source:chrome://global/skin/icons/close.svg
A possible alternative that uses a line (you need to escape '#' as %23 in a data URI):
data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16" fill="context-fill" fill-opacity="context-fill-opacity"><line x1="1.41" y1="1.41" x2="14.41" y2="14.41" fill="none" stroke="%23ff0000" stroke-linecap="round" stroke-width="3"></line><line x1="14.41" y1="1.41" x2="1.41" y2="14.41" fill="none" stroke="%23ff0000" stroke-linecap="round" stroke-width="3"></line></svg>
Hi cor-el, Sorry , I did not understand the alternative line. Could you please elaborate. Thanks look4
You can add CSS code to the userChrome.css file in the chrome folder in the Firefox profile folder. This code works for all close buttons with class name ".close-icon" like on the Tab bar and in the Sidebar (Bookmarks: Ctrl+B; History: Ctrl+H). You can replace ".close-icon" with ".tab-close-button" in place places to make this only work for the Tab bar
/* Close icon */ .close-icon { list-style-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22.83 22.83' width='16' height='16'><line x1='1.41' y1='1.41' x2='21.41' y2='21.41' stroke='context-fill' stroke-width='4' stroke-linecap='round'></line><line x1='21.41' y1='1.41' x2='1.41' y2='21.41' stroke='context-fill' stroke-width='4' stroke-linecap='round'></line></svg>") !important; padding: 2px !important; width: 16px !important; } /* Close icon color on hover */ .close-icon:hover { background-color: rgba(255,0,0,.7) !important; fill: white !important; }
It is not that difficult to create userChrome.css if you have never used it.
The first step is to open the "Help -> Troubleshooting Information" page and find the button to access the profile folder with the random name (xxxxxxxx.default-release).
You can find the button to go to the profile folder under the "Application Basics" section as "Profile Folder -> Open Folder". If you click this button then you open the profile folder in the Windows File Explorer. You need to create a folder with the name chrome in the profile folder with the random name (name is all lowercase). In the chrome folder you need to create a plain text file with the name userChrome.css (name is case sensitive). In this userChrome.css text file you paste the text posted. On Mac you can use the TextEdit utility to create the userChrome.css file as a plain text file.
In Windows saving the file is usually the only time things get more complicated because Windows can silently add a .txt file extension and you end up with a file named userChrome.css.txt. To avoid this you need to make sure to select "All files" in the dialog to save the file in the text editor using "Save File as".
You need to close (Quit/Exit) and restart Firefox when you create or modify the userChrome.css file.
More info about userContent.css and userChrome.css in case you are not familiar: *https://www.userchrome.org/what-is-userchrome-css.html
- https://www.userchrome.org/how-create-userchrome-css.html
- https://www.userchrome.org/firefox-changes-userchrome-css.html
In Firefox 69 and later you need to set this pref to true on the about:config page to enable userChrome.css and userContent.css in the chrome folder.
- about:config => toolkit.legacyUserProfileCustomizations.stylesheets = true
- https://support.mozilla.org/en-US/kb/about-config-editor-firefox
Thanks cor-el it works fine , is there a way using that code to make the "x" smaller a bit - thanks so much for your help. look4
Set can set the size by adjusting width: 16px !important; => width: 14px !important; or smaller.