SVG filters are a fine design tool and a bad runtime
On this page
A Statamic marketing site I built in September came from a designer's Figma with torn-paper and grain edges on the section bands. The quickest faithful way to ship that was an SVG filter chain applied to the real elements with filter: url(#torn). It looked right in every desktop browser. Then I opened it in the iOS 26 simulator.
Two symptoms, one cause
First, Safari painted a solid black or blank block, about 370 by 390 pixels, over the top of the page whenever a filtered element shared the page's compositing layer. transform: translateZ(0) or will-change: filter on the element made it go away. contain: paint and isolation: isolate did not. Desktop Safari never showed it.
Second, scrolling dropped to about 5 frames per second as a filtered element entered the viewport. WebKit rasterises the whole filter chain right then. Mine had an feMorphology with radius 3, several blurs, around forty primitives in total. The size of the element barely mattered. The length of the chain did.
Lighthouse scored the page fine because the main thread was idle. The GPU was doing the work. The only thing that caught it was a scroll probe: a copy of the page with a scripted scrollTo over nine seconds and a fixed bar whose width is the measured frames per second, screenshotted from the simulator once a second.
The fix: run the filter once, ship the result
The filter output does not change per visitor, so there is no reason to compute it in their browser. I rendered a 2400 by 128 strip through the filter in headless Chrome with a transparent background at 2x, kept only the alpha, and applied it as a mask:
.band-top {
mask-image: url(/img/edge.webp);
mask-size: auto 100%;
mask-repeat: repeat-x;
}
.band-bottom { transform: scaleY(-1); }
Scrolling went back to 60 and the black block disappeared with it, because there was no filter left to composite.
Variable-size panels were harder. A nine-slice mask-border worked in the simulator and drew a grey triangle across the panel on a real iPhone, so those got a plain mask-image per breakpoint instead. Subtle baked textures, half a luminance level of grain, have to be lossless WebP; lossy encoding erases exactly the detail you baked.
One more trap: WebKit CORS-checks mask images. My local harness loaded the live site's CSS cross-origin and every masked element rendered as invisible, which looked like the fix had broken everything. Verify on the real origin.
What I took from it
SVG filters are a great way to design an edge. They are a bad way to render one on a phone. Bake anything static, measure on the device that will show it, and do not trust Lighthouse to notice scroll jank.