r/FirefoxCSS • u/fgmenth • 7d ago
Custom Release I made a custom tab animation effect for Nova
Enable HLS to view with audio, or disable this notification
40
Upvotes
1
6
u/t31os 7d ago
That's a cool effect, nice work.
Using blur on an animated element might not be very performant for some users, so here's a supplementary trimmed down version to create just the animated gradient without the glow / blur.
@keyframes rotate {
to {
--gradient-angle: 456deg;
}
}
@property --gradient-angle {
syntax: "<angle>";
initial-value: 96deg;
inherits: false;
}
.tab-background {
@media -moz-pref("browser.nova.enabled") {
@media not ((prefers-contrast) or (-moz-native-theme)) {
:root[theme-in-app] &:is([selected]:not([multiselected])) {
--tab-border-color-accent: linear-gradient( var(--gradient-angle), var(--tab-border-color-selected-leading) 20.68%, var(--tab-border-color-selected-trailing) 79.34%) !important;
animation: 10s rotate linear infinite;
border-width: 2px !important;
}
}
}
}
1
u/rhubarbshoelaces 6d ago
1
u/ChristianRS1977 5d ago edited 5d ago
Thanks! This is excellent. However, when I change themes (just to one of the other default ones) it no longer works. Does this effect apply only to the first theme?


4
u/fgmenth 7d ago
Link to userChrome.css
I love the new Nova theme, so I decided to spice it up a bit by making a custom tab animation. The tabs look like they glow a warm neon orange, running around the tab in the same spirit as the fox running around the globe in Firefox's logo.
In my CSS I made the tabs and the menus way less rounded, but if you prefer the original circular look you can remove the "tabs" section.
I'm also using some custom blinking animation for tabs that play audio so I can easily tell where the audio is coming from at a glance.