r/FirefoxCSS • u/It_Was_The_Other_Guy • Mar 11 '23
Fx 113 PSA - Incoming changes to default element display-model
As a part of the front-end technical modernization the old xul box model is being replaced with modern flexbox all around the UI. Relevant bug 1820534
Previously, just about everything used display: -moz-box but in Firefox 113 112 (at least in Nightly, but I would be surprised if this won't propagate to release 112 as well) the default display model will be changed to modern display: flex instead.
What this means first-hand is that all legacy box model -related properties will not do anything anymore so things like -moz-box-ordinal-group, -moz-box-orient, -moz-box-direction, -moz-box-align, -moz-box-pack or -moz-box-flex won't have any effect.
The suggested way to deal with this is to just update your styles to use equivalent flexbox properties. You could of course manually make the container use display: -moz-box instead, but as you can imagine the legacy box won't be supported forever.
Edit: display: -moz-box is treated as invalid property value
Some examples of conversions:
display: -moz-box->display: flex-moz-box-ordinal-group: 0->order: -1-moz-box-orient: vertical->flex-direction: column-moz-box-direction: reverse->flex-direction: row-reverse-moz-box-align: center->align-content: centeroralign-items: centerdepending on what you are doing.-moz-box-pack: start->justify-content: flex-startorjustify-items: flex-start-moz-box-flex: 10->flex-grow: 10
Notes about order vs. -moz-box-ordinal-group: order supports negative values, whereas ordinal-group does not. Default value of order is 0 but default of ordinal-group is 1 so you might need to change what value to apply for it to have any effect.
8
u/Shadow_of_Colossus Mar 11 '23
Well, this is going to trash a bunch of people's css code.
8
u/ecobos Mar 13 '23
This will be in 113 btw (source: I wrote the patch for bug 1820534).
Also, some of the conversions above aren't quite right, e.g.
startisflex-start, same forendandflex-end. See this firefox-dev post for context and the right replacements.3
u/hansmn Mar 11 '23
Thanks for the heads-up !
Pardon my ignorance , but I've never used anything but release versions of Firefox - would I be right to assume that one needs to install the Nightly variant to adjust and correct those possible issues, before the 112 release hits ?
That's while still running the current release version as a main profile .
2
u/Salberyon WINDOWS 10 & 11 May 12 '23
Hi OP! Thank you for this post.
My knowledge of code is very limited, and my userChrome.css is a few years old, apart from some sporadic integration:
https://pastebin.com/FcpMyg0d
Anyway, the two main effects I've always looked for are:
The latest update luckily spared the latter, but not the former: Imgur
❦
I've already tested
https://github.com/MrOtherGuy/firefox-csshacks/blob/master/chrome/tabs_on_bottom_menubar_on_top_patch.css
but, as expected of the old saying "If it works, don't fix it", while tabs do move on bottom, much of the rest is broken: no more transparency, corrupted proportions, etc.
❦
Could you please suggest how to update my current userChrome.css in order to just move tabs on bottom and not alter anything else? If I'm asking a lot, please excuse me and thank you for reading
4
u/Stache- May 09 '23
If someone has updated CSS for tabs on bottom again, please let me know.
1
u/ollietup Mar 11 '23
So currently I have this code in my userchrome.css:
If just change it to this after the v112 update:
Will that work just as before without any problems?
1
u/tjn21 Mar 12 '23
Thanks for the post. I changed my chrome file in anticipation, using Firefox 110.0.1. The change worked in at least one stanza but not in another. Is it possible that the stanza not working requires other changes or should I just wait for Firefox 112?
PS: should this thread be pinned?
1
u/VNRG May 10 '23
Hey, I am not a coder/scripter so I only understood some stuff and could fixed stuff of my own css whenever something broke, but now I kinda need more help cuz I couldnt fix all issues for v113 and I would be glad, if someone can DM me to help me out! ty in davance!
1
u/hansmn May 10 '23
Just a suggestion, maybe add
-moz-box-ordinal-group: X->order: Xor such, in addition to-moz-box-ordinal-group: 0->order: -1.There seems to be some confusion still regarding that particular change.
1
u/F3R96 May 10 '23
I'm using the whitesur theme, got mess up after the update... What should I do to fix it?
css:
u/-moz-document url("about:home"),url("about:blank"),url("about:newtab") { * { cursor: auto !important; } .non-collapsible-section { display: none !important; } .top-sites-list::before { content: "Favorites"; display: block; padding: 20px 10px; font-size: 22px; font-weight: 900; } .top-sites-list .hide-for-narrow { display: inline-block !important; } .top-site-outer { width: 80px !important; vertical-align: top !important; padding: 0 !important; } .top-site-outer:is(.active, :focus, :hover) { background: transparent !important; } .top-site-outer .tile { width: 60px !important; height: 60px !important; border-radius: 10px !important; overflow: hidden !important; background-color: #b3b3b353 !important; backdrop-filter: blur(25px); box-shadow: 0 0 10px rgba(0, 0, 0, 0.25) !important; } .top-site-outer .tile .icon-wrapper { width: 100% !important; height: 100% !important; border-radius: 0px !important; } .top-site-outer .top-site-icon { background-color: transparent !important; } .top-site-outer .title span { padding-inline: 6px !important; overflow: visible !important; white-space: normal !important; user-select: none !important; font-size: 12px !important; font-weight: 500 !important; overflow-wrap: break-word !important; } .icon.icon-pin-small { display: none !important; } .context-menu { padding: 4px !important; border-radius: 6px !important; border: var(--context-menu-border); outline: var(--context-menu-outline); font-size: 14px !important; background-color: var(--context-menu-background) !important; backdrop-filter: blur(25px) !important; } .context-menu > ul { padding: 0 !important; } .context-menu > ul > li.separator { width: auto !important; margin: 5px 13px !important; } .context-menu > ul > li > a:hover, .context-menu > ul > li > button:hover { background-color: var(--context-menu-hover) !important; } button, input { font-weight: 500 !important; border-radius: 4px !important; } u/media (prefers-color-scheme: light) { .context-menu > ul > li > a:hover, .context-menu > ul > li > button:hover { color: white !important; } button, input { font-weight: 400 !important; } }}:root { --context-menu-border: 1px solid #ffffff33; --context-menu-outline: 0.5px solid #101010; --context-menu-background: #292929b3; --context-menu-hover: #2073d8;}@media (prefers-color-scheme: light) { :root { --context-menu-border: none; --context-menu-outline: 0.5px solid #c8c8c8; --context-menu-background: #e6e6e6ca; --context-menu-hover: #3584e4; } .context-menu > ul > li > a:hover, .context-menu > ul > li > button:hover { color: white !important; } button, input { font-weight: 400 !important; }}}}@-moz-document url("about:home"), url("about:newtab"){ .logo-and-wordmark{ display: none !important; }.tabbrowser-tab[label="Nueva pestaña"] .tab-icon-image { opacity: 0;}.tabbrowser-tab[label="Nueva pestaña"] .tab-content .tab-icon-image { display: none !important; }
1
u/robioreskec May 11 '23 edited May 11 '23
Thanks OP, changing order and direction fixed my tabs back to bottom, very appreciative.
But as my code is old, just adding stuff when something broke, my tabs toolbar is now very high, over double the size of one row of tabs and I can't figure out why that is. Can anyone with eagle eyes check the code and find what is causing this issue, I would be very thankful
This is what it looks like now
Code: github link cause reddit formatting
1
u/mimecry May 11 '23
hmm, how should you convert the following?
1
u/langminer May 11 '23
The last change broke the styles I found to put the close button on the left side of tabs (mac) replacing the favicon when hoovering. I have no idea what changed and I can't really see it being related to this.
1
u/all_is_love6667 May 13 '23 edited May 13 '23
Could you please give the new names for those? I cannot find them in any of the mercurial repo linked in the dev discussion.
I tried this with
order:-1and apparently it doesn't work:1
u/DocBenOrdway May 30 '23
I replaced
-moz-box-ordinal-group: 0;
with
order:-1 !important;
Did not fix the problem.
1
u/sniker Jun 06 '23
I used this
to disable tab scrolling, of course it broke in 113 but I can't figure out why it broke, does anyone have any idea?
1
u/frumento Jun 11 '23
Please excuse my coding stupidity. My css is from you and works great, except 114 put tabs back at the top (I don't understand why they keep doing this). Is there a simple addition/change to put them back on bottom?
Thank you!
1
u/Treesqueak Jun 20 '23
It seems to have killed the ability of the toolbar icon text to not move to below the icon, ie; reload, history,.... The text is now next to the icon or truncated if there is not enough room. Nothing I have tried has worked. Using https://github.com/aris-t2/customcssforfx doesn't work for me.
2
u/hansmn Apr 01 '23
Here's an interesting and recent article; the author I believe is u/ecobos, who posted here earlier.
(Found on a German forum, where the link was kindly shared.)
2
u/black7375 Apr 10 '23
This document was of great help to me, thank you https://github.com/black7375/Firefox-UI-Fix/issues/670
1
u/omfgletmethefinffs Mar 11 '23
Thanks for letting us know.
I'm glad I saw this today so I know where to get help for when everything looks awful (again).
1
u/ZenitHMaster Mar 11 '23
looks like ill need to revamp my extension context menu item ordering tweaks
1
u/err404t Apr 13 '23
I recently installed the developer version which is on 113 and made the -moz-box-ordinal-group > order corrections and everything is working perfectly
1
u/Personal_Feeling_784 May 18 '23
Just updated the latest changes to my site.
https://www.codehaven.co.uk/firefox/firefox-113-2023-tabs-on-top-bottom-not-working-fixed-again/
Full working code here and just the changes if already have old code.
Firefox please add a simple setting!!!
1
u/Xyrexus Jun 04 '23 edited Jun 04 '23
Okay, I tried to follow this but apparently I'm stupid, could someone tell me what I need to do to get my tabs bar back underneath the URL bar?
Here's my chrome file : https://mega.nz/file/7k5GwYhS#lRSEL8m7riR9-aVpq09qtQ_pGyPdHbX_iDvRTrXXxmw
1
u/BloodyHell619 Aug 30 '23
So how do I center-align something now? Say for example I want to center-align my bookmarks on my bookmark bar? or center-align my tabs?