glassmorphismtocss.comMATERIAL STUDIO / 01

03 / PERFORMANCE

Test blur cost in a realistic scene

Change surface size, blur, and layer count. Run a short, opt-in moving-backdrop experiment and inspect animation callback intervals on this device.

INTERACTIVE EXAMPLE

Change it. Observe it.

Open in studio ↗

Material controls affect only this example. They do not replace your saved studio session.

MATERIAL / EXPERIMENT

Keep the idea.
Refine the surface.

Clear text, a translucent fill, and a backdrop you can inspect.

Change a control to inspect the example.

CSS material layout is not included
.glass {
  color: #ffffff;
  background: #34333f;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
  }
}

@media (prefers-reduced-transparency: reduce) {
  .glass {
    background: #34333f;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
Equivalent Tailwind HTML

Complete class strings for your compiler. This preview uses the equivalent CSS material, not a Tailwind runtime.

<!-- Paste the complete classes into a template scanned by Tailwind. -->
<div class="
  [background:#34333f] [color:#ffffff]
  [border:1px_solid_rgba(255,_255,_255,_0.25)]
  [border-radius:24px]
  [box-shadow:0_14px_40px_rgba(0,_0,_0,_0.2),_inset_0_1px_0_rgba(255,_255,_255,_0.12)]
  supports-[backdrop-filter:blur(1px)]:[background:rgba(255,_255,_255,_0.16)]
  supports-[-webkit-backdrop-filter:blur(1px)]:[background:rgba(255,_255,_255,_0.16)]
  [backdrop-filter:blur(18px)_saturate(140%)]
  [-webkit-backdrop-filter:blur(18px)_saturate(140%)]
  [@media(prefers-reduced-transparency:reduce)]:[background:#34333f]
  [@media(prefers-reduced-transparency:reduce)]:[backdrop-filter:none]
  [@media(prefers-reduced-transparency:reduce)]:[-webkit-backdrop-filter:none]
">
  <!-- Your content -->
</div>

Blur has a rendering context

A blur radius alone is not a complete performance description. The filtered region, overlapping surfaces, movement behind them, and the device all change the work involved. A small static card and a full-screen moving panel should not be treated as equivalent just because both use 18 px of blur.

This example deliberately keeps animation off until you request it. Use the same scene and viewport when comparing settings. Keep other tabs and background activity as consistent as practical, especially on a laptop using a power-saving mode.

Run a repeatable comparison

  1. Choose one small surface and a modest blur value. Run the experiment and record the callback interval summary.
  2. Change only the surface size and run it again. Then return to the baseline before changing layer count.
  3. Compare 0 px with a larger blur value. Repeat runs instead of treating one sample as a conclusion.
  4. Repeat on a representative lower-end device before making a production decision.

Read the measurement honestly

The experiment records intervals between requestAnimationFrame callbacks during an explicitly started five-second run. Median and P95 describe the observed interval distribution. Intervals above 25 ms are counted as long callback gaps, not as a formal dropped-frame metric.

These observations are not direct GPU timings, paint measurements, or a guaranteed frame rate. A quiet main thread can report regular callbacks while rendering still has a separate bottleneck. Display refresh rate, scheduling, browser throttling, and other work can change the result.

Use browser tools for the next step

Record a performance trace of the actual page and inspect rendering work while scrolling or opening the real component. Test with the rest of your application, and with any advertising or consent scripts that will run in production. This self-contained lesson has neither.

Choose a smaller rendering commitment

When a design struggles, try reducing the filtered area, the number of overlapping surfaces, or backdrop movement. Compare the visual result after each change. Avoid adding permanent animation or speculative layer-promoting styles just because a material looks smoother in one isolated test.

The demo stops automatically, stops when the page becomes hidden, and respects a reduced-motion preference. It is an experiment you control, not an ongoing background workload.

Further reading

WebKit: Introducing Backdrop Filters ↗

Copy manually

Your browser blocked clipboard access. Select the text and press Ctrl+C or ⌘C.