Testing

CSS background-clip Text: Browser Support, Use Cases, Fixes

background-clip: text works unprefixed in Chrome 120+, Edge 120+, Firefox 49+, Safari 15.5+, Opera 106+, and Samsung Internet 25+. See full browser support.

Author

Prince Dewani

May 6, 2026

background-clip: text is a W3C CSS Backgrounds Module Level 4 value that clips an element's background to the shape of its rendered text. It works unprefixed in Chrome 120+, Edge 120+, Firefox 49+, Safari 15.5+, Opera 106+, and Samsung Internet 25+, with -webkit-background-clip: text as the alias from Chrome 4, while Internet Explorer never added support.

This guide covers what background-clip: text is, the browsers that support it, how to use it with gradients, the common pitfalls, and a fallback strategy.

What is background-clip: text?

background-clip: text is the keyword value of the CSS background-clip property that paints an element's background image, gradient, or color only behind the rendered text. The W3C defines it in CSS Backgrounds and Borders Module Level 4. Authors typically pair it with -webkit-text-fill-color: transparent so the background shows through the glyphs.

Which browsers does background-clip: text support?

background-clip: text ships in every modern engine, but the path to unprefixed support was uneven. Most browsers honored only -webkit-background-clip: text for years, and Chromium dropped the prefix only in Chrome 120. Internet Explorer never shipped either form.

Loading browser compatibility data...

background-clip: text compatibility in Chrome

Chrome supports background-clip: text unprefixed from Chrome 120 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 4 to 119 supported only the -webkit-background-clip: text alias, which still works in current Chrome as an alias for the unprefixed property.

background-clip: text compatibility in Edge

Microsoft Edge supports background-clip: text unprefixed from Edge 120 on Windows, macOS, and Linux through the Chromium engine. Chromium-based Edge 79 to 119 honored only -webkit-background-clip: text, and Edge Legacy 12 to 18 also accepted the prefixed form through EdgeHTML.

background-clip: text compatibility in Firefox

Firefox supports background-clip: text from Firefox 49 on Windows, macOS, Linux, and Android. Firefox also treats -webkit-background-clip: text as an alias for the unprefixed property, so either declaration works. Firefox 2 to 48 did not support either form.

background-clip: text compatibility in Safari

Safari supports the -webkit-background-clip: text alias from Safari 4 on macOS and Safari 3.2 on iOS and iPadOS. The unprefixed background-clip: text works from Safari 15.5 on macOS, iOS, and iPadOS. Safari 3.1 and earlier on macOS did not support either form.

background-clip: text compatibility in Opera

Opera supports background-clip: text unprefixed from Opera 106 on Windows, macOS, and Linux through its Blink engine. Opera 15 to 105 honored only -webkit-background-clip: text. Opera Mobile picks up unprefixed support from the matching Chromium build, and Opera 9 to 12.1 dropped the declaration as unrecognized syntax.

background-clip: text compatibility in Samsung Internet

Samsung Internet supports background-clip: text unprefixed from Samsung Internet 25 on Galaxy phones and tablets. Samsung Internet 4 to 24 honored only the -webkit-background-clip: text alias, which still works in current builds as a fallback for older devices.

background-clip: text compatibility in Android Browser

Modern Chrome for Android supports background-clip: text unprefixed from Chrome 120, and the legacy stock Android Browser supports the -webkit-background-clip: text alias from Android Browser 4. Android Browser 2.1 to 3 did not support either form.

background-clip: text compatibility in Internet Explorer

Internet Explorer 5.5 through Internet Explorer 11 never supported background-clip: text in either form. Microsoft has retired Internet Explorer, so any legacy intranet page that needs a gradient text effect has to fall back to a flat foreground color, an SVG text element, or a pre-rendered image asset.

Note

Note: background-clip: text behaves differently across Safari prefix builds, older Chromium versions, and Firefox alias handling. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!

How do you use background-clip: text with a gradient?

A gradient text effect needs four declarations on the same element: a background, the prefixed and unprefixed background-clip values, and a transparent foreground. The browser paints the gradient behind the glyphs and clips it to the text outline.

  • Set the background: Apply a linear-gradient, radial-gradient, conic-gradient, or url() image as the background of the element that holds the text.
  • Add -webkit-background-clip: text: The prefixed property covers Safari, older Chromium, older Edge, and older Samsung Internet builds.
  • Add background-clip: text: The unprefixed property covers Chrome 120+, Edge 120+, Firefox 49+, Safari 15.5+, Opera 106+, and Samsung Internet 25+.
  • Make the text transparent: Set color: transparent so the page background does not show, and -webkit-text-fill-color: transparent to override the foreground in WebKit and Blink.
  • Verify the result in DevTools: Inspect the element and confirm the computed background-clip is text. If the gradient is missing, the foreground is not transparent or the prefix is missing.
/* 1. Gradient text. The transparent foreground lets the clipped gradient show through. */
.gradient-headline {
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* 2. Image-filled text. Works the same way with a raster background. */
.image-headline {
    background: url("/static/hero-pattern.jpg") center / cover no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* 3. Animated gradient text. Slide the background to make the gradient drift across the glyphs. */
.animated-headline {
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #ff6b6b);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: drift 6s linear infinite;
}
@keyframes drift {
    from { background-position: 0% 0%; }
    to { background-position: 200% 0%; }
}

/* 4. Accessible fallback. Solid color when the engine cannot clip to text. */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .gradient-headline,
    .image-headline,
    .animated-headline {
        background: none;
        color: #1a73e8;
    }
}
...

What are the common pitfalls of background-clip: text?

background-clip: text works on every modern engine, but a handful of quirks still make the effect silently fail in production. Most pitfalls trace back to the transparent foreground, the -webkit- prefix, parent stacking contexts, and accessibility regressions.

  • Forgotten transparent foreground: The most frequent failure. Without color: transparent and -webkit-text-fill-color: transparent, the solid foreground paints over the clipped background, and the gradient never shows.
  • Missing -webkit- prefix: Safari 15.4 and earlier, Chromium 119 and earlier, and Samsung Internet 24 and earlier need -webkit-background-clip: text. Drop the prefix and the property dies on every iPhone running iOS 15.4 or older.
  • Applied to a parent instead of the text element: Safari only honors background-clip: text on the element that renders the glyphs. Apply it to a wrapper and the WebKit engine ignores it, even though Chrome and Firefox still clip correctly.
  • Buttons and form controls reset the foreground: Safari does not clip backgrounds to text on native button elements. Wrap the text in a span inside the button and apply background-clip: text to the span.
  • Accessibility loss for selected text: Highlighted text inherits the background, so the gradient stays under the selection color. Add a ::selection rule with a solid color to keep the selection legible.
  • Print stylesheet failure: Printers usually ignore background-image, so the text prints as a transparent block. Override with @media print { color: black; background: none; -webkit-text-fill-color: black; }.

In my experience, the trap that bites teams hardest is shipping background-clip: text on a button label, watching it work in Chrome and Firefox during development, then seeing the entire button text vanish on iPhones because Safari treats the form control's foreground specially.

...

How do you provide a fallback for background-clip: text?

A fallback matters for Internet Explorer, very old Android WebViews, and any browser that disables background-image. Use the @supports rule to feature-detect background-clip: text and ship a solid foreground color when the engine cannot clip a background to glyphs.

  • @supports feature query: Wrap the gradient rule in @supports ((-webkit-background-clip: text) or (background-clip: text)) and put the solid color rule outside the query. Browsers that do not understand the query keep the solid color.
  • Solid fallback color first: Declare color: #1a73e8 before the transparent declaration. Internet Explorer and old WebViews ignore the later -webkit-text-fill-color and keep the solid color, so the headline still reads.
  • SVG text alternative: For brand-critical headlines, render the text inside an SVG element with a fill="url(#gradient)" reference. SVG gradients ship in every browser back to Internet Explorer 9, so the gradient text works without background-clip.
  • Pre-rendered image as last resort: When SVG and CSS both fail, embed a high-resolution PNG with a transparent background and an alt attribute carrying the headline text. Use srcset to serve a 2x asset on retina screens.
  • Contrast audit on the fallback: The solid fallback color must meet WCAG 2.1 contrast against the page background. A gradient text effect can pass on its midpoint and fail on its end stops, so the audit should target the chosen fallback color, not the gradient.

Citations

All background-clip: text version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests