Closed Aris-t2 closed 3 years ago
Hi Aris.
In theory yes, but do we really need that? We can force menuitems to use icons via CSS like mentioned above or does this not work for you?
Lol, nope, check the very first time I asked you that question, I said I'd tried the following and it was not working:
#bookmarksShowAll {
-moz-appearance: menuitem-iconic !important;
list-style-image: url("chrome://browser/skin/library.svg") !important;
-moz-image-region: auto !important; }
When I look at the DOM afterwards, the Moz-Appearance property is there, but it's striked; it says invalid property value. There is a Moz-Appearance property already in the browser applied to that menu entry, it's set to "menuitem" rather than "menuitem-iconic" and it ALSO is striked as invalid.
In the meantime, I was able to modify the Restart Menu script (thank you for that) and add the menuitem-iconic CLASS to the menu entry it creates, and I can then style it from inside the JS or from userChrome. I guess we can continue this in the general on CustomJSforFx? I can read JS (like I can read English) but I have no clue how to modify elements. Ideally we'd have a script that iterates over all the menus and entries and adds the iconic class, but that would be tricky. I'll settle for an example that adds the iconic class to #bookmarksShowAll and I'll do the rest. Is no one else missing the icons in our menus? lol.
Thank you. Best Regards,
Mozilla seems to have done everything possible to permit iconizing default menuitem or menu appearances (uaing CSS), but there are still other CSS hacks to achieve menu icons. You still have to "correct" menuitems hover color to match the one used by your OS theme.
Add code to userChrome.css or my_userChrome.css .
#bookmarksShowAll {
-moz-appearance: none !important;
background-image: url("./image/bookmarksMenu.png") !important;
background-repeat: no-repeat !important;
background-position: 6px !important;
padding-top: 2px !important;
padding-bottom: 2px !important;
}
#bookmarksShowAll:hover {
background-color: Highlight !important;
color: HighlightText !important;
}
Good day Aris.
I'm not sure why we cannot apply moz-appearance to the menus, and why the appearance that's built-in is also not allowed (i.e. "menuitem" striked out in DOM inspector). The browser is clearly applying an appearance, because your code above does not work if we do not set appearance to NONE. Everyone's got a big screen nowadays, saving 16 vertical pixels by hiding the menu (and making it ugly) is not worth it (unless you are a fan of the Firefox button.) But hey, Chrome does it so we gotta do it too! Funny how they got rid of Eye Candy (a masterpiece if you ask me) and now Google is adding Tab Groups to Chrome! Aping Chrome is not always a sure thing...
Lol, you are cheating with that CSS, using a background image! And it works too! ;-) And we can go further and make everything use the same highlight so it looks natural (with some padding bugs to be worked out later):
menu, menuitem {
-moz-appearance: none !important;
padding-top: 2px !important;
padding-bottom: 2px !important; }
menu:hover, menuitem:hover {
background-color: Highlight !important;
color: HighlightText !important; }
Alright, I can make a JS version and a CSS version. Thanks for your help! Maybe you'll like the icons and use them in your own menus ;-) This will take some time, I gotta work on setting-up other things in the browser first, like Containers and other webextensions. Once I've got it all ready I'll email the Menu Icons Plus guy and see if we can use his icons (it's a single image) for the missing stuff.
Best Regards Aris!
If you are interested in more CSS cheats, this might be somthing for you too:
#bookmarksShowAll::before {
display: block !important;
content: "" !important;
width: 16px !important;
height: 16px !important;
background-image: url("./image/bookmarksMenu.png") !important;
margin-inline-start: 6px !important;
}
#bookmarksShowAll .menu-text {
margin-inline-start: -22px !important; /* -(item width+margin) */
}
In this version you do not have to handle item/text hover colors.
Neat, this works even better ;-) I have no idea how it works, but it does. You seem to be inserting an element, tap tap tap over to w3schools.com -> Indeed you are! Wow, I did not know we could do this! And even if I did, it would not have occurred to me to use it. We can even do it this way:
#bookmarksShowAll::before {
display: block !important;
content: url("./image/bookmarksMenu.png") !important;
width: 16px !important;
height: 16px !important;
margin-inline-start: 6px !important; }
Wow, this is great! I'm wondering if I should do a JS version at all with this. It looks pretty solid, but lets see what issues I come-up against lol, I'm sure I'll find some menu element that's somehow different than the others, or that I cannot figure out how to address because it has no ID or something...
Well, thanks a bunch! Best Regards,
Hi Aris-t2.
Is there any CSS to remove expand search engine choice and search settings from about:home searchbar???
@TerekMoL
Add this to your userContent.css
or my_userContent.css
:
@-moz-document url(about:newtab), url(about:home) {
#searchSuggestionTable {
display: none !important;
}
}
I'm sorry if my next question violates your rules and doesn't mean to be discussed here.
When Firefox works with pref privacy.resistFingerprinting:true it opens the browser in the window 1000x891. Because of this, youtube displays the video player as in theatrical mode (but this is not):
Is there any way to do so it would be displayed as in old youtube layout?
Sorry, you have to ask Mozilla developers that question.
@TerekMoL Strange, my window size is "landscape" too and YouTube does not hide the right-hand side. You can tell Firefox to open in the size you want with the following lines in user.js (and you can also try letterboxing) ->
user_pref("privacy.window.maxInnerWidth", 1600); // 4502: Initial window size [FF55+] Width rounds down to 200s and height to 100s https://bugzilla.mozilla.org/1330882
user_pref("privacy.window.maxInnerHeight", 800); // 4502: Initial window size [FF55+] Width rounds down to 200s and height to 100s https://bugzilla.mozilla.org/1330882
user_pref("privacy.resistFingerprinting.letterboxing", true); // 4504: Enable RFP letterboxing [FF67+] https://bugzilla.mozilla.org/1407366 [HIDDEN PREF]
@Aris-t2 Good day.
This ::Before/::After trick is absolutely Brilliant! I am trying-out Temporary Containers. The addon adds a menu entry to bookmarks context menus, the label is "Open Bookmark in new temporary container tab." Could it be any longer?! No problem, let's use @Aris-t2's trick to re-Label that:
#_c607c8df-14a7-4f28-894f-29e8722976af_-menuitem-_open-bookmark-in-new-temporary-container-tab.menuitem-iconic label.menu-iconic-text { display: none !important; }
#_c607c8df-14a7-4f28-894f-29e8722976af_-menuitem-_open-bookmark-in-new-temporary-container-tab.menuitem-iconic::After {
display: block !important;
content: "Open in Tmp Container" !important;
margin-inline-start: -23px !important;
padding-inline-end: 2px;
}
This trick is just brilliant! I tried it with BEFORE but it would not let me select the label, the following didn't work for some reason, but no matter, I got it working with AFTER instead...
#_c607c8df-14a7-4f28-894f-29e8722976af_-menuitem-_open-bookmark-in-new-temporary-container-tab.menuitem-iconic label.menu-iconic-text::Before { blabla; }
Thanks again! I used to use a Menu-Editor AddOn to re-label stuff, and of course it no longer works, but I can now do it with CSS ;-) I hope I'm not going to run into issues adding icons to the menus like this where ::Before refuses to work unless I target an element with it's ID - I'm bound to find a menu entry that has no ID. I used Copy-Path (above) in DOM Inspector, so the path I tried with BEFORE should've worked. I'm still no CSS expert lol.
To All,
There was talk of placing items (icons) in the MenuBar recently I think? Anyway, I usually place the Weather icon at the end of the MenuBar - At the right edge of the Firefox window, with a Flex space before it. This was no longer working, the icon would only move to the middle of the window. That's because there is an invisible flexible "spacer" sitting after the Menu in the MenuBar. Get rid of it and you can place items as you like again:
#menubar-items+spacer { display: none !important; }
Best Regards,
@Aris-t2 The tab scroll buttons are missing in my profile. Any idea why could this happen and how to restore them? I tried enabling and disabling /* Tab scroll buttons position - [only use one at a time] but still did not make any changes
Post a screenshot.
What i mean is that the < and > buttons are missing
Mine
Blank profile
And yes I have more than enough tabs open for the < and > buttons to appear
Funny how I only pop in around FF releases, coincidence? Anyways, with FF 78.0 they added a new context menu and placed all those "undo multiple tab" options in a sub-menu, anyway to undo this change? I find having to now do two clicks instead of the previous one a rather dumb change by Mozilla, but you know Mozilla.
@rayman89 Test with default setup of this projects files. I can not reproduce your issue.
@ImSpecial CSS can not move menuitems other menus or menu areas.
Hi @Aris-t2 !
Is that possible to change the white color of this bar from download small window?
Hi there, I just installed Firefox 78.0.1 ESR and "Classic CSS tweaks for Firefox Quantum v3.1.6". The bookmarks menu and all items on it are white. I'd like it to be grey, like before. Any ideas how to make that happen?
This does not work: / Fix appearance of bookmark items. /
-moz-appearance: menuitem !important; padding: 0 0px !important; margin-top: 2px !important; margin-bottom: -2px !important; min-height: unset !important; height: 12px !important; background-color: rgb(235,235,235) !important; }
Thank you!
@Achille-Grs
Unfortunately I have no idea why the code for this does not work anymore. The correct CSS is:
#placesToolbox,
#placesToolbar {
-moz-appearance: none !important;
background: red !important;
}
IDs/classes can be found inside places.xhtml or organizer.css.
@Csimbi
-moz-appearance: menuitem !important;
is not supported anymore. You have to work around this:
#BMB_bookmarksPopup :-moz-any(menu, menuitem) {
-moz-appearance: none !important;
padding: 0 0px !important;
margin-top: 2px !important;
margin-bottom: -2px !important;
min-height: unset !important;
height: 12px !important;
color: black !important;
background-color: rgb(235,235,235) !important;
}
#BMB_bookmarksPopup :-moz-any(menu, menuitem):-moz-any(:hover, :active) {
color: HighlightText !important;
background-color: Highlight !important;
}
@Aris-t2 Works, thank you! However, the background of the little arrows are still white. Also, the arrows are visible even when they are not required. Is there anything you can suggest to fix these? Thank you!
@Aris-t2 I checked and the file that is causing the missing <> buttons is related with popup_menupopup_with_scrollbars.css and something else. If I disable that code the buttons appear again but I also tested on a vanilla profile and If only enable that file on top of the vanilla config and not change anything else the buttons are there as well.
The code unfortunately doesn't work. Also thank you @Aris-t2 for your response!
Good day Aris.
Good news is, I upgraded from v77 to v78 and nothing broke :-) So now I want to do the menu icons, but I ran into a little issue. Menu Icon Plus only has extra icons; it covers tons of stuff, but it does not have the built-in icons. No problem I thought, I'll just rip them from Omni.ja in my old FF52 folder. But they do not appear to /be/ in Omni.ja. I looked at all the png/svg files in there and I've got basically nothing. I cannot even find something like menubar.css or similar, and while browser.xul appears to create all the menus, there's not a trace of an image reference inside. I have no idea where the graphics are. Do you know? Are they in a DLL? I looked at Xul.dll with Resource Hacker but it does not find much. I might have to run FF52 side-by-side and rip the graphics one by one :-(
Best Regards,
@Csimbi
Because of the idiotic way Mozilla developers share CSS code between different Firefox areas, there is no way to target specific parts of the ui without affecting other parts.
.panel-arrowcontent { /* this might also affect other popups */
-moz-appearance: none !important;
background-color: rgb(235,235,235) !important;
}
#BMB_bookmarksPopup :-moz-any(menu, menuitem) {
-moz-appearance: none !important;
padding: 0 0px !important;
margin-top: 2px !important;
margin-bottom: -2px !important;
min-height: unset !important;
height: 12px !important;
color: black !important;
background-color: rgb(235,235,235) !important;
}
#BMB_bookmarksPopup :-moz-any(menu, menuitem):-moz-any(:hover, :active) {
color: HighlightText !important;
background-color: Highlight !important;
}
Hiding scroll buttons used inside the popup will also hide the ones used by tabs toolbar, when many tabs are open.
#scrollbutton-up,
#scrollbutton-down {
display: none !important;
}
@rayman89
popup_menupopup_with_scrollbars.css
hides scrollbuttons in general, because Mozilla devs decided to share the code between tabs toolbar scrollbuttons and menu popup scrollbuttons.
@B00ze64 Most basic ui content gets registered inside browser.css file. Icons were scattered between two omni.ja files back than.
@Aris-t2 I hear you, no comment ;-) It tried it, but the arrows are still having the usual white background.
Good day.
So yeah, there are TWO omni.ja lol, thanks. I ended-up needing a couple icons from FF24 too lol. Say, do you know what these data-l10n-id ID's are? I've started on Menu Icon Plus UserChrome (that darn extension has hundreds of icons, this will take a while, 1200 CSS lines so far) and I used data-l10n-id a couple times to target stuff, is that safe? I could use CMD or something else instead, but it's called ID so it seemed appropriate to select unique elements. However I'm afraid it's some kind of migration to HTML5 thing and will disappear one day making it hard to fix once Xul goes...
Did my first Pull (dev menu) for you :-)
A little preview of MIC (this is a mix of styles, there's 4 styles plus default past/current Firefox):
Thanks. Best Regards,
@Csimbi
The bookmark button popup code looks fine here on Fx 78 and 80.
@B00ze64
The data-l10n-id
tags are for internal localizing.
@Aris-t2 Hmmm. Not sure what's going on, those arrows are different for me. Have white background and show up even when not needed.
@Aris-t2 It's driving me nuts. Would you please zip up the entire chrome folder of yours and share it? I'd like to compare line by line. Thank you!
The folder is identical with the release archive. The only difference is the above code inside "my_userChrome.css".
Edit: Did you by any chance mean the submenus when you said it was not working? I did not check theme previously.
.panel-arrowcontent { /* this might also affect other popups */
-moz-appearance: none !important;
background-color: rgb(235,235,235) !important;
}
#BMB_bookmarksPopup :-moz-any(menu, menuitem) {
-moz-appearance: none !important;
padding: 0 0px !important;
margin-top: 2px !important;
margin-bottom: -2px !important;
min-height: unset !important;
height: 12px !important;
color: black !important;
background-color: rgb(235,235,235) !important;
}
#BMB_bookmarksPopup :-moz-any(menu, menuitem):-moz-any(:hover, :active) {
color: HighlightText !important;
background-color: Highlight !important;
}
menupopup,
.menupopup-arrowscrollbox {
-moz-appearance: none !important;
background-color: rgb(235,235,235) !important;
}
#scrollbutton-up,
#scrollbutton-down {
-moz-appearance: none !important;
background: unset !important;
}
This code will affect tab scollbuttons too.
@Aris-t2 Thank you for sharing! If found no differences. And indeed, you are right, it is in the bookmark submenus. The top level bookmark menu has these little pips coloured as intended.
Edit I see you added some additions in your edit. I tried it and these last few have fixed it! Thank you, much appreciated!
menupopup,
.menupopup-arrowscrollbox {
-moz-appearance: none !important;
background-color: grey !important;
}
#scrollbutton-up,
#scrollbutton-down {
-moz-appearance: none !important;
background: unset !important;
}
Anyone getting an issue where they can't open up context menu on the location bar (with cursor on location bar)?
For some reason this issue isn't persistent but when it does happen, I can repeatedly right-click on the location bar and not see the context menu pop up and eventually Firefox will crash. That part is consistent as far as when I've had to deal with it on Firefox 78.0.2. Going to see if I need to update anything but probing here in case it's come up.
Hi! I've installed kubuntu 20.04 on my computer but can't get the button in titlebar to work. The firefox version is 78.0.2, it works fine on windows 10 but on KDE the appbutton never shows up. I'm very new to CSS and maybe I'm missing some configuration necessary for it to work on linux? Any help would be appreciated.
@That-Random-Guy I have not encounter such issues yet. Maybe there is a script conflict somewhere. Try to reproduce this issue without any custom modifications.
@caiotbc The "titlebar" button is only available, if the switch to make the Firefox titlebar visible is set correctly. Look in customization mode for "Titlebar" checkbox and uncheck it.
Appbuttons appearance is not as good on Linux as it is on Windows. On some Linux versions button appearance is very glitchy while the same code works properly on other Linux versions.
@Aris-t2,
Is it possible to add icons to Copy
Paste
etc. in the page context-menu (with CSS only)?
@Aris-t2 Thanks, that was it, my appbutton is working perfectly now. I'm sorry to ask something silly again, but I'm having trouble with the titlebar minimize/maximize/close buttons. I'm using a custom plasma window decoration style but when I remove the titlebar firefox goes back to the default breeze icons. The configuration options to change those titlebar icons don't seem to do anything, am I doing something wrong again?
@Yaron10 This should be possible. Code for context menus menuitems can be applied the same way it is applied to other menu popups once you find the correct ids/classes using developer tools.
@caiotbc The OS titlebar is entirely handled by the OS / OS theme combo. The Firefox titlebar uses default buttons offered by OS files on Linux. You would need your custom themes images for minimize/maximize/close buttons and you would have to apply CSS code to point to them.
@Aris-t2,
Thanks for replying.
#context-copy { list-style-image: url("Copy.png") !important; }
does not work for me.
Sorry, I was under the impression you might have read the "first" discussion in this thread. It was all about adding custom icons to menuitems on current Firefox versions.
Tested on Fx 78 and 80 inside userChrome.css/my_userChrome.css.
Use your own path to image file.
[data-l10n-id="text-action-copy"]::before {
display: block !important;
content: url("./image/bookmarksMenu.png") !important;
width: 16px !important;
height: 16px !important;
margin-inline-start: 6px !important;
margin-inline-end: -22px !important;
}
[data-l10n-id="text-action-cut"]::before {
display: block !important;
content: url("./image/bookmarksMenu.png") !important;
width: 16px !important;
height: 16px !important;
margin-inline-start: 6px !important;
margin-inline-end: -22px !important;
}
[data-l10n-id="text-action-paste"]::before {
display: block !important;
content: url("./image/bookmarksMenu.png") !important;
width: 16px !important;
height: 16px !important;
margin-inline-start: 6px !important;
margin-inline-end: -22px !important;
}
@Aris-t2,
Great! I do appreciate it.
I'm using Win 7 Classic Theme and I had to slightly adapt it.
[data-l10n-id="text-action-copy"]::before {
display: block !important;
content: url("Copy.png") !important;
width: 16px !important;
height: 16px !important;
/* margin-inline-start: 6px !important; */
margin-inline-end: -16px !important;
margin-top: 4px !important;
}
(The M orange icon at the bottom is added by an extension. So this was my reference).
Adding margin-top: 5px !important;
increases the gap between the items, and in menus where some items have icons and others don't it looks weird.
Any solution?
Can I have the menu item added by the extension always placed immediately after #context-searchselect
?
Thanks again.
I want the UI of firefox to be dark and I found this work https://github.com/Izheil/Quantum-Nox-Firefox-Dark-Full-Theme/tree/master/Full%20dark%20theme but is it compatible with CustomCSSforFx?
I use CustomCSSforFx to get a fake addon bar and the tabs under main content.
@Yaron10
You can use ::after
instead of ::before
, if that is what you are asking.
@Janaue No idea. I do not combine this projects files with other projects.
Try to import the scripts you are using from here through the other projects userChrome file or vice versa.
Can I have the menu item added by the extension always placed immediately after #context-searchselect? ... You can use ::after instead of ::before, if that is what you are asking.
This is what I wanted (solved):
#context-searchselect { -moz-box-ordinal-group: 99 !important; }
menuitem[id*="MorfixSearch"] { -moz-box-ordinal-group: 100 !important; }
Thank you.
Is there a possible combination of options to enable to achieve the following configuration in Fx 78.0.2 64 bit, Windows 10, as I have in Pale Moon:
That is,
Title bar with tab name (this I got - enabled in Customize, then enabled userChrome option to have tab name in window title) Buttons, menu bar, navigation bar, search bar all on one line Bookmarks toolbar Multirow tabs
This is as far as I've gotten:
./css/tabs/tabs_below_navigation_toolbar_fx65_v2.css does at least put the tabs last, as seen above (./css/tabs/tabs_below_navigation_toolbar_fx65.css does not, also if I am reading the comments right, that is incompatible with multirow tabs) but if I fiddle around with other options, it looks like the menu bar is always stuck to being above the tabs, wherever they are.
I poked around in Customize, but the menu bar refuses to be dragged anywhere, nor could I get the desired effect by trying to rearrange other items around it.
Also ./css/tabs/tabs_multiple_lines_v2.css does not seem to have any effect, although I realize it is labeled "experimental".
Is there a possible combination of options to enable to achieve the following configuration in Fx 78.0.2 64 bit, Windows 10, as I have in Pale Moon
No, there is no way to move menubar items, location bar and the buttons back, forward, reload/stop to one toolbar using CSS.
You also have to use the options meant for your Fx version. "tabs_multiple_lines_v2.css" was for Fx 60-65 only, "tabs_multiple_lines_fx71.css" is for Fx 71 and later versions.
Keep in mind combining "tabs below navigation toolbar" and "multiple tabs lines" causes issues since Firefox 65, because Mozilla moved tabs toolbar and menubar into one box.
/* - Fx 65+ v2 - mainly for multi-lined tabs (Glitches with inactive menubar!) ******************/
/* @import "./css/tabs/tabs_below_navigation_toolbar_fx65_v2.css"; /**/
/* @import "./css/tabs/tabs_below_navigation_toolbar_fx65_v2_force_hidden_menubar.css"; /**/ /* no menubar when OS titlebar is active */
If you can use Fx without "multiple tabs lines", "tabs_below_navigation_toolbar_fx74.css" would be a better solution to put tabs below navigation toolbar.
Huh, weird, what I have doesn't mention anything above version 66, which is why I was trying those... I only downloaded it a few days ago, wonder how I managed to get a wrong version? I'll go make sure I have the latest.
Bummer about not being able to move the menu bar. I may just keep it off because having it on in the wrong place is worse looking than not having it.
Thanks!
@lihatt I think I almost have what you ask for, with these:
@import "./css/tabs/tabs_below_navigation_toolbar_fx65_v2.css";
@import "./css/tabs/tabs_multiple_lines_fx71.css";
Proof of concept in a clean profile, starting with CustomCSSforFx 3.1.6 and enabling the two includes listed above:
Hi.
Is there any solution to when typing in urlbar about:config the old version was opened "chrome://global/content/config.xhtml" ?
There nothing CSS can do to forward about:config to "chrome://global/content/config.xhtml".
Make sure you have updated your configuration to the most recent version of this projects files and are using the latest version of the "options" required by your Firefox version >before< reporting problems!
Continued from https://github.com/Aris-t2/CustomCSSforFx/issues/3, https://github.com/Aris-t2/CustomCSSforFx/issues/41, https://github.com/Aris-t2/CustomCSSforFx/issues/88, https://github.com/Aris-t2/CustomCSSforFx/issues/109, https://github.com/Aris-t2/CustomCSSforFx/issues/133, https://github.com/Aris-t2/CustomCSSforFx/issues/163, https://github.com/Aris-t2/CustomCSSforFx/issues/189, https://github.com/Aris-t2/CustomCSSforFx/issues/211, https://github.com/Aris-t2/CustomCSSforFx/issues/241 and https://github.com/Aris-t2/CustomCSSforFx/issues/273.
Instead of opening new "issues" for general talk we can use this area for discussions, feedback and questions. Open new "issues" for real bugs and problems.
Custom JS scripts to restore more classic features https://github.com/Aris-t2/CustomJSforFx
Things this project will not target/recreate
Things not possible with CSS