What glassmorphism is
Glassmorphism is a UI style built around panels that look like frosted glass: a translucent background, a blur applied to whatever sits behind them, a faint light border catching an imaginary edge, and a soft shadow lifting the panel off the page. Popularised by macOS Big Sur and Windows 11’s Mica and Acrylic materials, it conveys depth and hierarchy — the glass floats above the content behind it.
Done well, it’s elegant; done carelessly, it’s an unreadable smear. The Glassmorphism Generator lets you dial in the effect visually, but understanding the underlying CSS is what keeps your glass looking like glass.
The CSS behind the glass
Four ingredients combine to produce the effect:
1. Translucent background
A semi-transparent rgba() fill lets the backdrop show through.
2. Backdrop blur
backdrop-filter: blur() frosts whatever is rendered behind the panel.
3. Light border
A thin, low-opacity white border simulates the glass edge.
4. Soft shadow
A diffuse box-shadow lifts the card off the background.
A representative rule looks like this:
.glass-card {
background: rgba(255, 255, 255, 0.2);
border-radius: 16px;
backdrop-filter: blur(12px) saturate(120%);
-webkit-backdrop-filter: blur(12px) saturate(120%);
border: 1px solid rgba(255, 255, 255, 0.18);
box-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.15);
}
The Glassmorphism Generator produces exactly this shape, with the values driven by sliders and a live preview.
Why backdrop-filter, not filter
This is the detail that trips people up. The filter property blurs the element and its contents — useless for a card, because your text would blur too. backdrop-filter blurs only what’s behind the element, so the background turns frosty while the card’s own text stays razor-sharp. Glassmorphism is impossible without it.
The added saturate() is a subtle but important touch. Blurring tends to wash colours out; boosting saturation slightly (110–130%) restores the vivid, glassy quality and stops the panel looking grey.
Transparency and blur work together
The frosted look comes from the interplay of two values: how transparent the background is, and how strong the blur is. Too transparent with too little blur and the panel looks like plain tinted glass with no frost. Too opaque and you lose the see-through quality entirely. A common sweet spot is 15–25% background opacity with 10–16px of blur, but the right balance depends on how busy the backdrop is — busier backgrounds need more blur and a touch more opacity to keep foreground text legible.
Browser support and the WebKit prefix
backdrop-filter is supported in current versions of Chrome, Edge, Firefox, and Safari. Safari, however, still requires the -webkit-backdrop-filter prefix, so always include both declarations — the generator does this automatically. On browsers that don’t support it at all, the rule is simply ignored and the element falls back to its translucent background, which is a graceful degradation as long as your text remains readable on that fallback.
Keeping glass accessible
Transparency is the enemy of contrast, and contrast is the foundation of readability. A few rules keep glass cards usable:
- Keep enough background opacity behind text so it stays legible
- Test text contrast against WCAG AA ratios
- Use glass for a few focal panels, not the whole page
- Pair light text with darker tints and vice versa
- Don't place small body text over busy, high-detail imagery
- Don't stack many blurred layers — performance and clarity both suffer
- Don't rely on the border alone to define the card edge
- Don't assume the effect renders identically on every device
Run your foreground and background colours through the Contrast Checker to confirm the text meets accessibility ratios — frosted glass is only beautiful if people can read what’s on it.
A short history of the style
Glassmorphism didn’t appear from nowhere. It’s the latest turn in a long cycle between skeuomorphism — interfaces that imitate real materials — and flat design, which stripped those textures away. The frosted-glass look traces back to early translucency experiments in Windows Vista’s Aero and matured with Apple’s iOS 7 and macOS Big Sur, where blurred control centres and sidebars made layering feel physical again. The community coined the term “glassmorphism” around 2020, and the rise of backdrop-filter support across browsers made it practical on the web rather than a native-only trick. Knowing this lineage helps you use it tastefully: it’s a way to express depth and focus, not a decoration to apply everywhere.
When to reach for it — and when not to
Glassmorphism shines when there is genuine depth to communicate: a modal floating above content, a navigation bar over a hero image, a stat card on a colourful dashboard. In those cases the blur reinforces the sense that one layer sits above another, guiding the eye. It works against you when applied to dense, text-heavy interfaces where readability is paramount, or over plain backgrounds where there’s nothing interesting to frost. A settings form rendered entirely in glass is harder to read than a plain one and gains nothing. As with most strong visual styles, restraint is what separates polished from gimmicky — pick a few focal surfaces and let everything else stay solid.
Pairing glass with backgrounds
Glassmorphism needs something interesting behind it; over a flat white page the effect vanishes. Vivid gradients are the classic pairing, because the blur smears their colours into a soft wash. If you’re designing the backdrop too, the CSS Gradient Generator and its guide help you build a gradient that complements the glass on top.
Wrapping up
Glassmorphism is four CSS ingredients — a translucent background, a backdrop blur with a saturation boost, a light border, and a soft shadow — working in concert. The key technical insight is that backdrop-filter blurs the background while leaving your content sharp, and the key design discipline is protecting contrast so the result stays readable. Tune it live in the Glassmorphism Generator, check your text with the Contrast Checker, and you’ll ship glass that looks as good as it reads.