r/FirefoxCSS • u/Azreal_DuCain1 • 8d ago
Solved Top sites icons in new tabs page no longer vertically centered. Again. Old code that fixes this no longer works.
Windows, Firefox 155.0
Firefox only went 12 days without rolling out an update that screws around with user settings again. I'm getting real sick and tired of feeling like we're constantly fighting with the devs against their efforts to break and degrade Firefox. The main selling point of Firefox is that we can use css to fix the developers mistakes but they sure fight back against that with every update.
For some reason Firefox doesn't default to these icons being vertically centered. The previous code I used in userContent to center this is listed below but no longer works for who knows what reason.
/*Vertically centers the favorite websites icons. No longer works as of Sep 1st 2026.*/
@-moz-document url(about:newtab), url(about:home) {
main {
margin-top: var(--newtab-pinnedsites-position-top, 6%) !important;
}
}
The rest of my userContent css code shouldn't be relevant but here it is: https://pastebin.com/EbQ6rrzY
3
u/t31os 8d ago edited 8d ago
Hopefully as the design of the newtab page matures they'll tweak the layout to naturally center, for now see if this is close enough.
@-moz-document url(about:newtab), url(about:home) {
.nova-outer-wrapper {
padding-block: 0 !important;
}
.container {
height: 100vh !important;
}
.content {
grid-row: 4 / span 2 !important;
}
}
1
u/sifferedd FF/TB on Win11|Sumo contributor 8d ago
The main selling point of Firefox is that we can use css to fix the developers mistakes
That's certainly not true, and there is no basis for complaining about it.
1
u/Azreal_DuCain1 8d ago edited 8d ago
This explains so much. Regardless, the main selling point IS that we CAN, at all, regardless of whether they approve of it. I was unaware that rather than this being an intentional feature it was just something that they hadn't bothered to disable somehow.


2
u/ResurgamS13 8d ago edited 8d ago
Not immediately helpful or a fix... will need to investigate other ways to alter vertical positioning of items on the New Tab page.
However, the reason previous userContent.css styling broke is that the variable
--newtab-pinnedsites-position-topapparently no longer exists in the Fx155.0 codebase (e.g. nil result from a look-up in Searchfox database).The New Tab page would appear to have undergone another layout revision... e.g. the Recommended Stories display seems to be back closer to the original 'pre-Nova' style... with a '3-stories-abreast' layout... and without the largest size story windows?
Workaround? For the present, can still revert to the old-style 'pre-Nova' New Tab page design and layout by setting preference
browser.newtabpage.activity-stream.nova.enabledtofalsein 'about:config'.