“Lighthouse: Fixing \”Avoid non-composited animations\””
When Lighthouse reports "Avoid non-composited animations" (in the Japanese locale, the title is a Japanese translation of this phrase), replace the properties you are animating with transform and opacity, and the warning goes away. Check this item when a CSS animation is choppy on a phone or when page layout shifts (higher CLS).
On the page I tested, rewriting two animations that moved left and box-shadow cleared the warning. Over a 3-second animation, style recalculations and layouts went from 180–181 to 0 each.
The test environment was Ubuntu 24.04, Node.js 22, Lighthouse 13.6.0 (the npm package), Chrome for Testing 153, and Playwright 1.63.0. I ran Lighthouse from the command line with the default settings (mobile), running only the performance category. The page was served by a small Node.js server on the same VM. I did not test the Lighthouse panel in Chrome DevTools, PageSpeed Insights, browsers other than Chrome, animations driven by JavaScript (Web Animations API), or how things look on a real phone.
The page that got flagged
For testing, I made a notice page with three animations.
/* 1. Footprints move from left to right (animates left) */
.paw { position: absolute; top: 8px; left: 0; width: 32px; height: 32px; border-radius: 50%;
background: #00c8e8; animation: walk 2s linear infinite; }
@keyframes walk { from { left: 0; } to { left: calc(100% - 32px); } }
/* 2. The notice banner's color blinks (animates background-color) */
.notice { margin-top: 16px; padding: 12px; animation: blink 1s ease-in-out infinite alternate; }
@keyframes blink { from { background-color: #ffffff; } to { background-color: #ffd6e0; } }
/* 3. The button's shadow swells (animates box-shadow) */
.cta { /* Colors and spacing omitted */ animation: glow 1.5s ease-in-out infinite alternate; }
@keyframes glow { from { box-shadow: 0 0 0 0 rgba(216,88,120,.6); }
to { box-shadow: 0 0 0 12px rgba(216,88,120,0); } }
I ran Lighthouse on this page and used a small script (sum.mjs) to pull this audit out of the JSON result. I passed --locale=ja to get Japanese output.
$ npx lighthouse http://localhost:8090/before/ --only-categories=performance --output=json --output=html --output-path=./out/before-ja --chrome-flags="--headless=new --no-sandbox" --quiet --locale=ja
$ node sum.mjs out/before-ja.report.json
lighthouse 13.6.0 formFactor=mobile locale=ja
performance=100 CLS=0.003
non-composited-animations: score=1 mode=informative title="合成されていないアニメーションは使用しないでください" displayValue="2 件のアニメーション要素が見つかりました"
<div class="paw"> selector=body > div.track > div.paw
- サポートされていない CSS プロパティ: left [walk]
<button class="cta" type="button"> selector=body > button.cta
- サポートされていない CSS プロパティ: box-shadow [glow]
The two flagged items were the footprint that moves left and the button that animates box-shadow. The notice bar that animates background-color did not appear in the list. The results were the same across three runs.
The HTML report lists, for each element, the reason it could not be composited and the animation name (the @keyframes name).

This audit is in the "Diagnostics" group and has a weight of 0 in the performance score. The report shows it as "no score." The test page still scored 100 with this warning showing. However, the official explanation also says that reducing CLS raises the performance score. When an animation adds to CLS, it affects the score through CLS.
"Not composited" means recalculating on the main thread every frame
Chrome can run transform and opacity animations on the compositor alone, the part that stacks page layers to produce the screen. Animating other properties means recalculating styles on the main thread for every frame, and for some properties, re-running layout too. The web.dev article on compositor-only properties says that only transform and opacity can be handled by the compositor alone.
To check this with numbers, I opened pages in Playwright and used the Chrome DevTools Protocol's Performance.getMetrics to count the main-thread work done over 3 seconds (the script is metrics.mjs). I made a separate page for each property, animating only that one property. I waited one second after loading, read the Performance.getMetrics values, waited 3 seconds, read them again, and took the difference.
const get = async () => Object.fromEntries((await cdp.send('Performance.getMetrics')).metrics.map(m => [m.name, m.value]));
const a = await get();
await page.waitForTimeout(3000);
const b = await get();
// Print b.RecalcStyleCount - a.RecalcStyleCount, etc.
single/left.html: RecalcStyleCount=180 LayoutCount=180 RecalcStyleDuration=9.8ms LayoutDuration=8.7ms TaskDuration=64.9ms
single/transform.html: RecalcStyleCount=0 LayoutCount=0 RecalcStyleDuration=0.0ms LayoutDuration=0.0ms TaskDuration=2.4ms
single/box-shadow.html: RecalcStyleCount=180 LayoutCount=0 RecalcStyleDuration=8.1ms LayoutDuration=0.0ms TaskDuration=49.4ms
single/background-color.html: RecalcStyleCount=0 LayoutCount=0 RecalcStyleDuration=0.0ms LayoutDuration=0.0ms TaskDuration=1.9ms
single/opacity.html: RecalcStyleCount=0 LayoutCount=0 RecalcStyleDuration=0.0ms LayoutDuration=0.0ms TaskDuration=2.7ms
| Property animated | Style recalculations | Layouts | Main-thread task time |
|---|---|---|---|
left |
180 | 180 | 64.9 ms |
box-shadow |
180 | 0 | 49.4 ms |
transform |
0 | 0 | 2.4 ms |
opacity |
0 | 0 | 2.7 ms |
background-color |
0 | 0 | 1.9 ms |
(These are totals over 3 seconds. 180 corresponds to 60 per second.)
For left, both style recalculation and layout ran on every frame. box-shadow did not trigger layout, but style recalculation still ran on every frame. transform and opacity both had 0 of each.
background-color also had 0, and Lighthouse did not flag it. The Chrome developers blog article on hardware-accelerated animations says that background-color and clip-path are planned to be run on the compositor automatically.
The left animation was also counted toward CLS. The CLS of the page before the fix was 0.003, and the breakdown (layout-shifts) listed only the footprint element.
body > div.track > div.paw score=0.0025
The same official explanation says that non-composited animations can increase CLS, and that composited animations are excluded from CLS.
Replacing left with transform: translateX()
Animate the footprint with transform: translateX() instead of left.
The original code moved left from 0 to calc(100% - 32px). The 100% there is the width of the track (the parent element). However, % in translateX() is by default based on the width of the element being moved (see MDN for left and translateX()). So I made the .runner wrapper around the footprint have a width of "track width minus footprint width," and moved .runner right by 100% of its own width.
.runner { position: absolute; top: 8px; left: 0; width: calc(100% - 32px);
animation: walk 2s linear infinite; }
.paw { width: 32px; height: 32px; border-radius: 50%; background: #00c8e8; }
@keyframes walk { from { transform: translateX(0); } to { transform: translateX(100%); } }
<div class="track"><div class="runner"><div class="paw"></div></div></div>
Using % in translateX() did not trigger the warning. I tested several properties on separate pages, and an element moved with translateX(50%) did not appear in the list. The developers blog article in the previous section also says that since Chromium 89, % transforms can run on the compositor as long as the element's size does not change between frames.
Replacing box-shadow with a layer animated by opacity and transform
box-shadow cannot run on the compositor as is. So I placed one pink layer behind the button, scaled it up with transform: scale(), and faded it out with opacity.
.cta-wrap { position: relative; isolation: isolate; display: inline-block; margin-top: 16px; }
.cta-wrap::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 8px;
background: rgba(216,88,120,.6); animation: glow 1.5s ease-in-out infinite alternate; }
@keyframes glow { from { transform: scale(1); opacity: 1; }
to { transform: scale(1.2, 1.5); opacity: 0; } }
.cta { display: block; /* Colors and spacing omitted */ }
<span class="cta-wrap"><button class="cta" type="button">予約する</button></span>
I did not put the pink layer on the button's own ::before, for a reason. When I gave the button isolation: isolate and put the ::before at z-index: -1 on the button, the pink layer was drawn over the button's background. At the start of the animation, the button's color dulled from rgb(6, 122, 152) (its original color) to rgb(132, 102, 133). When I wrapped the button in a <span> and placed the ::before on that <span>, the button kept its original color.
This does not exactly match the original box-shadow motion. The spread of the shadow (12px) is the same on all sides, but scale() expands by a proportion of the size, so on a wide button the top/bottom and left/right spread differ. In this test, I used 1.2× horizontally and 1.5× vertically to get close.
I left the notice bar's background-color as it was, since it was not flagged.
Results after the fix
I ran Lighthouse three times on the fixed page. All three times the audit was not applicable (notApplicable), and CLS was 0.
$ node sum.mjs out/after-r1.json
lighthouse 13.6.0 formFactor=mobile locale=en-US
performance=100 CLS=0.000
non-composited-animations: score=null mode=notApplicable title="Avoid non-composited animations" displayValue=""
Across all three runs, the main-thread work for the whole page over 3 seconds also dropped, as shown below.
| Page | Style recalculations | Layouts | Main-thread task time |
|---|---|---|---|
| Before the fix | 180–181 | 180–181 | 67.3–75.4 ms |
| After the fix | 0 | 0 | 2.1–4.0 ms |
I captured the page before and after the fix, both paused 0.5 seconds after the animation started. The footprint position, the notice bar color, and the pink edge behind the button look nearly the same.

Which other properties get flagged
Besides left and box-shadow, I animated several other properties one at a time and checked the Lighthouse list.
non-composited-animations: score=1 mode=informative title="Avoid non-composited animations" displayValue="3 animated elements found"
<div class="box c-width" id="width"> selector=body > div#width
- Unsupported CSS Property: width [a-width]
<div class="box c-custom" id="custom"> selector=body > div#custom
- Custom CSS properties cannot be animated on the compositor: --x [a-custom]
<div class="box c-blur" id="blur"> selector=body > div#blur
- Filter-related property may move pixels [a-blur]
| Animated | Flagged? | Reason |
|---|---|---|
width |
Yes | Unsupported CSS Property: width |
Custom property --x registered with @property (used in transform: translateX(var(--x))) |
Yes | Custom CSS properties cannot be animated on the compositor: --x |
filter: blur() |
Yes | Filter-related property may move pixels |
filter: grayscale() |
No | |
transform: translateX(50%) |
No | |
transform: translateX(20px) |
No | |
background-color |
No | |
opacity |
No |
The custom property was flagged even when it was used inside a transform value. An element moved the same way with transform: translateX(20px) written directly in @keyframes was not flagged. For filter, blur() was flagged, but grayscale(), which converts to black and white, was not. The reason text for blur() reads "Filter-related property may move pixels" in English. In the Japanese locale, it means roughly "filter-related properties may lead to pixel movement."
The CSS property named in the reason column of the list is the one to rewrite. In this test, rewriting left, which moves position, to transform, and rewriting box-shadow, which moves the shadow, to a layer animated with transform and opacity, cleared the warning.





