Core Concepts
The author explores two techniques, background-clip and mask-image, to achieve fading text content in CSS, highlighting their differences and browser support.
Abstract
The content delves into two CSS techniques, background-clip and mask-image, to create fading text effects. Background-clip restricts the background to be visible only behind the text, while mask-image uses an image as a mask layer. Both techniques allow for selectable words and even fading across gradients. Browser support varies between the two methods, with background-clip being more widely supported than mask-image. Each technique has its advantages and downsides, such as color preservation or transparency issues with emojis.
Stats
"background-clip: text is supported in all evergreen browsers since 2016."
"mask-image has been supported across evergreen browsers since 2017."
Quotes
"Background-clip restricts the background to be visible only behind the text."
"Mask-image lets you use an image as a mask layer."