Mozilla has released Firefox 159, bringing two long-awaited web standards to stable browsers: hardware-accelerated CSS Scroll-driven Animations and scoped CustomElementRegistry instances inside Shadow DOM.
For years, building reading progress bars, parallax effects, or scroll-triggered card reveals meant pulling in heavy JavaScript libraries like GSAP or wiring up window.addEventListener('scroll') handlers. Even wrapped in requestAnimationFrame, those listeners competed with app logic on the main thread and caused visible jitter on mobile devices.
Native Scroll Animations in Pure CSS
Firefox 159 ships full support for the CSS Scroll-driven Animations spec. You can now bind an animation's progress directly to a container's scroll position or an element's visibility (View Timeline) declaratively in CSS. The browser runs the animation straight on the GPU compositor thread, holding a rock-solid 60 FPS no matter how busy the JavaScript main thread gets.
Here is a classic reading-progress bar with zero JavaScript:
/* Reading progress bar in pure CSS with no JavaScript */
.reading-progress-bar {
position: fixed;
top: 0;
left: 0;
height: 4px;
background: linear-gradient(90deg, #3b82f6, #10b981);
transform-origin: 0 50%;
animation: grow-progress auto linear;
animation-timeline: scroll(root block);
}
@keyframes grow-progress {
from { transform: scaleX(0); }
to { transform: scaleX(1); }
}
The animation-timeline: scroll(root block) rule ties the keyframe timeline to the root document's vertical scroll, scaling the bar smoothly from 0 to 100% as the user scrolls.
Isolating Web Components with CustomElementRegistry
The second breakthrough is support for scoped component registries via new CustomElementRegistry(). Previously, custom elements could only be registered in the global customElements.define() namespace. If two independent micro-frontend libraries tried to register <my-button>, the collision threw a fatal naming error.
Now a component can attach an isolated Shadow DOM backed by its own private registry:
// Create a scoped component registry for Shadow DOM
const isolatedRegistry = new CustomElementRegistry();
isolatedRegistry.define('ui-button', class extends HTMLElement {
connectedCallback() {
this.innerHTML = '<button class="local-btn"><slot></slot></button>';
}
});
// Bind the registry to an isolated shadow root
const hostElement = document.querySelector('#widget-host');
const shadowRoot = hostElement.attachShadow({
mode: 'open',
customElements: isolatedRegistry
});
shadowRoot.innerHTML = '<ui-button>Isolated Button</ui-button>';
We covered earlier platform additions in Firefox 157 and native tooltip styling, and release 159 makes building rich, collision-free interfaces cleaner and noticeably faster.

