Guest User

Add color to Firefox SVG icons. Fx143+

a guest
Sep 20th, 2025
10
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 10.84 KB | Source Code | 0 0
  1. /*********** Add color to Firefox SVG icons. Fx143+ ***********/
  2.  
  3. /****** Icon Transparency ******/
  4. @media (prefers-color-scheme: light) {
  5. treechildren::-moz-tree-image {
  6.   -moz-context-properties: fill, fill-opacity !important;
  7.   fill-opacity: 1 !important;
  8.  }
  9. }
  10. @media (prefers-color-scheme: dark) {
  11. treechildren::-moz-tree-image {
  12.   -moz-context-properties: fill, fill-opacity !important;
  13.   fill-opacity: 1 !important;
  14.  }
  15. }
  16.  
  17. /****** Import bookmarks... ******/
  18. #import-button {
  19.   list-style-image: url("chrome://browser/skin/import.svg") !important;
  20.   /*list-style-image: url("./image/import.svg") !important;*/
  21.   fill: #00969f !important;
  22. }
  23.  
  24. /****** defaultFavicon ******/
  25. treechildren::-moz-tree-image(title) {
  26.   list-style-image: url("chrome://global/skin/icons/defaultFavicon.svg") !important;
  27.   fill: #86b5eb !important;
  28. }
  29. .bookmark-item {
  30.   list-style-image: url("chrome://global/skin/icons/defaultFavicon.svg") !important;
  31.   fill: #86b5eb !important;
  32. }
  33.  
  34. /****** Folder (Bookmarks Sidebar and Browsing Library) ******/
  35. treechildren::-moz-tree-image(title, container),
  36. treechildren::-moz-tree-image(title, open) {
  37.   /*list-style-image: url("chrome://global/skin/icons/folder.svg") !important;*/
  38.   list-style-image: url("./image/folder_57.svg") !important;
  39.   -moz-context-properties: fill;
  40.   fill: #e8bb00 !important;
  41. }
  42.  
  43. /****** bookmarksToolbar ******/
  44. treechildren::-moz-tree-image(container, queryFolder_toolbar_____) {
  45.   list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.svg") !important;
  46.   fill: #38b48b !important;
  47. }
  48.  
  49. /****** bookmarksMenu ******/
  50. treechildren::-moz-tree-image(container, queryFolder_menu________) {
  51.   list-style-image: url("chrome://browser/skin/places/bookmarksMenu.svg") !important;
  52.   fill: violet !important;
  53. }
  54.  
  55. /* query-nodes should be styled even if they're not expandable */
  56. /****** gear ******/
  57. treechildren::-moz-tree-image(query) {
  58.   list-style-image: url("chrome://browser/skin/places/folder-smart.svg") !important;
  59.   fill: #69c !important;
  60. }
  61.  
  62. /****** All Bookmarks ******/
  63. treechildren::-moz-tree-image(query, OrganizerQuery_allbms_____v) {
  64.   list-style-image: url("chrome://browser/skin/bookmark.svg") !important;
  65.   fill: light-dark(#f0cc02, #d8b701) !important;
  66. }
  67.  
  68. /****** Downloads ******/
  69. treechildren::-moz-tree-image(query, OrganizerQuery_downloads__v) {
  70.   list-style-image: url("chrome://browser/skin/downloads/downloads.svg") !important;
  71.   /*list-style-image: url("./image/download.svg") !important;*/
  72.   fill: light-dark(#0080ff, deepskyblue) !important;
  73. }
  74.  
  75. /****** Tag ******/
  76. treechildren::-moz-tree-image(title, query, tagContainer),
  77. treechildren::-moz-tree-image(query, OrganizerQuery_tags_______v) {
  78.   list-style-image: url("chrome://browser/skin/places/tag.svg") !important;
  79.   fill: light-dark(#8f76d6, #ab8cff) !important;
  80. }
  81.  
  82. /****** History sidebar and browsing library history (today, yesterday, last 7 days, this month, etc.) ******/
  83. treechildren::-moz-tree-image(title, query, dayContainer) {
  84.   list-style-image: url("chrome://browser/skin/history.svg") !important;
  85.   fill: light-dark(#bc763c, #bb5520) !important;
  86. }
  87.  
  88. /****** History, browsing library ******/
  89. treechildren::-moz-tree-image(query, OrganizerQuery_history____v) {
  90.   /*list-style-image: url("chrome://browser/skin/history.svg") !important;*/
  91.   list-style-image: url("./image/history.svg") !important;
  92.   /*list-style-image: url("./image/history2.svg") !important;*/
  93.   fill: light-dark(#bc763c, #bb5520) !important;
  94. }
  95.  
  96. /****** History sidebar folder ******/
  97. treechildren::-moz-tree-image(title, query, hostContainer) {
  98.   /*list-style-image: url("chrome://global/skin/icons/folder.svg") !important;*/
  99.   list-style-image: url("./image/folder_57.svg") !important;
  100.   fill: #e8bb00 !important;
  101. }
  102.  
  103. /****** Other Bookmarks ******/
  104. #editBMPanel_folderMenuList:-moz-any([label="Other Bookmarks"],[label="Weitere Lesezeichen"],[label="他のブックマーク"]) .menulist-icon,
  105. treechildren::-moz-tree-image(container, OrganizerQuery_UnfiledBookmarks),
  106. treechildren::-moz-tree-image(container, queryFolder_unfiled_____),
  107. #editBMPanel_folderMenuList[selectedGuid="unfiled_____"] {
  108.   list-style-image: url("./image/unfiledBookmarks.svg") !important;
  109.   fill: light-dark(olive, #B2B266) !important;
  110. }
  111.  
  112. #editBMPanel_unfiledRootItem > :is(.menu-icon,.menu-iconic-icon),
  113. #menu_unsortedBookmarks > :is(.menu-icon,.menu-iconic-icon),
  114. #BMB_unsortedBookmarks > :is(.menu-icon,.menu-iconic-icon),
  115. #OtherBookmarks > :is(.menu-icon, .toolbarbutton-icon) {
  116.   content: url("./image/unfiledBookmarks.svg") !important;
  117.   fill: light-dark(olive, #B2B266) !important;
  118. }
  119.  
  120.  /* Add/Edit Bookmarks panel folder */
  121. #editBMPanel_chooseFolderMenuItem > :is(.menu-icon,.menu-iconic-icon),
  122. #editBMPanel_folderMenuList,
  123. .folder-icon > :is(.menu-icon,.menu-iconic-icon) {
  124.   /*list-style-image: url("chrome://global/skin/icons/folder.svg") !important;*/
  125.   list-style-image: url("./image/folder_57.svg") !important;
  126.   fill: #e8bb00 !important;
  127. }
  128.  
  129. #editBMPanel_folderMenuList[selectedGuid="toolbar_____"] > :is(.menu-icon, .toolbarbutton-icon),
  130. #editBMPanel_toolbarFolderItem > :is(.menu-icon, .toolbarbutton-icon),
  131. #BMB_bookmarksToolbar > :is(.menu-icon, .toolbarbutton-icon),
  132. #bookmarksToolbarFolderMenu > :is(.menu-icon, .toolbarbutton-icon) {
  133.   content: url("chrome://browser/skin/places/bookmarksToolbar.svg") !important;
  134.   fill: #38b48b !important;
  135. }
  136.  
  137. #editBMPanel_folderMenuList[selectedGuid="toolbar_____"] {
  138.   list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.svg") !important;
  139.   fill: #38b48b !important;
  140. }
  141.  
  142. #editBMPanel_folderMenuList[selectedGuid="menu________"] > :is(.menu-icon, .toolbarbutton-icon),
  143. #editBMPanel_bmRootItem > :is(.menu-icon, .toolbarbutton-icon) {
  144.   content: url("chrome://browser/skin/places/bookmarksMenu.svg") !important;
  145.   fill: violet !important;
  146. }
  147.  
  148. #editBMPanel_folderMenuList[selectedGuid="menu________"] {
  149.   list-style-image: url("chrome://browser/skin/places/bookmarksMenu.svg") !important;
  150.   fill: violet !important;
  151. }
  152.  
  153. /******************/
  154.  
  155. /* We want some queries to look like ordinary folders. This must come
  156.    after the (title, query) selector, or it would get overridden. */
  157.  
  158. treechildren::-moz-tree-image(title, query, folder) {
  159.   /*list-style-image: url("chrome://global/skin/icons/folder.svg") !important;*/
  160.   list-style-image: url("./image/folder_57.svg") !important;
  161. }
  162.  
  163. .menuitem-iconic.folder-icon > :is(.menu-icon, .toolbarbutton-icon),
  164. .bookmark-item[container] > :is(.menu-icon, .toolbarbutton-icon) {
  165.   /*content: url("chrome://global/skin/icons/folder.svg") !important;*/
  166.   content: url("./image/folder_57.svg") !important;
  167.   fill: #e8bb00 !important;
  168. }
  169.  
  170. /*********************************************************************/
  171. /*** Test Bookmarks Toolbar Folder ***/
  172. .menu-iconic.bookmark-item > :is(.menu-icon, .toolbarbutton-icon) {
  173.   /*content: url("chrome://global/skin/icons/folder.svg") !important;*/
  174.   content: url("./image/folder_57.svg") !important;
  175.   fill: #e8bb00 !important;
  176. }
  177.  
  178. .menuitem-iconic.folder-icon > :is(.menu-icon, .toolbarbutton-icon),
  179. #PlacesToolbarItems .bookmark-item[container] {
  180.   /*list-style-image: url("chrome://global/skin/icons/folder.svg") !important;*/
  181.   list-style-image: url("./image/folder_57.svg") !important;
  182.   fill: #e8bb00 !important;
  183. }
  184.  
  185. /*** Test Bookmarks Toolbar Sub-menu Folder ***/
  186. #PlacesToolbarItems .menu-iconic.bookmark-item > :is(.menu-icon, .toolbarbutton-icon) {
  187.   content: url("chrome://global/skin/dirListing/folder.png") !important;
  188. }
  189.  
  190. /*********************************************************************/
  191. /****** Bookmarks Toolbar Folder Color *******/
  192.  
  193. /* Bookmarks Toolbar Folder Color Green */
  194. .bookmark-item[container][label="New Folder"] > :is(.menu-icon, .toolbarbutton-icon) {
  195.   content: url("./image/folder_57.svg") !important;
  196.   fill: green !important;
  197. }
  198. /* Bookmarks Toolbar Folder Color Red */
  199. .bookmark-item[container][label="New Folder0"] > :is(.menu-icon, .toolbarbutton-icon) {
  200.   content: url("./image/folder_57.svg") !important;
  201.   fill: #FF0000 !important;
  202. }
  203. /* Bookmarks Toolbar Folder Color maroon */
  204. .bookmark-item[container][label="New Folder1"] > :is(.menu-icon, .toolbarbutton-icon) {
  205.   content: url("./image/folder_57.svg") !important;
  206.   fill: maroon !important;
  207. }
  208. /* Bookmarks Toolbar Folder Color deeppink */
  209. .bookmark-item[container][label="New Folder2"] > :is(.menu-icon, .toolbarbutton-icon) {
  210.   content: url("./image/folder_57.svg") !important;
  211.   fill: deeppink !important;
  212. }
  213. /* Bookmarks Toolbar Folder Color fuchsia */
  214. .bookmark-item[container][label="New Folder3"] > :is(.menu-icon, .toolbarbutton-icon) {
  215.   content: url("./image/folder_57.svg") !important;
  216.   fill: fuchsia !important;
  217. }
  218. /* Bookmarks Toolbar Folder Color crimson */
  219. .bookmark-item[container][label="New Folder4"] > :is(.menu-icon, .toolbarbutton-icon) {
  220.   content: url("./image/folder_57.svg") !important;
  221.   fill: crimson !important;
  222. }
  223. /* Bookmarks Toolbar Folder Color mediumvioletred */
  224. .bookmark-item[container][label="New Folder5"] > :is(.menu-icon, .toolbarbutton-icon) {
  225.   content: url("./image/folder_57.svg") !important;
  226.   fill: mediumvioletred !important;
  227. }
  228. /* Bookmarks Toolbar Folder Color plum */
  229. .bookmark-item[container][label="New Folder6"] > :is(.menu-icon, .toolbarbutton-icon) {
  230.   content: url("./image/folder_57.svg") !important;
  231.   fill: plum !important;
  232. }
  233. /* Bookmarks Toolbar Folder Color darkorange */
  234. .bookmark-item[container][label="New Folder7"] > :is(.menu-icon, .toolbarbutton-icon) {
  235.   content: url("./image/folder_57.svg") !important;
  236.   fill: darkorange !important;
  237. }
  238. /* Bookmarks Toolbar Folder Color Blue */
  239. .bookmark-item[container][label="New Folder8"] > :is(.menu-icon, .toolbarbutton-icon) {
  240.   content: url("./image/folder_57.svg") !important;
  241.   fill: #0000FF !important;
  242. }
  243. /* Bookmarks Toolbar Folder Color deepskyblue */
  244. .bookmark-item[container][label="New Folder9"] > :is(.menu-icon, .toolbarbutton-icon) {
  245.   content: url("./image/folder_57.svg") !important;
  246.   fill: Deepskyblue !important;
  247. }
  248. /* Bookmarks Toolbar Folder Color Oriental Blue */
  249. .bookmark-item[container][label="New Folder10"] > :is(.menu-icon, .toolbarbutton-icon) {
  250.   content: url("./image/folder_57.svg") !important;
  251.   fill: #304285 !important;
  252. }
  253. /* Bookmarks Toolbar Folder Color Light blue */
  254. .bookmark-item[container][label="New Folder11"] > :is(.menu-icon, .toolbarbutton-icon) {
  255.   content: url("./image/folder_57.svg") !important;
  256.   fill: #00a496 !important;
  257. }
  258. /* Bookmarks Toolbar Folder Color Green */
  259. .bookmark-item[container][label="New Folder12"] > :is(.menu-icon, .toolbarbutton-icon) {
  260.   content: url("./image/folder_57.svg") !important;
  261.   fill: #008000 !important;
  262. }
  263. /* Bookmarks Toolbar Folder Color Purple */
  264. .bookmark-item[container][label="New Folder13"] > :is(.menu-icon, .toolbarbutton-icon) {
  265.   content: url("./image/folder_57.svg") !important;
  266.   fill: #885bd5 !important;
  267. }
Advertisement
Add Comment
Please, Sign In to add comment