|
| 1 | +/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/iconized_content_context_menu.css made available under Mozilla Public License v. 2.0 |
| 2 | +See the above repository for updates as well as full license text. */ |
| 3 | + |
| 4 | +/* Adds icons to menuitems in web content area context menu. |
| 5 | + * Note that this won't work if you have native context menus, |
| 6 | + * such as ones used on MacOS */ |
| 7 | + |
| 8 | +:where(#contentAreaContextMenu > menu:not(.menu-iconic))::before, |
| 9 | +:where(#contentAreaContextMenu > menuitem:not(.menuitem-iconic))::before{ |
| 10 | + display: flex; |
| 11 | + padding-inline-end: 8px; |
| 12 | + padding-top: 2px; |
| 13 | + width: 16px; |
| 14 | + height: 16px; |
| 15 | + align-items: center; |
| 16 | + justify-content: center; |
| 17 | + content: url("chrome://browser/skin/tab.svg"); |
| 18 | + -moz-context-properties: fill; |
| 19 | + fill: currentColor; |
| 20 | +} |
| 21 | +:where(#contentAreaContextMenu > menu), |
| 22 | +:where(#contentAreaContextMenu > menuitem){ |
| 23 | + padding-inline-start: 1em !important; |
| 24 | +} |
| 25 | +#contentAreaContextMenu > menuitem[type="checkbox"]::before{ |
| 26 | + content: url("chrome://devtools/skin/images/checkbox.svg"); |
| 27 | +} |
| 28 | +#contentAreaContextMenu > menuitem[type="checkbox"] > :is(.menu-iconic-left,.menu-icon){ |
| 29 | + display: none; |
| 30 | +} |
| 31 | +#contentAreaContextMenu > menuitem[type="checkbox"][_moz-menuactive]::before, |
| 32 | +#contentAreaContextMenu > menuitem[type="checkbox"][checked="true"]::before{ |
| 33 | + background: no-repeat center left url("chrome://global/skin/icons/check.svg"); |
| 34 | +} |
| 35 | +#contentAreaContextMenu > :is(.menu-iconic,.menuitem-iconic)::before{ |
| 36 | + content: none; |
| 37 | +} |
| 38 | +:where(#context-sep-navigation) ~ menuitem::before{ |
| 39 | + content: url("chrome://devtools/skin/images/tool-dom.svg"); |
| 40 | +} |
| 41 | +:where(#context-sep-viewsource-commands) ~ menuitem::before{ |
| 42 | + content: url("chrome://browser/skin/translations.svg"); |
| 43 | +} |
| 44 | +:where(#spell-suggestions-separator) ~ menuitem::before{ |
| 45 | + content: url("chrome://browser/skin/new-tab.svg"); |
| 46 | +} |
| 47 | +:where(#context-sep-open) ~ menuitem::before{ |
| 48 | + content: url("chrome://browser/skin/bookmark-star-on-tray.svg"); |
| 49 | +} |
| 50 | +:where(#context-savelinktopocket) ~ menuitem::before{ |
| 51 | + content: url("chrome://global/skin/icons/edit-copy.svg"); |
| 52 | +} |
| 53 | +:where(#context-sep-copylink) ~ menuitem::before{ |
| 54 | + content: url("chrome://devtools/skin/images/play.svg"); |
| 55 | +} |
| 56 | +:where(#context-media-sep-commands) ~ menuitem::before{ |
| 57 | + content: url("chrome://browser/skin/canvas.svg"); |
| 58 | +} |
| 59 | +:where(#context-sep-sharing) ~ menuitem::before{ |
| 60 | + content: url("chrome://browser/skin/login.svg"); |
| 61 | +} |
| 62 | +:where(#passwordmgr-items-separator) ~ menuitem::before{ |
| 63 | + content: url("chrome://global/skin/icons/edit.svg"); |
| 64 | +} |
| 65 | +:where(#context-sep-screenshots) ~ menuitem::before{ |
| 66 | + content: url("chrome://global/skin/icons/search-glass.svg"); |
| 67 | +} |
| 68 | +/* Individual items below */ |
| 69 | +#context-openlink::before{ |
| 70 | + content: url("chrome://browser/skin/window.svg"); |
| 71 | +} |
| 72 | +#context-openlinkprivate::before{ |
| 73 | + content: url("chrome://browser/skin/privateBrowsing.svg"); |
| 74 | +} |
| 75 | +#context-savelinktopocket::before{ |
| 76 | + content: url("chrome://global/skin/icons/pocket-outline.svg"); |
| 77 | +} |
| 78 | +#context-copylink::before, |
| 79 | +#context-stripOnShareLink::before, |
| 80 | +#context-copyaudiourl::before, |
| 81 | +#context-copyvideourl::before{ |
| 82 | + content: url("chrome://global/skin/icons/link.svg"); |
| 83 | +} |
| 84 | +#context-saveaudio::before, |
| 85 | +#context-saveimage::before, |
| 86 | +#context-savelink::before, |
| 87 | +#context-savevideo::before, |
| 88 | +#context-savepage::before{ |
| 89 | + content: url("chrome://browser/skin/save.svg"); |
| 90 | +} |
| 91 | +#context-pocket::before{ |
| 92 | + content: url("chrome://global/skin/icons/pocket.svg"); |
| 93 | +} |
| 94 | +#contentAreaContextMenu > #fill-login::before{ |
| 95 | + content: url("chrome://browser/skin/login.svg"); |
| 96 | +} |
| 97 | +#use-relay-mask::before{ |
| 98 | + content: url("chrome://browser/skin/preferences/relay-logo.svg"); |
| 99 | + transform: scale(0.85); |
| 100 | +} |
| 101 | +#context-copy::before, |
| 102 | +#context-pdfjs-copy::before{ |
| 103 | + content: url("chrome://global/skin/icons/edit-copy.svg"); |
| 104 | +} |
| 105 | +#context-cut::before, |
| 106 | +#context-pdfjs-cut::before{ |
| 107 | + content: url("chrome://browser/skin/edit-cut.svg"); |
| 108 | +} |
| 109 | +#context-paste-no-formatting::before, |
| 110 | +#context-paste::before, |
| 111 | +#context-pdfjs-paste::before{ |
| 112 | + content: url("chrome://browser/skin/edit-paste.svg"); |
| 113 | +} |
| 114 | +#context-delete::before, |
| 115 | +#context-pdfjs-delete::before{ |
| 116 | + content: url("chrome://global/skin/icons/delete.svg"); |
| 117 | +} |
| 118 | +#context-video-saveimage::before, |
| 119 | +#context-take-screenshot::before{ |
| 120 | + content: url("chrome://devtools/skin/images/command-screenshot.svg"); |
| 121 | +} |
| 122 | +#context-sendpagetodevice::before, |
| 123 | +#context-sendlinktodevice::before{ |
| 124 | + content: url("chrome://browser/skin/synced-tabs.svg"); |
| 125 | +} |
| 126 | +#context-media-play::before{ |
| 127 | + content: url("chrome://devtools/skin/images/play.svg"); |
| 128 | +} |
| 129 | +#context-media-pause::before{ |
| 130 | + content: url("chrome://devtools/skin/images/pause.svg"); |
| 131 | +} |
| 132 | +#context-media-mute::before{ |
| 133 | + content: url("chrome://global/skin/media/audio-muted.svg"); |
| 134 | + transform: scale(0.85); |
| 135 | +} |
| 136 | +#context-media-unmute::before{ |
| 137 | + content: url("chrome://global/skin/media/audio.svg"); |
| 138 | + transform: scale(0.85); |
| 139 | +} |
| 140 | +#context-media-hidecontrols::before, |
| 141 | +#context-media-showcontrols::before{ |
| 142 | + content: url("chrome://devtools/skin/images/dock-bottom.svg"); |
| 143 | +} |
| 144 | +#context-media-loop::before{ |
| 145 | + content: url("chrome://browser/skin/notification-icons/autoplay-media.svg"); |
| 146 | +} |
| 147 | +#context-leave-dom-fullscreen::before{ |
| 148 | + content: url("chrome://browser/skin/fullscreen-exit.svg"); |
| 149 | +} |
| 150 | +#context-video-fullscreen::before{ |
| 151 | + content: url("chrome://browser/skin/fullscreen.svg"); |
| 152 | +} |
| 153 | +#context-video-pictureinpicture::before{ |
| 154 | + content: url("chrome://global/skin/media/picture-in-picture-open.svg"); |
| 155 | +} |
| 156 | +#context-media-playbackrate::before{ |
| 157 | + content: url("chrome://global/skin/icons/performance.svg"); |
| 158 | +} |
| 159 | +#context-sendimage::before, |
| 160 | +#context-sendvideo::before, |
| 161 | +#context-sendaudio::before{ |
| 162 | + content: url("chrome://browser/skin/mail.svg"); |
| 163 | +} |
| 164 | +#context-undo::before, |
| 165 | +#context-pdfjs-undo::before, |
| 166 | +#context-redo::before, |
| 167 | +#context-pdfjs-redo::before{ |
| 168 | + content: url("chrome://global/skin/icons/undo.svg"); |
| 169 | +} |
| 170 | +#context-redo::before, |
| 171 | +#context-pdfjs-redo::before{ |
| 172 | + transform-box: content-box; |
| 173 | + transform: scaleX(-1); |
| 174 | +} |
| 175 | +#context-selectall::before, |
| 176 | +#context-pdfjs-selectall::before, |
| 177 | +#context-pdfjs-highlight-selection::before{ |
| 178 | + content: url("chrome://global/skin/reader/character-spacing-20.svg"); |
| 179 | + transform: scale(0.85); |
| 180 | +} |
| 181 | +#context-reveal-password::before{ |
| 182 | + -moz-context-properties: fill,stroke; |
| 183 | + stroke: currentColor; |
| 184 | + content: url("chrome://devtools/skin/images/eye-opened.svg"); |
| 185 | +} |
| 186 | +#context-print-selection::before{ |
| 187 | + content: url("chrome://global/skin/icons/print.svg"); |
| 188 | +} |
| 189 | +#context-translate-selection::before, |
| 190 | +#spell-check-enabled::before, |
| 191 | +#spell-add-dictionaries-main::before, |
| 192 | +#spell-dictionaries::before{ |
| 193 | + content: url("chrome://browser/skin/translations.svg"); |
| 194 | +} |
| 195 | +#context-ask-chat::before{ |
| 196 | + content: url("chrome://global/skin/icons/highlights.svg"); |
| 197 | +} |
| 198 | +#context-bidi-text-direction-toggle::before, |
| 199 | +#context-bidi-page-direction-toggle::before{ |
| 200 | + content: url("chrome://devtools/skin/images/command-bidi.svg"); |
| 201 | +} |
| 202 | +#context-viewpartialsource-selection::before, |
| 203 | +#context-viewsource::before{ |
| 204 | + content: url("chrome://browser/skin/characterEncoding.svg"); |
| 205 | +} |
| 206 | +#context-inspect-a11y::before{ |
| 207 | + content: url("chrome://devtools/skin/images/accessibility.svg"); |
| 208 | +} |
| 209 | +#context-inspect::before{ |
| 210 | + content: url("chrome://devtools/skin/images/open-inspector.svg"); |
| 211 | +} |
0 commit comments