From 42bd801b7a312cb6ec4f4d06bebceb061b629f6f Mon Sep 17 00:00:00 2001 From: MrOtherGuy Date: Sat, 3 Aug 2024 08:41:33 +0300 Subject: [PATCH] create iconized_places_context_menu.css --- chrome/iconized_places_context_menu.css | 93 +++++++++++++++++++++++++ html_resources/tagmap.json | 3 +- tags.csv | 1 + 3 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 chrome/iconized_places_context_menu.css diff --git a/chrome/iconized_places_context_menu.css b/chrome/iconized_places_context_menu.css new file mode 100644 index 0000000..31ba4b7 --- /dev/null +++ b/chrome/iconized_places_context_menu.css @@ -0,0 +1,93 @@ +/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/iconized_places_context_menu.css made available under Mozilla Public License v. 2.0 +See the above repository for updates as well as full license text. */ + +/* Adds icons to menuitems in context menus of bookmarks toolbar + * as well as bookmarks and history sidebars. + * Note that this won't work if you have native context menus, + * such as ones used on MacOS */ + +:where(#placesContext > menu:not(.menu-iconic))::before, +:where(#placesContext > menuitem:not(.menuitem-iconic))::before{ + display: flex; + padding-inline-end: 8px; + padding-top: 2px; + width: 16px; + height: 16px; + align-items: center; + justify-content: center; + content: url("chrome://browser/skin/tab.svg"); + -moz-context-properties: fill; + fill: currentColor; +} +:where(#placesContext > menu), +:where(#placesContext > menuitem){ + padding-inline-start: 1em !important; +} +#placesContext > menuitem[type="checkbox"]::before{ + content: url("chrome://devtools/skin/images/checkbox.svg"); +} +#placesContext > menuitem[type="checkbox"][_moz-menuactive]::before, +#placesContext > menuitem[type="checkbox"][checked="true"]::before{ + background: no-repeat center left url("chrome://global/skin/icons/check.svg"); +} +#placesContext_openBookmarkContainer\:tabs::before, +#placesContext_openBookmarkLinks\:tabs::before{ + content: url("chrome://global/skin/icons/edit-copy.svg"); +} +#placesContext_open\:newtab::before{ + content: url("chrome://global/skin/icons/open-in-new.svg"); +} +#placesContext_openContainer\:tabs::before, +#placesContext_openLinks\:tabs::before{ + content: url("chrome://global/skin/icons/edit-copy.svg"); +} +#placesContext_open\:newwindow::before{ + content: url("chrome://browser/skin/window.svg"); +} +#placesContext_open\:newprivatewindow::before{ + content: url("chrome://browser/skin/privateBrowsing.svg"); +} +#placesContext_showInFolder::before, +#placesContext_new\:folder::before{ + content: url("chrome://global/skin/icons/folder.svg"); +} +#placesContext_show_bookmark\:info::before, +#placesContext_show\:info::before, +#placesContext_show_folder\:info::before{ + content: url("chrome://global/skin/icons/edit.svg"); +} +#placesContext_deleteFolder::before, +#placesContext_deleteBookmark::before, +#placesContext_delete::before, +#placesContext_delete_history::before{ + content: url("chrome://global/skin/icons/delete.svg"); +} +#placesContext_deleteHost::before{ + content: url("chrome://browser/skin/forget.svg"); +} +#placesContext_sortBy\:name::before{ + content: url("chrome://browser/skin/sort.svg"); +} +#placesContext_copy::before{ + content: url("chrome://devtools/skin/images/copy.svg"); +} +#placesContext_cut::before{ + content: url("chrome://browser/skin/edit-cut.svg"); +} +#placesContext_paste_group::before, +#placesContext_paste::before{ + content: url("chrome://browser/skin/edit-paste.svg"); +} +#placesContext_new\:bookmark::before, +#placesContext_createBookmark::before{ + content: url("chrome://browser/skin/bookmark-hollow.svg"); +} +#toggle_PersonalToolbar::before{ + content: url("chrome://browser/skin/bookmarks-toolbar.svg"); +} +#placesContext_showAllBookmarks::before{ + content: url("chrome://browser/skin/library.svg"); +} +#placesContext_new\:separator::before{ + content: url("chrome://global/skin/reader/content-width-20.svg"); +} \ No newline at end of file diff --git a/html_resources/tagmap.json b/html_resources/tagmap.json index df1333b..f3e4b16 100644 --- a/html_resources/tagmap.json +++ b/html_resources/tagmap.json @@ -172,5 +172,6 @@ "vertical_urlbar_one-off_items.css":["urlbar"], "window_control_fallback_for_custom_windows_theme.css":["window-control","buttons","colors","patch"], "window_control_force_linux_system_style.css":["window-control","buttons","icon"], -"window_control_placeholder_support.css":["window-control","patch"] +"window_control_placeholder_support.css":["window-control","patch"], +"iconized_places_context_menu.css":["menu","icon"] } diff --git a/tags.csv b/tags.csv index 80c19bf..d0673aa 100644 --- a/tags.csv +++ b/tags.csv @@ -172,3 +172,4 @@ vertical_urlbar_one-off_items.css,urlbar window_control_fallback_for_custom_windows_theme.css,window-control,buttons,colors,patch window_control_force_linux_system_style.css,window-control,buttons,icon window_control_placeholder_support.css,window-control,patch +iconized_places_context_menu.css,menu,icon